Navigating the timeline
Posted
by
Dean 'Deacon' Beard
on Stack Overflow
See other posts from Stack Overflow
or by Dean 'Deacon' Beard
Published on 2011-01-13T17:15:08Z
Indexed on
2011/01/13
22:53 UTC
Read the original article
Hit count: 203
flash
|actionscript-3
O.K, being a little new to this, I have hit a brick wall, I'm using AS3 in Flash CS5. All I want to do is have a tweened animation which stops at a frame and which has a clickable button to access another part of the maintime line. Also there will be a button on the animation to skip it. How does one set this up? Obviously you need a stop(); at the stop frame of the time line and an event listener and function for both buttons right? Any more help besides that. I have it set up like this;
totalSlides:Number = 60;
currentSlideNumber:Number = 1;
skipbutton.addEventListener(MouseEvent.CLICK,skipbuttonPress);
function skipbuttonPress(evt:MouseEvent):void{
currentframelabel = currentframelabel+1;
if(currentSlideNumber>=0){
currentframelabel = introstop;
}
framelabel.gotoAndStop(introstop);
}
and the frame it stops on is set up as follows
stop();
totalSlides:Number = 60;
currentSlideNumber:Number = 5;
click01.addEventListener(MouseEvent.CLICK,click01Press);
function click01Press( evt : MouseEvent ) : void {
currentSlideNumber = currentSlideNumber+1;
if (currentSlideNumber >= 0) {
currentSlideNumber = 25;
}
framelabel.gotoAndStop(mainpage);
}
As I need this for a project, any help would be greatly valued.
Many Thanks
© Stack Overflow or respective owner