Loader: Target MovieClip on stage(_root?) from loaded swf

Hi,
I know there’s a lot of posts on this subject but I’ve been pulling my hair out and still can’t find a solution. It’s killing me. It seems like it should be so simple. I’ve got a site where i load in various swf files from my main file(main.swf) that contains the nav. Here is the function that’s called when the swf is loaded in:

function loadComplete(event:Event):void {
trace(“Complete”);
stage.addChildAt(loader, 0);
holderMC = event.target.content;
holderMC.gotoAndPlay(2);//this sends the loaded swf to frame 2 where some buttons exist
}

the problem i can’t figure out and can’t find a clear explaination to is this:
how do i target a movieclip on the main timeline(instance name ‘animationstuff’) of the loader swf(main.swf) from a button in the loaded swf? the movieclip in the main timeline was placed on the timeline manually and not through actionscript.

i’ve tried tons of different methods and none have worked so i’m hoping someone can explain it. this new display list has me so confused.

when I used stage… I had to use one extra step to get to the main timeline…

stage.getChildAt(0).holdermc.gotoAndPlay(2);

stage - top most level
maintimeline - exists on stage
movie clips - then your movie clips on there…

use this to kind of see what I mean…
trace(stage);
trace(stage.getChildAt(0));

the really really frustrating part to learn was that when you make classes, you have to pass the stage reference to them, as they cannot see the stage by default… really a pain. Yes Object Oriented… but doesn’t mean it’s easier or faster, or less code.

  • to have stage accessible u must listen to ADDED_TO_STAGE Event
  • u haven’t replaced stage
  • u should add clips to root which is mian timeline not stage
  • try working on references