So I've had about 3 afternoons of actionscript 3 experience, so still trying to understand all the concepts, but here's a relatively simple (I'm assuming) issue that I don't quite get.
On the stage there is a movie clip called 'num' that has three frames in it, with the numbers 1, 2 and 3 drawn on each of them. There is also a button called 'nextbtn' that goes to the next frame (on the general timeline) on click. The functions regarding 'num' are:
function num2 (): void {
num.gotoAndStop(2);
}
function num3 (): void {
num.gotoAndStop(3);
}
On the second frame of the timeline is the code:
stage.addEventListener(Event.ENTER_FRAME, num2);
On the third frame
stage.addEventListener(Event.ENTER_FRAME, num3);
Here is what I don't get:
These two event listeners successfully change the number on screen, but If I use the same code on the fourth frame to go back to the number 2, nothing seems to happen, the number stays at 3 even though the frames are advancing.
I know this is an incredibly newbish way of phrasing what is probably an incredibly simple concept but I am a toddler when it comes to code, so...
Any help would be greatly appreciated, thanks!