-
movieclip resume after scrubber (slider) use
Hi everyone, i have this problem and i just cant seem to find what is wrong with my code. I have build a project where i have a slider that controls the main timeline, to scroll through my movie, but after i pull it (which works fine) the timeline stops, and i cant get it to resume. Here is my code
Code:
slider_mc.knob_mc.addEventListener(MouseEvent.MOUSE_DOWN, onDragKnob);
stage.addEventListener(MouseEvent.MOUSE_UP, onReleaseKnob);
slider_mc.knob_mc.buttonMode=true;
function onDragKnob(myEvent:Event):void {
slider_mc.knob_mc.startDrag(false, new Rectangle(0,0,175,0));
slider_mc.knob_mc.addEventListener(Event.ENTER_FRAME, onScrubMovie);
}
function onReleaseKnob(myEvent:Event):void {
slider_mc.knob_mc.stopDrag();
slider_mc.knob_mc.addEventListener(Event.ENTER_FRAME, onPlay);
//gotoAndPlay(1);
//play();
}
function onScrubMovie(myEvent:Event):void {
var playHead:int=Math.round((slider_mc.knob_mc.x/175*this.totalFrames)+1);
gotoAndStop(playHead);
trace (playHead);
}
function onPlay(myEvent:Event):void {
play();
}
Im not that sharp with as3, so i hope you can tell me why the movie wont resume
You can download my project here:
http://bindslevdesigns.com/untitled2.fla
For some reason my ie thinks its a zip, in firefox the link works fine
You can also just download it with ie and rename the file extencion to .fla
Last edited by Lars!; 02-17-2011 at 04:12 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|