1 Reply Latest reply on Jun 5, 2011 4:50 AM by Ned Murphy

    How to 'call' a movieclip on the stage from within a movieclip?

    firesoul7468ollie

      Hey,

       

      So i have 2 movie clips on the stage, and i need to call the 2nd movieclip from within the 1st one,

       

      ive tried using;

       

      "stage.popUp_mc.gotoAndStop(1);"

      "root.popUp_mc.gotoAndStop(1);"

       

      and it keeps bringing up errors,

       

      thanks:)

       

      Ollie.

        • 1. Re: How to 'call' a movieclip on the stage from within a movieclip?
          Ned Murphy Adobe Community Professional & MVP

          If you are using AS3 and the two movieclips both live on the root timeline, then you can try...

           

                MovieClip(root).popUp_mc.gotoAndStop(1);

           

          You could also possibly use...

           

                MovieClip(parent).popUp_mc.gotoAndStop(1);

           

           

          A more OO correct way to do this would be to have an event listener in the main timeline that is assigned to the movieclip and listens for an event that the movieclip dispatches.  The event listener in the main timeline would call a function in the main timeline that targets the second movieclip.