For some reason, the gotoAndPlay command in one of my frames won't work properly (I think that's the problematic command, but maybe it's another one in the movie).
Frame 1 consists of a button instance named "menu", which is a text reading "menu". When pressed, the animation starts playing and several menu options appear in a frame-by-frame animation, which lasts up to frame 7 where the movie stops.
When the "menu" instance is pressed again, the playhead is released and the movie plays another frame-by-frame animation (from frames 8 to 16) of the menu options disappearing.
So, in frame 16 there appears only the "menu" instance - just like in frame 1.
All of the above works fine.
What I want to do is tell the player to go back to frame 1 as soon as it reaches frame 16, so the menu can open up again when the instance is pressed.
I put this code in frame 16:
gotoAndPlay(1)
and it seems to be working fine, but when I press the "menu" instance for the third time (meaning, after it has already opened up and closed one time), the movie starts playing from frame 8 for some reason.
I've included the file itself - you can just try testing the movie to see the problem.
Any advice would be greatly appreciated.
Thanks!
Thanks! It fixed that problem perfectly, but kind of screwed up the other pre-existing navigation parts in the file...
Take a look at the full file attached (test the movie)-
1. Click the menu and select a certain menu item.
2. Then, click the menu button again - you are directed to an animation that "reconstructs" the menu by placing your selected item back in its place.
3. Select a different menu item - you're directed to a different animation that reconstructs the menu by placing your new selected item in its place.
The problem arises when you select an item that you've already selected before and then go back to the main menu.
When you do that, the playhead just goes to all kinds of different places on the timeline and reconstructs the menu with the wrong animations.
I've spent hours double-checking the gotoAndPlay() commands in all the frames to make sure that they indicate to correct frames to go to - I've found no mistakes.
The timeline might seem a bit intimidating, but once you test the movie you'll probably see what it's all about.