Button rollovers

what code do i put if i want my layers frames to run through while the mouse is rolled over top of a button, but stop when the mouse is taken off the button?

ok i figured that one out, but how do i make the button make the layers frames run backwards instead of forwards? saying play makes it run thru the movie normally but i want it to run backwards!

I think (but don’t quote me on this) that you actually have to script it to play the frames in reverse. So you’ll tell it to go to frame 10, that frame will have a prevFrame() or something in it, then go back that way…

but if i say go to previous frame, it only goes to the immediate previous frame, and doesn’t run thru all the frames backwards until the mouse is taken off. so when this happens you have to keep wiggling your mouse over and off the button to make it to move to each previous frame individually. how can i make it run backwards continously while the mouse is over the button?

so at the moment my code for the button is

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

but it only does what i said it does above

Try using this:[AS]gotoAndStop(_currentframe-1);[/AS]
hope it helps! :slight_smile:

where in my script should i put that?

Sorry if I haven’t replied earlier…


on(rollOver){
gotoAndStop(_currentframe-1);
};

:slight_smile:

Pez, you can also use hitTest as well. I find it to be more sensitive to the mouse than using rollOver. Take a look at the example FLA I attached to this post, enjoy. =)

hi

this is very simple,

I can solver your problem.

I have done one sample swf for you, please download it and gothrought it. If it is clear, please mail me to bsprathapsimha@rediffmail.com, I will send you the code

bye,
Prathap