You should use the drag events for dragging, there is an example in the help
that shows how to work with dragging.

 

 

 

  _____  

Van: [email protected] [mailto:[EMAIL PROTECTED] Namens
ecpmaz
Verzonden: dinsdag 27 februari 2007 9:14
Aan: [email protected]
Onderwerp: [flexcoders] Drag is cancelling Click event

 

I have a component that is drag enabled, and I want him to be click
enabled also...
Unfortunately I am not able to catch any click event (or even
mouseUp)...

Do you have any ideas to solve this problem ?

<mx:Canvas
mouseDown="drag(event)"
mouseUp="click(event)"
>

<mx:Script>
<![CDATA[
[Bindable] public var color:uint = Constants.DEFAULT_COLOR;

private function click(e:MouseEvent):void {
// do my click things
}

private function drag(event:MouseEvent):void {
var ds:DragSource = new DragSource();
ds.addData(color, 'color');
DragManager.doDrag(this,ds,event);
}
]]>
</mx:Script>
</mx:Canvas>

{Maz}

 

Reply via email to