I'm creating a learning application in Flash and am trying to figure out how to program a "back" button using ActionScript 3. I'm guessing that I need to set a variable to find the previous frame and then set an Event Listener to listen for the back button, but I don't know how to program the variable to find the previous frame, especially since the frames won't necessarily be in numerical order. Is there some function that will do that, or how should I set the variable for this case?
A:
You can use a stack (or a simple var) to track the changes of the frames. Every time you enter a frame, push thatframe label in the stack; so wou'll have 'back' function and if you need, even breadcrumbs
kajyr
2009-10-28 09:08:16
How do I use a stack?
jar238
2009-10-28 16:56:19
http://en.wikipedia.org/wiki/Stack_%28data_structure%29
kajyr
2009-10-28 19:55:30