PDA

View Full Version : Accessing movieclip in loaded swf


alexz
09-12-2008, 08:47 AM
Hey! How do i access a movieclip inside of a .swf that i have loaded?

yogeshpuri
09-12-2008, 09:10 AM
Use the following syntax to get the loaded MovieClip. Here loaderObj is the loader object in which the swf is loaded and the "test_mc" is movieclip in the loaded swf


var loadedMC:MovieClip = loaderObj.content as MovieClip;
var test_mc:MovieClip = loadedMC.getChildByName("test_mc") as MovieClip;
test_mc.play() // do whatever action you want to peform on MC


Hope it works

alexz
09-12-2008, 09:51 AM
Thanks for fast reply! I ll try that!