- Создать класс, производный от UIComponent
- Переопределить метод updateDisplayList () внутри вашего компонента и нарисовать круг
- Добавить экземпляр вашего компонента на панель;
Класс компонента:
class MyCircle extends UIComponent
{
public function MyCircle()
{
super();
}
override protected function updateDisplayList(width:Number, height:Number):void
{
super.updateDisplaylist(width,height);
this.graphics.clear();
this.graphics.beginFill(0xff0000);
this.graphics.drawCircle(width/2, height/2, Math.min(width/2,height/2));
}
}
Компонент панели:
<mx:Panel width = "400" height
= "400">
<local:MyCircle
width = "100%"
height = "100%"/>
</mx:Panel>