1013: The private attribute may be used only on class property definitions.
In the following code I get an error. How to solve this?
| Line 30 | 1013: The private attribute may be used only on class property definitions. |
package
{
import flash.display.MovieClip;
import flash.events.Event;
public class Caesar extends MovieClip
{
var velocity:Number;
public function Caesar()
{
addEventListener("enterFrame"), move;
}
public function move(e:Event)
{
this.x = mouseX;
this.y = mouseY;
if (caesar.hitTestObject(MainClip.instance.enemyList))
{
trace ("caesar geraakt");
removeSelf();
MainClip.instance.finishedMainClip();
}
}
}
private function removeSelf():void
{
removeEventListener(Event.ENTER_FRAME, move);
if (stage.contains(this))
{
this.parent.removeChild(this);
}
}
}
