el error:
TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
La funcion que lo llama en la clase principal
Código PHP:
public function mueveCurva(evt:MouseEvent):void {
trace(evt.target.parent.name); //---- aca me da el nombre del objecto que paso por arriba
/*var Obj:Object = evt.target.parent.child(point1);
Obj.startDrag();*/
(parent as Object).point1.startDrag();
//evt.target.startDrag();
drawLine(new Event(Event.ENTER_FRAME));
addEventListener(MouseEvent.MOUSE_UP, finmueveCurva);
}
Código PHP:
public function PencilPoint(_x:Number=0, _y:Number=0) {
super();
anchorPoint = new Point(_x,_y,4,0xFFFF00);
anchorPoint.name = "anchor";
addChild(anchorPoint);
anchorPoint.addEventListener(MouseEvent.MOUSE_DOWN,startMove);
anchorPoint.addEventListener(MouseEvent.MOUSE_UP,stopMove);
controlPoint1 = new Point(_x,_y);
controlPoint1.name = "point1";
addChild(controlPoint1);
controlPoint1.addEventListener(MouseEvent.MOUSE_DOWN,startMove);
controlPoint1.addEventListener(MouseEvent.MOUSE_UP,stopMove);
controlPoint2 = new Point(_x,_y);
controlPoint2.name = "point2";
addChild(controlPoint2);
controlPoint2.addEventListener(MouseEvent.MOUSE_DOWN,startMove);
controlPoint2.addEventListener(MouseEvent.MOUSE_UP,stopMove);
}