flash actionscript:
Here's code that I just wrote today that works fine for my purposes:
on (press) {
here = _root.mc.q3movie._currentframe;
max = _root.mc.q3movie._totalframes;
jump = Math.round(max/_root.block);
if (here+jump<max){
_root.mc.q3movie.gotoAndPlay(here+jump);
}else{
_root.mc.q3movie.gotoAndPlay(max);
}
}
in my case, the movie being played is a couple of levels deep so that's why
there's the "_root.mc.q3movie." in front of the gotoandplay command.
that aside, you need to know where you're at (_currentframe) when the user
clicks the ff or rwd button. You then need to move the playhead by adding (fast
forward) or subtracting (rewind) and certain amount of frames to the current
position of the playhead.
The certain amount you choose is up to you. The variable "_root.block" above
is a percentage value that I define in the beginning of the project (10 for 10
percent) so I can adjust that if so desired. I then divide the length of the
movie (_totalframes) by that block value to come up with the amount I want to
move the playhead.
As you are adding or subtracting an amount to your current position, you need
to check if that math takes you beyond the timeline minimum and maximum and
adjust where you go if it does.
In summary, you need to know where you're at when the button is pressed, and
how far you want to go from that point, and then it's simply a case of
gotoandplay (plus or minus) where you're at.
hope this helps