Link to home
Start Free TrialLog in
Avatar of g0mab2
g0mab2

asked on

flash AS3 gotoAndPlay question

there are many different examples out there that show how to get from one movie clip to a specific frame:

MovieClip(parent).gotoAndStop("intro");

But what if there was a movieclip within the "intro" frame you wanted to go to?  I have not seen a specific post that talks about this.

I am guessing the movieclip within intro you can navigate to a specific frame too?
Help please!
Avatar of quizengine
quizengine
Flag of United Kingdom of Great Britain and Northern Ireland image

I write in as2, so I don't know if the syntax is the same in as3, but is as2 you would write

daddybear.mommybear.babybear.gotoAndStop("babysbed");

where the mc 'daddybear' is on the main timeline (root) and the mommybear clip is inside the daddybear clip, and the babybear clip is inside the mommybear clip. Make sense ?
Avatar of g0mab2
g0mab2

ASKER

I tried that, there has to be something else to it since I keep getting the undesired response.
I am already in a movieclip, so I have to MovieClip(parent).

inside the main_parent frame, there is a mc called MAIN_MC that I want to open to a specific location.

so I have been doing this
MovieClip(parent).main_parent.MAIN_MC.gotoAndStop("portfolio");

but this is not working.
can you explain the setup more precisely?

on main timeline you have instance x
instance x you have .....

where you're calling the code from etc.

ASKER CERTIFIED SOLUTION
Avatar of truromeo4juliet
truromeo4juliet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of g0mab2

ASKER

truromeo4juliet:
it worked, thank you so much!
Avatar of g0mab2

ASKER

what if when you go to the root, the movie clip you want to go to is on a different frame?

for instance:
MovieClip(root).MAIN_MC.gotoAndStop("portfolio");

this works if the call comes from the same root frame that portfolio is in.

from root I would like to go one frame over, and two clips down, would that be:

MovieClip(root).main_parent.MAIN_MC.gotoAndStop("portfolio");
I'm not sure of what you're asking when you say you want to go one frame over and two clips down. Can you elaborate?
Avatar of g0mab2

ASKER

I figured it out, thanks anyway.