There’s already a question on this, but it doesn’t exactly answer my question, as I’m very new to flash. When I compile my code, it gives me an error on line 69+74, on the ‘p’ in the two ‘private’s.
here’s the code:
private function destroyMouseJoint(e:MouseEvent):void
{
hand.active = false;
}
private function spawnBox():void
{
var block:Polygon = new Polygon(Polygon.box(50, 50));
var body:Body = new Body(BodyType.DYNAMIC);
body.shapes.add(block);
body.position.setxy(stage.stageWidth /2, stage.height / 2);
body.space = space;
}
I’m not sure what I’m supposed to do. Thanks in advance 🙂
It seems you might be putting you function outside the class definition. Make sure they are in something like the following: