problem with scrubber - crazy jumping around!
hi guys
have followed a tutorial on www.gotoandlearn.com to make a video player and have come to a problem with the scrubber. i followed the lesson and the scrubber works fine without the code that makes it draggable - it indicates where the video is up to. but when i put the last bit of code in, namely:
Code:
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit,10);
this.startDrag(false,0,this._y,207,this._y);
}
loader.scrub.onRelease = loader.scrub.onReleaseOutside = function() {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus,100);
this.stopDrag;
}
function scrubit() {
ns.seek(Math.floor((loader.scrub._x/207)*duration));
}
the scrubber is draggable and works, but when i release it it jumps about wildly, sort of following the mouse movement, certainly jumping about when i move the mouse. it has also disabled my play/pause button for some reason! any clues to what's wrong with the code?
thanks!!
emma.