Question
Put a timer on a frame | Interval
Hi all,
I want to make something like this:

On internet I've found this Actionscript 3.0 code:
This is literally a little script that I have found on the Internet:
this.stop(); //zodat de stage op frame 1 blijft
var timer:Timer = new Timer(3000,1);//een timer aanmaken die 1x afgaat na 30 seconden
timer.addEventListener(TimerEvent.TIMER, timerHandler); //luisteren wanneer de timer afgaat
timer.start(); //de timer starten
function timerHandler(event:TimerEvent) //wat als timer afgaat?
{
if (this.currentFrame == 1) { //als huidig frame frame 1 is:
this.gotoAndStop(2); //naar frame 2 gaan
}
}
var timer:Timer = new Timer(3000,1);//een timer aanmaken die 1x afgaat na 30 seconden
timer.addEventListener(TimerEvent.TIMER, timerHandler); //luisteren wanneer de timer afgaat
timer.start(); //de timer starten
function timerHandler(event:TimerEvent) //wat als timer afgaat?
{
if (this.currentFrame == 1) { //als huidig frame frame 1 is:
this.gotoAndStop(2); //naar frame 2 gaan
}
}
So if I am on frame 1 that it automatically after 30 seconds goes to frame 2. I have also created buttons at the bottom, so it moves from frame 1, to 2, 3, etc. by clicking on it. How can I fix this?
Thanks
I am a novice with AS3 would like to make a similar something with 6 frames (something like the example image above)
In the above example stops the timer in frame 2 but what is the code to frame 3, 4, 5, and then start over at frame 1?
I hope somebody can help me!
