“Be inspired, enjoy your work, keep learning and never forget to play.” — gskinner

Load an external flex swf into a flash project and communicate with him.

Posted: April 15th, 2008 | Author: Ivan Valadares | Filed under: Actionscript3, Adobe Flex, Code, Events | 5 Comments »

Loading the swf is easy; you can make a normal loader and load it. And now the tricky part, if the swf is a swf flash file you can call the function you want, but in flex, because it have 2 frames, (first frame is just for loading), you need to wait until frame 2 is available, you can’t also access directly to a swf, you have to refer application before, so there’s the code:

you can also add Event Listener's to myClip.application , like myClip.addEventLIstener(“ON_CHANGE”,function), so by this way you can embed flex swf into an flash application and communicate with him by calling function and receiving events.