I have loadbar with scrub point that I want to drag within loadbar
It works fine with onPress and onRelease events in AS2
I try to convert that in AS3 and use Mouse Down and Mouse Up events.
It starts to drag well with Mouse Down but not always stops with Mouse
Up. Sometimes that happened sometimes not. This event not always
appears. How to get it works stable in AS3.
var loadBar_w:Number=loader.loadBar.width;
startScrubIt=function(e:MouseEvent):void{
var loaderRect:Rectangle = new
Rectangle(0,loader.scrub.y,loadBar_w,loader.scrub.y);
loader.scrub.startDrag(false,loaderRect);
loader.scrub.addEventListener( MouseEvent.MOUSE_MOVE, handleDrag )
}
stopScrubIt=function(e:MouseEvent):void{
loader.scrub.stopDrag();
loader.scrub.removeEventListener( MouseEvent.MOUSE_MOVE, handleDrag );
}
handleDrag= function ( event:MouseEvent ):void {
event.updateAfterEvent();
}
loader.scrub.addEventListener(MouseEvent.MOUSE_DOWN, startScrubIt );
loader.scrub.addEventListener(MouseEvent.MOUSE_UP, stopScrubIt);
Thank you in advance for any help.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders