Accessing the main timeline from a loaded SWF on another level.
April 16, 2004
Actionscript 2 | Flash

I have a flash file which loads an external SWF (call it external.swf) into the main timeline, on level 10. In this case, using _root or _parent to call the symbols on the main timeline will not work, since _root or _parent would refer to items on _level10.

The main timeline also contains a movie clip called "swapColors_mc" with two frames called "red" and green".

To control the color change of swapColors_mc by clicking a button in external.swf once it is loaded, open "external.fla" (the original flash file from which external.swf is created) and add this actionscrip to the button:

on (release) { _level0.swapColors_mc.gotoAndPlay("green"); }

Ads by Google

Posted by ellen at April 16, 2004 06:26 PM


Ads by Google

 RSS   |   Contact Me

Ads by Google

Ads by Google