?
Solved

flash AS3 gotoAndPlay question

Posted on 2010-08-20
8
Medium Priority
?
526 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Accepted Solution

by:
truromeo4juliet earned 1200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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…
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.
Suggested Courses

752 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