Solved

flash AS3 gotoAndPlay question

Posted on 2010-08-20
8
517 Views
Last Modified: 2013-11-11
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!
0
Comment
Question by:g0mab2
8 Comments
 
LVL 19

Expert Comment

by:quizengine
ID: 33489351
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 ?
0
 

Author Comment

by:g0mab2
ID: 33489405
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.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 33490597
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.

0
 
LVL 5

Accepted Solution

by:
truromeo4juliet earned 300 total points
ID: 33492510
depending on where you're calling your action from, you may be using unnecessary nesting to control your movie...

for example, if you're on the root timline, not inside any movieclip, and you're assigning an action to a frame to control your "MAIN_MC" movie clip, then I BELIEVE you would do this:

MovieClip(root).MAIN_MC.gotoAndStop("portfolio");

I've actually got to tackle this issue when I get home as well, so if that doesn't work, I'll have a better solution when I get home when I have flash in front of me.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Closing Comment

by:g0mab2
ID: 33493498
truromeo4juliet:
it worked, thank you so much!
0
 

Author Comment

by:g0mab2
ID: 33494168
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");
0
 
LVL 5

Expert Comment

by:truromeo4juliet
ID: 33656725
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?
0
 

Author Comment

by:g0mab2
ID: 33663600
I figured it out, thanks anyway.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now