rollOver prevFrame

Hi, i’d like to scroll my movie back one frame on and on when the
mouse is over a button and stop only on mouseout. How can i achieve it?

This code:

on (rollOver) {
prevFrame();
}
on (rollOut) {
stop();
}

only moves back one frame and stops.

Thanks

Al

http://www.kirupaforum.com/showthread.php?s=&threadid=11427

*Originally posted by senocular *
**http://www.kirupaforum.com/showthread.php?s=&threadid=11427 **

Is there any other simpler way to do it?

i’ve used

on (rollOver) {
play();
}
on (rollOut) {
stop();
}

for the fwd motion, can anything similar be done for the backwards motion?

It doesn’t get any easier than what is in that thread.

Did you read page 3 in there? That is where the code is for what you are looking for (4th post from the bottom I believe).

You can also use hittest as an alternative, I also find it to be more sensitive to the mouse compared to using rollOvers. You can use a script like this:

 onClipEvent (enterFrame) {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
	_root.nextFrame();
 } else {
	_root.prevFrame();
 }
}

I also attached a sample file for you to see how this all works.

*Originally posted by electrongeek *
**I also attached a sample file for you to see how this all works. **

Thanks will give it a go

I was hoping there was a method without the use of MC.
The reason being i’ve created a historical timeline with no use of MC - probably not the best approach, in fact i am also wondering if anybody can shed some light on the best way to create one.

I’ve achieved the same effects as

http://www.pbs.org/wgbh/amex/telephone/timeline/f_timeline.html

by dividing the whole timeline into 32 chunks. Starting with the first keyframe i added the first chunk, then the second keyframe the 1st chunk slides from right to left and the gap caused by this movement is filled with the second chunk, and so on. The timeline effect is definitely there, and the buttons i use to go back and fwd work as they should by using

 on (release) { 
   nextFrame(); 
} 

and

 on (release) { 
   prevFrame(); 
} 

the problem appears when using invisible buttons on the timeline itself. It does work fine on the fwd effect as i am using

on (rollOver) { 
    play(); 
} 
on (rollOut) { 
   stop(); 
} 

but i find no way to use the same feature to go back …

Can anybody help, even it means recreating the timeline altogether?

Thanx

i think i may have found a way…

on (rollOver) {
    this.onEnterFrame = function() {
        prevFrame();
    }
}

on (rollOut) {
    this.onEnterFrame = null;
}

That is almost like the code I used in the forwards backwards thread, except I didn’t null the onEnterFrame, I deleted it.

on (rollOver) {
    this.onEnterFrame = function() {
        prevFrame();
    }
}

on (rollOut) {
    delete this.onEnterFrame
}