I just started to learn AS3, and I’m trying to do some simple function such as the drag and drop, below is my code:
box_mc.addEventListener (MouseEvent.MOUSE_DOWN, drag);
box_mc.addEventListener (MouseEvent.MOUSE_UP, drop);
function drag (e:MouseEvent):void;
{
box_mc.startDrag();
}
function drop (e:MouseEvent):void;
{
box_mc.stopDrag();
}
i created a box on the stage and convert it to movie clip already, but my code simply just doesn’t work, can anyone tell me why?
and here’s the error message: 1126: Function does not have a body.
and here’s the 2 source : function drag (e:MouseEvent):void;
function drop (e:MouseEvent):void;
can anyone tell me what is the problem here? and why?