Hi,
I need to check whether flash insatlled or not using Flex.
Thanks & Regards,
Jayagopal.
You can't. If your Flex code is running [in a browser]; then by definition, Flash Player must be installed. If Flash Player doesn't exist, then there is no way to ever run your code [in a browser].
Most people use JavaScript libraries, such as SWFObject to determine if the Flash Player is installed.
Hi Jayagopal,
You can have a check for this in the Javascript. If you notice the html wrapper file in which your main swf is embedded the javascript is included which will have a check for Flash Player detection.
The application will automatically prompt the user if appropriate version of FlashPlayer is not installed.
Thanks,
Bhasker
Hi Jayagopal,
I think you don't need to use of swfobject.js also. If you can see in your Flex Project you will find a folder by name html-template in which you can see index.template.html file. In this you can see for the javascript code of FlashPlayer detection. You dont need to write any code specifically for that. It is automatically included in the htmlWrapper generated by the FlexBuilder..
You can also check bin-debug folder in which you can see the html same as your main mxml application file name. Say if your main mxml name is main.mxml then in bin-debug folder you can see a html file by name main.html in which your main.swf is embedded and also it includes the javascript code to detect the FlashPlayer version.
When we host our Flex application we will host it using a html file right...With in the same file the Javascript is included for FlashPlayer detection. Just open and check the html file you will see the code.
Thanks,
Bhasker
North America
Europe, Middle East and Africa
Asia Pacific