특별한딸기이야기

graphic 본문

딸기 공부방/flex

graphic

특별한녀석 2008. 12. 27. 01:17
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
 <mx:Script>
  <![CDATA[
   import mx.controls.Alert;
   
   private function draw() : void
   {
    var g : Graphics = imgDraw.graphics;
    
    g.beginFill(0xff00ff);
    g.lineStyle(5, 0x00ff00);
    g.drawCircle(20, 20, 20);
    g.moveTo(10, 10);
    g.lineTo(40, 60);
    g.endFill();
    
    g.beginFill(0x0000ff);
    g.drawRect(30, 40, 20, 20);
    g.endFill();
   }
  ]]>
 </mx:Script>
 <mx:Button x="161" y="204" label="Button" click="draw();" id="btnEnter" />
 <mx:Canvas x="60" y="34" width="249" height="141" id="imgDraw" />
</mx:Application>

'딸기 공부방 > flex' 카테고리의 다른 글

xml 통신  (0) 2008.12.27
http통신  (1) 2008.12.27
horizontallist, tilelist  (1) 2008.12.27
datagrid, advancedatagrid  (1) 2008.12.27
tree-xml  (1) 2008.12.27