Hello,
I want to draw a simple circle behind my class both center aligned, but I’m getting problems with the coordenates of my class/movieclip.
Here is my class.
public class SM extends MovieClip {
public var auxx:Number;
public var auxy:Number;
public function SM() {
this.graphics.beginFill(0x000000);
this.graphics.drawRect(10,10,30,75);
this.addEventListener(MouseEvent.CLICK,on_Release);
}
private function on_Release(e:Event) {
auxx = this.x;
auxy = this.y;
MovieClip(root).graphics.beginFill(0xBBBBBB,0.3);
MovieClip(root).graphics.drawCircle(auxx,auxy,120);
}
}
And here is my main in frame 1 where I create the instance and put it in the place I want.
var sm1:SM = new SM(0);
addChild(sm1);
sm1.x = 100;
sm1.y = 50;
I think that my class/movieclip isn’t at (100,50) because when I manually substitute ‘auxx’ and ‘auxy’ in drawCircle for 100 and 50, still not ok.
Thanks in advance.