Scrubber problems

Hey guys. I’ve been following the video/flv player tutorials on but I’m having a bit of trouble with the scrub bar? Basically once I click on it and drag it to the desired location instead of “scrubbing” through the keyframes it pauses the video and once I let go, goes straight back to the beginning? Here’s the code I’m using:


var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;

ns[“onMetaData”] = function(obj)
duration = obj.duration;

function videoStatus()
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 338;
loader.scrub._x = ns.time / duration * 338;

var scrubInterval;

loader.scrub.onPress = function()
scrubInterval = setInterval(scrubit,10);

loader.scrub.onRelease = loader.scrub.onReleaseOutside = function()
videoInterval = setInterval(videoStatus,100);

function scrubit()
{ * duration);

If anyone has any advice it would be much appreciated.
I’m using Flash CS3 with AS 2 btw.

Thank you.