简体   繁体   中英

Load Flex4 application in Flash as3

I have created a plugin-enabled flash which reads a configuration file and loads several other flash files. All the files have been created by Adobe Flash CS5 . Recently i had to create a flex application which i want to load on stage of the main flash.

this.addChild(this.movieLoader);
this.movieLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadedM);
this.movieLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
this.movieLoader.load(new URLRequest(fmovie));

The LoadedM(..) is triggered every time and the loaded flash is placed into stage and positioned in LoadedM(..) .

When i load a FlashCS5 created swf, the loader.content is of type [object MainTimeline] while when i load the Flex4 application the loader.content is of type [object _Main_mx_managers_SystemManager]

My problem is that the flex application is not visible on stage nor the initialized/created events of the flex app are triggered even thow debug shows full load of the file.

I have already tried this solution but didnt do any good. i've checked the Event.INIT event of the loaded instead of Event.INIT and it's being triggered. But the anthropod debugged doest not report the the initialization of the flex app take place.

What am i missing? Thanks in advance

You can read more about the problem at http://old.troygilbert.com/2009/05/loading-flex-based-swfs-in-as3-only-swfs/

If the above does not work, make sure that you are publishing your swf for flashplayer 10.2+

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM