0

I have a layer called "home_movie" and on that later on the end frame is a movie clip that plays, what i want to happen at the end of the animation is it to send the user back to the frame above they started at. which is layer: home_movie, frame id: main_movieopt but its not working.

I tried two combos its not working any help?

gotoAndStop ("home_movie", "main_movieopt");

Nothing happens just stops the animation and don't take them back to the menu..

home_movie_mc.gotoAndStop ("main_movieopt");

gives an error, i am not sure hot to call it, if a flash guru can help i would appreciate it!

*UPDATE: I finlly fixed it thanks to you guys and a little web search, now it works great!

MovieClip(this.parent).gotoAndStop("main_movieopt");
Greg
  • 31
  • 4

1 Answers1

0

ActionScript knows nothing about layers. A frame label on any layer is simply the label for that frame. Try just gotoAndStop("main_movieopt")

jhocking
  • 5,527
  • 1
  • 24
  • 38
  • Nope i tried that it just keeps looping the movie and don't send them back to that frame. Here is how i have it set up: on the menu frame there is a button, when you click it loads the next frame > and it plays the movie. inside that movie after al lthe animation i have on the last frame to send them back to the start> menu frame. know what i mean lol? – Greg May 09 '11 at 00:46
  • ah so the code is on a frame inside the movie clip. Personally I would recommend against nesting code like that (instead monitor the movieclip from outside in order to keep all the code in one place) but for the code you're writing the command would be something like parent.gotoAndStop(etc – jhocking May 09 '11 at 00:53
  • yeah i just tried it comes out as an error. "call to a possibly undefined method" :parent.gotoAndStop("main_movieopt"); – Greg May 09 '11 at 02:32
  • How do i "instead monitor the movieclip from outside"? – Greg May 09 '11 at 02:46
  • Set an enterFrame listener on the clip. In the listener function check currentFrame. – jhocking May 09 '11 at 02:53