# Please Help me on this simple codes

**URL:** <https://forum.kirupa.com/t/please-help-me-on-this-simple-codes/315700>\
**Category:** flash\
**Created:** [November 2, 2010, 8:55am UTC](https://forum.kirupa.com/t/please-help-me-on-this-simple-codes/315700 "2010-11-02T08:55:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoveTheresa](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@LoveTheresa](https://forum.kirupa.com/u/LoveTheresa)\
**Post date:** [November 2, 2010, 8:55am UTC](https://forum.kirupa.com/t/please-help-me-on-this-simple-codes/315700/1 "2010-11-02T08:55:04Z")

</div>

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?
