PDA

View Full Version : Trying to use script to rewind movie clip??


Eddie_E
06-11-2008, 08:22 AM
Hi

Ive used this script before to rewind a movie clip but its not currently working for a different type of movie. what i have is a movie clip to first load the intro then another movie clip within this which is the button. Within the button movie clip 7 frames are used with individual images on each with the following script on the first frame:

stop();
this.onRollOver = function() {
rewind = false;
this.play();
};
this.onRollOut = function() {
rewind = true;
};
this.onDragOut = function() {
rewind = true;
};


then i have a stop(); on the 7th frame. If you look at the following link you will see clearer what I mean. I want the button to roll backwards when the curser moves off the link. Any reason why the code is not working??

http://be-graphics.com/sites/testing/nav/

Thank you

Ben

gnomeontherun
06-11-2008, 11:57 PM
There is no code here that tells Flash to play in reverse. Are you sure it worked before? It just sets a variable named rewind, and calls no other functions. You would need to write something that would make the frames rewind.

A simpler method would be to just make the animation in the timeline, and then have it this.gotoAndPlay(8); where it would start playing from frames 8-14 which are a reverse of the animation.

Eddie_E
06-12-2008, 01:38 AM
thx for input but I replaced the


this.onDragOut = function() {
rewind = true;
};



this.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
}
};


and works fine now :-)