Search code examples
actionscript-3actionscript-2loaderswfloader

Problem Loading AS2 swf into AS3 swf


I've been trying very hard to get an AS2 swf to load properly inside an AS3 swf - but to no avail ...

The AS2 file (which is a rather big app referencing many external xml files etc.) works perfectly when launched in Flash Player.

When trying to load the same file through an AS3 swf (using URLRequest and Loader classes), the file starts loading but stops abruptly during the preloading phase. (Same happens if I try to load it using AS2 "loadMovie".)

Update: It seems as if the swf actually loads through AS2 loadMovie but not AS3 Loader class.

What is there more to try? Security settings, custom loader classes - any advice is appreciated.


Solution

  • Also keep in mind that an AS2 swf loaded into an AS3 swf will have problems communicating to it's parent swf, so the Loader will have trouble keeping track of the loading of the swf - so that might cause you a problem. You should build the swf that DOES the loading in AS2 and then connect it to an AS3 swf using LocalConnection.