I am using the following code to perform a rewind on the timeline when a button is pressed:
** On the REWIND button:**
on(release){
rewState = true;
}
onClipEvent(load) {
rewFrames = 1;
}
onClipEvent(enterFrame) {
if(rewState) {
_root.emptyMCcontainer.gotoAndStop(_root.emptyMCcontainer._currentframe - rewFrames);
} else {
stop();
}
}
On the PLAY button:
on (release) {
_root.emptyMCcontainer.play();
_root.emptyMCcontainer.rewind_mc.rewState = false;
}
emptyMCcontainer is the current movie this is taking place in
rewind_mc is the rewind button
My question is, can I limit the rewind feature to just 12 frames at a time? Right now it rewinds back to the beginning, totally skipping all the stop(); commands on the timeline. I’ve tried for, do, and while loops in various places (one nearly froze my computer up!) with no luck. I’m pretty sure this is a simple thing, but I can’t figure it out.
update:
I’ve added the following to the code so the user can at least stop the rewinding:
on(rollOver){
rewState = true;
}
on(rollOut){
rewState = false;
}
but the thing moves forward in 12frame intervals. It is wierd having it move in reverse freely like this. So I am still looking for a way to get it to move the timeline backwards in 12 frame intervals…