1. doesn't this script only rewind a movie clip and not the main timeline?
Yes. That is what I thought you wanted to do. :(
Just revamp it to look like:
code:
rewindButton.onPress = function() {
_root.onEnterFrame = function() {
_root.gotoAndStop(_currentframe-20);
};
};
rewindButton.onRollOut= function() {
_root.play();
};
2. does the script actually rewind or just skip to a frame 20 frames earlier?
No, it goes back 20 frames at the fps (frames per second) of the movie. The line where it says:
code:
_root.onEnterFrame=function(){
Makes it so the code following that occurs at the fps of the movie.
And do you want it to play onRollOut or onRelease? You can do both if you wish like this:
code:
rewindButton.onRelease= rewindButton.onRollOut=function(){
-Steve