Skip to main content
Known Participant
January 5, 2008
Question

Referencing the main timeline from elsewhere

  • January 5, 2008
  • 4 replies
  • 499 views
From inside a movie clip (button) which is inside a display object (buttonSet), I want to gotoAndPlay a specific frame on the main timeline. I've tried stage.gotoAndPlay(thisFrame). I got closer with gotoAndPlay(stage.thisFrame). I still have something wrong.

I have about 15 frames on the main timeline. Each frame contains a myriad of objects all doing different things. Most importantly they transition from frame to frame based on the current frame (last button clicked) and the next frame (the newly clicked button).

Example: the last button that was clicked was button #4, the button I have just clicked is button #2. Based on this knowledge, I want the main timeline to gotoAndPlay frame #6.

Thanks for the aid. 🙂
This topic has been closed for replies.

4 replies

Known Participant
January 6, 2008
k...I don't know if your last post here was in reference to my other question, but I'm uncertain how to explicitly type an object. Can I get a hint? :)
kglad
Community Expert
Community Expert
January 6, 2008
:

kglad
Community Expert
Community Expert
January 6, 2008
the flash compiler (in strict mode) often has trouble "remembering" the class-type of objects/variables. "typing" those objects explicitly helps the compiler to overcome erroneous error messages.
Known Participant
January 6, 2008
Thanks k...This worked. Now I have a real head scratcher...LOL.
kglad
Community Expert
Community Expert
January 5, 2008
try: