I have made a slide bar (named slider) in a flash movie, and i have a movieclip (named runMe which is 5 frames long), i want to use my slide bar to tell the movie clip what frame to be on. So basicly when the slider is on the far left and then as u move it it advances frame by frame till its as far as it can go to the right, at wich point runMe will be at frame 5.
The code i have used(on the first frame of the movie) so far is:
mouseIsDown = false;
slider.onMouseDown = function() {
if(this.hitTest(_xmouse, _ymouse)){
startDrag(this, false, 0,0,550,0);
mouseIsDown = true;
}
}
slider.onEnterFrame = function() {
if(mouseIsDown){
this.runMe.gotoAndStop(Math.floor(this._x *(this.runMe._currentframe/this.runMe._totalframes)));
}
}
slider.onMouseUp = function(){
this.stopDrag();
mouseIsDown = false;
}
I have been playing for hrs, and dont seem to be making any progres, any help would be great.
Thanks
Rick