PDA

View Full Version : Go To And Play... But in reverse


losse
07-18-2008, 03:29 AM
hi there
I have 2 buttons... one is simply a go to and play... where the user clicks and it starts playing a frame...

Just wondering if there is something like a go to and play "in reverse"..

For example... Say there is an animation from Frame 1 to Frame 10 and from Frame 11 to Frame 20.

When the animation starts it plays frame 1 to 10... then there's a button that when clicked, plays frame 11 to 20...

What I would like is a button that plays back frame 10 to 1.

ramm19
07-18-2008, 06:41 PM
Yeah... I never had the need for something like that, but it would go like this (AS2):



function goBack(){
if(_currentframe > 1){
_root.prevFrame();
}else{
delete this.onEnterFrame;
}
}

reverseButton.onRelease=function()
{
this.onEnterFrame = goBack;

}

playbutton.onRelease = function(){
play();
}