Copy link to clipboard
Copied
So I am working on a small school project and I had an idea and I am trying to make that idea come to life but I know next to nothing about action script. (I really want to learn but I don't have time to learn it between now and when the project is due(december 6th)). I am trying to create a simple interface like a video game menu, all it needs to do is have buttons that allows you to navigate back and forth through 4 menu screens by way of buttons. I have created the buttons and have made it so that from the first menu if you click the arrow to the right it jumps to the second menu but when I go to add more AS so that you can go to the next menu over or go to the previous menu, in preview mode, it won't stop at any frame and it looks as though it runs the first bit of animation normally but when it should stop so that you can advance to the next menu yourself, it keeps playing and it runs on a loop between the first frame and the second menu, even though there are stop commands.
Sorry if I am not explaining this well, I am sure it is a simple fix but again I know nothing about actionscript and have no idea how to make this stop looping.
I have attached a link to the .fla file if anyone cared to take the time to download it and look at what I am talking about.
http://www.newgrounds.com/dump/item/b5489396b7cb18424ba55fc16731a600
Any help would be greatly appreciated.
(I also think I should mention that animation/actionscript is not required for this assignment or this class (its a graphics class), I just think it would look really cool and therefore want to learn how to make this work)
Copy link to clipboard
Copied
its your "fl_ClickToGoToAndPlayAtFrame" function says gotoAndPlay(34) which fires every time you click the arrow and jumps to frame 34 and plays. in frame 51 where your stop() function is you need to redefine the function again for a different action like
function fl_ClickToGoToAndPlayAtFrame(event:MouseEvent):void
{
gotoAndPlay(52);
}
I would look into using frame labels instead of frame numbers to make it easier to add or subtract pages without needing to reset the goto frame numbers.
Copy link to clipboard
Copied
Thanks for the quick reply.
So, just to clarify on what i want the buttons to do: I get that my "fl_ClickToGoToAndPlayAtFrame" function says gotoAndPlay(34), that is what I want it to do but once it gets to that frame and stops at frame 51 I need that same button to then, when clicked, go to and play frame 52, and so on to navigate to the other menus.
When you say I need to redefine the funtion again for a different action, what do you mean? What you posted after that appears to be the same as what I have been putting into the action box but once I add that it no longer recongizes any of the stop commands and it plays through the entire animation going from menu to menu without pausing, and then loops.
Copy link to clipboard
Copied
Well after playing around with it for the last couple days I finally erased all the action script that I had entered and used code snippets on everything, changing the frames accordingly and it works. So, thank you code snippets!
Copy link to clipboard
Copied
Oh glad you got it working i knew it would.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now