Reputation: 3828
How do I get to the MovieClips within an externally loaded Movie Clip.
Lets say I have a movie Called ONE in the swf I just loaded. How can I work with it alpha, position and other properties of the children of this clip?
CODE IN MAIN TIMLINE:
var LoadedMC:Loader = new Loader();
LoadedMC.load(new URLRequest("amplitude.swf"));
LoadedMC.addEventListener(Event.COMPLETE, bL);
function bL (e:Event):void{
addChild(LoadedMC);
}
Now its loaded I want to change the postino of the clip called ONE in the movie LoadedMC I just created.
Thanks for your help. -Ed
Upvotes: 1
Views: 2752
Reputation: 11590
I would think you would do something like:
//Cast the content into a movie clip
var someMC:MovieClip = MovieClip(LoadedMC.content);
//or try
var someMC:MovieClip = LoadedMC.content as MovieClip;
//then access the child
someMC.ONE.x = 50;
someMC.ONE.y = 100;
Upvotes: 3