i found a tech note on macromedia about creating a back button within flash, and using an array to “remember” your history. it works really well, but my question is, how would one alter it to add a forward button.
here is the code from the tech document.
http://www.macromedia.com/support/flash/ts/documents/swf_back_button.htm
in my project, let’s say i have 4 keyframes on the main timeline. on the first frame, this code appears:
navStack = [];
on the next 3 frames, this code appears:
navStack.push(_currentFrame);
on the stage there is a button with this code on it.
on (release) {
if (_root.navStack.length > 1) {
recentFrame = _root.navStack.pop();
previousFrame = _root.navStack.pop();
goToAndPlay(previousFrame);
trace(navStack);
}
}
i’ve added the trace and you can see how it works. pretty slick. i’d like to add a forward button. anyone have any examples or thoughts on how to approach this.
thanks.