View Full Version : prevFrame help
teamhonda22
03-04-2004, 01:49 PM
I want to reverse an animation on the main timeline and I want to stop the reverse animation when it reaches a certain frame. Here is the code I use now, but it goes clear to the beginning. Any help would be much appreciated.
_root.onEnterFrame = function()
{
_root.prevFrame();
}
the reverse animation starts on frame 126 and I want it to stop at frame 51.
binkyboo
03-04-2004, 04:21 PM
MovieClip.prototype.PlayReverseFLimit = function(fLimit, bContinue) {
this.onEnterFrame = function() {
this.gotoAndStop(this._currentframe-1);
if (this._currentframe == fLimit) {
bContinue == true ? delete this.onEnterFrame && _parent.play() : delete this.onEnterFrame && this.stop();
}
};
};
On the button that'll reverse your movie clip place this;
on (release) {
// 5 represents the frame number you want to stop at
// MCname represents the clip you want to play in reverse
MCname.PlayReverseFLimit(5, true);
}
teamhonda22
03-04-2004, 06:02 PM
Thank you for the help, the code worked perfectly.......how on earth did you figure that out
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.