
I’m quite new to actionscrip 3.0.
I have a sprite wich I can be draged and drop. But, I also want to be able to just click on it. But when i Drag and Drop it, Click is called when I release the mouse button.
I would like to find a way to avoid calling click when I drop my sprite. Click should only be called when I actualy click on it.
I hope I’m not the only one who have experienced the same problem.
//}{ermanssoN
m_Sprite.addEventListener( MouseEvent.MOUSE_DOWN, StartDrag);
m_Sprite.addEventListener( MouseEvent.MOUSE_UP, StopDrag);
private function StartDrag( event:MouseEvent )
{
trace ("Start Drag");
m_Sprite.startDrag();
}
private function StopDrag( event:MouseEvent )
{
//My click function get called when this function is called
trace ("StopDrag");
m_Sprite.stopDrag();
}
If you would like to make a comment, please fill out the form below.
Recent Comments