Load SWF compiled for Flash 10 to Flash 9 SWF

Is it possible? I would like to have a basic swf that can be viewed by users who either have flash 9 installed or flash 10. Within this swf a separate module will be loaded only for users who have flash 10 installed. will use some of the advanced features of flash 10.

+1


a source to share


3 answers


Of course this should work fine as you described it. Make your base SWF in Flash 9, do a version check, and possibly load in another SWF published as 10. Flash will provide advanced functionality in SWF SW10, regardless of the SWF version it was loaded into.



Just remember that the version is returned as a string, so don't forget to do parseInt

on it.

+1


a source


This should work fine unless you are trying to use the Flash 10 libraries in Flash 10 SWF, which is probably what you are doing. I just tried it and once again Adobe is disappointed with their design and the quality of the Flash / Flex library.

For example I tried to do the following

I have a SWF Flash 9 base that will load the Flash 10 module if the custom Flash Player is 10 or more. This Flash 10 module ends up using special Flash 10 libraries like: 1) flash.net.NetStreamPlayOptions 2) flash.net.NetStreamPlayTransitions 3) NetStream.play2 Unfortunately when I do this, the Flash runtime complains that there is no such thing. like NetStreamPlayOptions, NetStreamPlayTransitions and NetStream.play2. I tried to work around this by duplicating NetStreamPlayOptions and NetStreamPlayTransitions which put me off, but unfortunately I was unable to call NetStream.play2 even though I passed the NetStream instance as an object.



I believe it works like this because the underlying SWF, which is Flash 9, uses playerglobal.swc, which is for Flash 9. When it loads the Flash SWF SWF, it still ends up using Flash 9 playerglobal.swc because the environment has been initialized for Flash 9 which causes problems with Flash 10 SWF. I have yet to find a way around this.

When Flash switched from AS1 → AS2 → AS3, it was clear why it was not backward compatible, but now AS3 cannot always boot AS3, which is very frustrating in my opinion.

+1


a source


I haven't been developing flash apps for a long time, but ok ... these are my 2 cents:

You may need to compile basic Flash to 10 and this could be a problem due to the update warning.

This is a possible workaround: http://codeofdoom.com/wordpress/2009/02/09/compiling-to-flash-10-requiring-flash-9/

Having done that, I think it easily detects the flash version and loads various SWF modules just like you say.

0


a source







All Articles