Issue with mouse_up and mouse_down actions
Hello,
I placed this code in the actionscript so i could drag and drop the mucles and place them into their targets. My issue is that once the mouse is down on the muscle "temporalis", the temporalis muscle lifts up but does not drop it when the mouse is up. I set functions for drop it and pick up when the mouse is down and when the mouse is up. Also I set the pick up to be true so the temporalis muscle is picked up from the middle, but it is not picking up from the middle. I dont see anything wrong with my code can someone please help? Here is the Code:
1 temporalis_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
2 temporalis_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
3
4 function pickUp(event:MouseEvent):void {
5 event.target.startDrag(true);
6 }
7 function dropIt(event:MouseEvent):void {
8 event.target.stopDrag();
9 }
10
11 temporalis_mc.buttonMode = true;
Thanks,
A Student.