Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Latest Plugin

Status
Not open for further replies.
Dec 24, 2001
857
GB
Is there an easy way to use Flash to detect if the user has the latest plugin? Or...can you just tell it to find out if they have an earlier version than you specify.

For example, on the Flash site they seem to be up to version 6, 0, 40, 0. Can I set something saying that if the user has less than this then redirect them to the Macromedia site?

Also, what does the getVersion(); command do? I tried setting version = getVersion(); and then I created a dynamic text box called version, but nothing appeared in it. I dont know if its related but it was in a test fla I downloaded.

As always, any help is appreciated.

Regards
 
If you're not using Flash MX features (since you're still on 5), your movies should work fine with any version of the player from version 5 on.
As for detection, if you're using the Publish feature of Flash to output your html, it should hold the following line:
Code:
 ...codebase="[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"...[/URL]
And if the user only has an earlier version of the player, he will automatically be re-directed to Macromedia's download site, and offered to download the latest player. Regards,

new.gif
 
I've just created my own plugin detection which seems to work. I say my own but in fact I've just stole it from and changed it slightly.
Anyway, heres the code:

version = getVersion();
flash_ver = version.split(",");
ver = flash_ver[2];
if (ver < 22) {
gotoAndStop (3);
}
if (ver >= 22) {
gotoAndStop (2);
}

Obviously go to frame 2 if its ok and then onwards through the movie.
If its not ok, go to frame 3 and direct them to Macromedia.

When I got it from actionscript.org, it has 29 in place of the 22, but when you install the plugin at macromedia.com and go onto the about in their little movie, it says you've just installed version 6, 0, 22, 0.

Ah well, it works anyway.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top