PDA

View Full Version : Detecting Flash for Charts



pete_walsh
9 Sep 2009, 7:40 AM
I'd like to detect whether or not the user has Flash installed (for using Charts) and if not, give them a link to download flash. What would be the best way to do this in GXT?

Chart extends FlashComponent which has a setExpressInstall function. It seem like if I give it the location of expressInstall.swf it should work, but I've had no success when Flash isn't installed at all.

Any help on this would be really appreciated

shobitha_nellutla
27 May 2010, 4:20 AM
Hi,

I have similar requirement. Were you able to find any solution??

Thanks,
Shobitha

arkadye
12 Aug 2010, 12:00 PM
I have a similar problem. Is there any solution in GXT?

Best regards,

Arkady.

arkadye
12 Aug 2010, 12:29 PM
It seems like express install is supposed to work only if some version of Flash is already installed - it just upgrades it.

rdrever
12 Aug 2010, 7:08 PM
I have been annoyed by this for a while and decided to find a solution. Simply override the onAttach method of the Chart class so that it puts a download link in chart div. If flash is not available the div doesn't get replaced by swfobject.js and the download link is visible.


@Override
protected void onAttach() {
super.onAttach();
el().setInnerHtml("<div id=\"" + getSwfId() + "\"><h1>Charts require Flash Plugin</h1><p><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a></p></div>");
SwfConfig config = new SwfConfig();
injectFlash(config);
}

arkadye
13 Aug 2010, 8:56 AM
Thanks a lot. It works great.