Skip to main content
Participant
November 12, 2011
Answered

Flash gotoandstop problem

  • November 12, 2011
  • 1 reply
  • 1648 views

Hi

my button in main timeline, i want to "gotostop" a label which is in a I. movieclip that is in another II. movieclip (i mean nested two movieclips)  under main timeline. How can i write "gotostop" codes?

This topic has been closed for replies.
Correct answer Ned Murphy

As long as all movieclips are present when you execute the command, in the timeline that contains the first movieclip you could use something like...

movieclipname1.movieclipname2.gotoAndStop("laeltext");

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
November 12, 2011

As long as all movieclips are present when you execute the command, in the timeline that contains the first movieclip you could use something like...

movieclipname1.movieclipname2.gotoAndStop("laeltext");

Participating Frequently
November 12, 2011

Quick note on this, because it seems you are timeline driven (aka using gotoAndStop) you should take into consideration that objects are only accessable when the keyframe they are contained in is active.  If you call an object that is on another frame you will most likely error.

Using Ned's example

Eg:

If movieclipname1 contains multiple frames, then you must goto the frame which contains the object you want first, then movieclipname2 and so on for nested elements:

movieclipname1.gotoAndStop('test');

movieclipname1.movieclipname2.gotoAndStop("labeltext");

- just a note...

Ned Murphy
Legend
November 12, 2011

You're pretty much repeating what's already been said.