I'm using flex sdk and trying to draw primitive geometry figures, what is wrong in following code? i tried without the trigger(placing) of button, but did not work.
<mx:Script>
import flash.display.Sprite;
import flash.display.Shape;
private function draw_circle():void
{
var myCircle:Shape = new Shape();
myCircle.graphics.beginFill(0x00000, 1);
myCircle.graphics.drawCircle(0, 0, 30);
addChild(myCircle);
}
</mx:Script>
<mx:Button x="30" y="0" name="circle" click= '{draw_circle()}'>
</mx:Button>