Drag and Drop (simple)
Hi guys
I'm trying to make a simple drag and drop game. I've named the movie clip in the properties window as "eye" and have written the following code in the frame.
I can pick up the movie clip, but not put it down. Can someone please help me? ![]()
I've attached the file: http://www.flashadvisor.com/forum/attachment.php?attachmentid=255&d=1285202999
Any help you can give to help me solve this will be much appreciated by me and a couple of hundred students i teach ![]()
Thanks
m
------------------------------------------------------------------------------------------------------------------------------------------------------------
AS3
eye.addEventListener(MouseEvent.MOUSE_DOWN, pick_up);
eye.addEventListener(MouseEvent.MOUSE_UP, put_down);
function pick_up(event:MouseEvent): void {
trace("pick up ");
event.target.startDrag(true);
}
function put_down (event:MouseEvent): void {
trace("downdowndowndown");
event.target.stopDrag();
}
eye.buttonMode = true;
------------------------------------------------------------------------------------------------------------------------------------------------------------