Groups | Blog | Home
all groups > flash actionscript > november 2005 >

flash actionscript : repeating ns.seek



rocknrolljunky
11/12/2005 7:17:40 PM
I'm trying to repeat the following function to make a "rewind" button for a
video player.

rewindButton.onRelease = function() {
ns.seek(ns.time - 1);
}

I'm still pretty new to Flash and ActionScript, and have tried setInterval and
loops and god knows what else without anything that will work.

Any help with this issue will be greatly appreciated.

Thanks
Scott
kglad
11/12/2005 8:43:49 PM
rocknrolljunky
11/12/2005 11:03:31 PM
Yes. I have embeded a FLV in my player and the code I have attached to my
rewindButton works fine but only on each press. I want the function to repeat
while you are pressing the rewindButton to make it look like it's progressivley
rewinding the video clip.
kglad
11/12/2005 11:09:18 PM
rewindButton.onPress = function() {
ns.seek(ns.time - 1);
rewindI=setInterval(rewindF,50);
}
rewindButton.onRelease=rewindButton.onReleaseOutside = function() {
clearInterval(rewindI);
}
function rewindF(){
ns.seek(ns.time - 1);
}
rocknrolljunky
11/12/2005 11:11:55 PM
AddThis Social Bookmark Button