Reputation: 2237
I'm publishing a swf using ActionScript 3.0 on the web. Therefore, only Flash player 9 or above can run my swf. How can I set the minimal version requirement so that if the use can be notified if his player doesn't meet my requirement?
Upvotes: 1
Views: 1082
Reputation: 18860
i think SWFObject is the best solution - although it requires JS to be available in the client's browser. w/ SWFObject you could also check if the client got flash installed at all (and show alternative content if necessary)
Upvotes: 3
Reputation: 2786
Yes you can. As was written in this question, you can get users flash player from Capabilities.version
(documentation). The result of this function would be something like this
WIN 9,0,0,0 // Flash Player 9 for Windows
This is a string so i think with like like this
var numbers:Array = version.split(" ")[1].split(",");
you can get the array like [9 0 0 0]
. From this point I think it should be obvious how to compare if users flash player is good for your flash or not.
So if it's not, I usually show a picture which says that user need to install new version of the flash player. And if user click on it, I send him to the adobe web page.
Update
One more way in a case if you are using SWFObject to embed your swf. You can set the minimum version there. official docs here.
Upvotes: 1