I must be doing something wrong. The movie plays but I seem to not goto where I want. This is the code in frame one of the movieclip.
Code:
// add event listener to next_btn
next_btn.addEventListener(MouseEvent.CLICK, skipToMyLou);
//skipToMyLou function -- This checks to see what frame label the
//timeline is on then gotoAndPlays a label based on the results.
function skipToMyLou(event:MouseEvent):void{
//if on label start goto label two
if (this.currentLabel == "start"){
this.gotoAndPlay("two");
}
//if on label loop goto label two
if (this.currentLabel == "loop"){
this.gotoAndPlay("two");
}
//if on label two goto label three
if (this.currentLabel == "two"){
this.gotoAndPlay("three");
}
//if on label three goto label four
if (this.currentLabel == "three"){
this.gotoAndPlay("four");
}
//if on label four goto label five
if (this.currentLabel == "four"){
this.gotoAndPlay("five");
}
//if on label five goto label six
if (this.currentLabel == "five"){
this.gotoAndPlay("six");
}
//if on label six goto label one
if (this.currentLabel == "six"){
this.gotoAndPlay("one");
}
}
I just figured it out. On the click it would just cycle through the timeline because of the order of the if statements. I reversed the order of the if statements and it works perfect. I'm sure there if a better way of doing this (do tell)... But I got it to work with the AS3 I know.