Solved

flash AS3 gotoAndPlay question

Posted on 2010-08-20
8
523 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

738 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