View Full Version : Playing backwards
Pho-ku
03-23-2004, 05:57 PM
Ok, i got a object (a link), when i roll over it changes to another color, my problem is that i want it to go back to its orginal color when i roll out.
Is there a way to play the timeline backwards when i roll out or do i have to copy the frames and revert?'
/edit
Never mind.
on (rollOver) {
_root.fade = true;
}
on (rollOut, dragOut) {
_root.fade = false;
}
text_mc.onEnterFrame = function() {
if (fade) {
text_mc.nextFrame();
} else {
text_mc.prevFrame();
}
Did the job.
\edit
WiLLiaM the BlooDy
03-23-2004, 07:11 PM
I don`t think you can play the timeline backwards, you could always code the color change that rather then animating it if that`s what you prefer, but copying your frames onto another layer and just reverting the frames through the panel is preety quick and painless.
Although you have found a solution here is a helpful tip, as the question comes up every now and then :-)
You can in fact tell Flash to simply play the previous frame....and that every frame, which plays the timeline backwards.
this.onEnterFrame = function(){
this.prevFrame();
}
Replace this with either _root or the movieClip name.
Taff
WiLLiaM the BlooDy
03-24-2004, 03:11 PM
Good job Taff, I had completely forgotten about that. Thanks for the refresher. 8)
TheHazelOp1
06-14-2004, 02:05 PM
on the actions empty key frame
__________________________________________________ ____________________
A SIMPLE LITTLE PROTOTYPE FOR PLAYING ANY MC BACKWARDS. ONE THAT I
USE IN PRACTICALLY EVER PROJECT I DO...
************************************************** *******************/
movieclip.prototype.back = function() {
this.onEnterFrame = function() {
this.prevFrame();
// DELETES THE ENTERFRAME IF THE CLIP IS AT FRAME 1
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
};
};
//USAGE == yourMovieclip.back();
//ON A FRAME OR BUTTON OR VIA A SCRIPT.
on your button give the ascript
on(rollOver){
bar_mc.play();
line_mc.play()
}
on(rollOut){
bar_mc.back();
line_mc.back()
}
Neat script
Thanks for shareing.
Regards
NTD
Powered by vBulletin™ Version 4.1.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.