Forward and previous buttons

i created a movie in that i placed 4 slides in a layer1 in frame 5,25,45,65,85.

i had created a movieclip a rectangle in shape whish is static in a layer2

on rollover the movieclip rectangle i placed 2 buttons one is “previous” button and another is “forward” button.

on running this i want the button operations like the following

  1. on clicking the “forward” button the the movie have to go to the slide 25.
  2. from there if we click the “forward” button it should go to 45and so on.

like this

  1. on clicking the “previous” button from the frame 45 it should go to the 25 frame of the movie and so on.

every thing is working but what the code i write in the button which is in the (rectangle shape)movie has taking the only one action. ie., when i write on(release){ _root.gotoandplay(“25”)}
it is globel to all position on the button.
so only this action can only is taking place.

so i want the action script to be global and as well as my above constrains should also satisfied.

for this what to do

pls help me out

from
aristotle

I would say to change your code on your forward button to _root.gotoAndPlay(_currentframe + 20). And then change it to - 20 for your back button. This would make it jump 20 frames from your current position. Does that help?

This is kinda obvious, but if you use gotoAndPlay(25) it’ll play until your next stop(); actions so, you forward button should be a little different than 20, but drclare is correct in using that command
[AS]
//forward button if your stop() actions are on 6,26,46,66,86
on(release){
_root.gotoAndPlay(_currentframe+1);
}
//back button
on(release){
_root.gotoAndPlay(_currentframe-39);
}
[/AS]
(-:

oh, oops. That’s a good point.

Hey, you got the concept!! Besides, Knowing is half the battle!! [SIZE=1]…little GIJOE allusion for you…[/SIZE]