AS3 If statement
Hi
I have managed to get my timeline to play and pause at various points but I have created a review page, on this there are buttons which link to the start of the different sections. What I want to happen is if the scene has already been viewed, after it has been viewed, the user should be redirected to the review page.
This is my code which stops but does not redirect the user if they have already viewed the section.
stop();
var a:Number = 1;
play396_btn.addEventListener(MouseEvent.MOUSE_UP, goplay396, false, 0, true);
function goplay396(evt:MouseEvent):void{
if (a == 2) {
gotoAndPlay(1755);
}
else {
a=2;
play()
}
}