# 1126: function does not have a body

**URL:** https://forum.kirupa.com/t/1126-function-does-not-have-a-body/253755
**Category:** flash
**Created:** [March 4, 2008, 8:45pm UTC](https://forum.kirupa.com/t/1126-function-does-not-have-a-body/253755 "2008-03-04T20:45:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![KimboRambo](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@KimboRambo](https://forum.kirupa.com/u/KimboRambo)
#### Post date: [March 4, 2008, 8:45pm UTC](https://forum.kirupa.com/t/1126-function-does-not-have-a-body/253755/1 "2008-03-04T20:45:22Z")

</div>

I’m stuck. I’m trying to make a movieclip (techHeavy) to appear on the screen, and then I want to be able to click on a position to make the movieclip move to that position.

But I can’t, flash keeps giving me the error: “1126: Function does not have a body.”, and even though this seems fairly straightforward I have no idea what to do. I’ve tried browsing the forums but since I haven’t found anything I posted this here, the cose is as follows:

```auto
package
{
    import flash.display.Sprite;  
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    import flash.events.Event;
    import flash.events.MouseEvent;
    
    {
        public class Dystopian extends Sprite
        {
            var aRightMedium:Object; //creates an object/variable
            var aRightHeavy:Object;        
            var aTechHeavy:Object;        
            
            public function Dystopian();
            {
            var targetX:Number = 0;
            var targetY:Number = 0;
            var Move:Boolean = false;
            
            aTechHeavy = new techHeavy();
            aRightHeavy = new rightHeavy();
            aRightMedium = new rightMedium();
            aTechHeavy.x = 200; //location
            aTechHeavy.y = 200;
            addChild(aTechHeavy);
            
            stage.addEventListener(MouseEvent.CLICK, placeActiveTank) //moves the movieclip to where I clicked the mouse
                            
            }
            private function placeActiveTank(event:Event):void; //The function that is called when I click the mouse
            {
                
            if(Move) //if Move == true, move the movieclip to where I clicked the mouse, also initiate the mc:s own animation
            {
                aTechHeavy.x = aTechHeavy.x + (targetX - aTechHeavy.x) /10
                aTechHeavy.y = aTechHeavy.y + (targetY - aTechHeavy.y) /10
                aTechHeavy.nextFrame(); //start animation
            }
            if (!Move)
            {
                aTechHeavy.gotoAndPlay(1);
            }
            if (aTechHeavy.hitTestPoint(targetX, targetY, true))
            {
            Move = false
            }
        }
            
            
        }
    }
}
        

```
