класс A:
[SWF(width='800',height='600',frameRate='24')]
public class A extends MovieClip {
private var b:B;
public function A(){
super();
b = new B();
addChild(b);
addEventListener(Event.ENTER_FRAME, update);
}
private function update(e:Event):void {
b.draw();
}
}
класс B:
public class B extends MovieClip {
public function draw():void {
//! following code works well if put in constructor, but not here
this.graphics.beginFill(0xff0000);
this.graphics.drawCircle(200,200,50);
}
}
вызовы this.graphics ничего не делают в методе draw, но прекрасно работают внутри конструктора B, что я и делаюне так?