I'm making a website and I want to make a time delay between 16 pages, I've done this:
var myDelay:Timer = new Timer(700,1);
myDelay.addEventListener(TimerEvent.TIMER, showMessage);
myDelay.start();
function showMessage(event:TimerEvent):void{
gotoAndPlay("anim1");
}
stop();
Then In page anim1 I have:
stop();
b4.addEventListener(MouseEvent.ROLL_OVER, b4_over);
b4.addEventListener(MouseEvent.CLICK, b4_clicked);
ma.addEventListener(MouseEvent.ROLL_OVER, ma_over);
ma.addEventListener(MouseEvent.CLICK, ma_clicked);
pt1.addEventListener(MouseEvent.MOUSE_OVER, pt1_over);
en.addEventListener(MouseEvent.MOUSE_OVER, en_over);
var myDelay2:Timer = new Timer(700,1);
myDelay2.addEventListener(TimerEvent.TIMER, showMessage2);
myDelay2.start();
function showMessage2(event:TimerEvent):void{
gotoAndPlay("anim2");
}
stop();
And this continues until page "anim19". The problem is that with this my click buttons don't work very well (I click, then I go to another page and suddenly goes back to the main page) and with the ROLL_OVER effect time becomes a litle weird... Can you tell me what's wrong with my code?