topical media & game development

talk show tell print

professional-flex-code-14-CustomCircle.ax

professional-flex-code-14-CustomCircle.ax [swf] flex


  package
  {
    import mx.core.UIComponent;
    
    [Style(name="borderColor",type="uint",format="Color",inherit="no")]
    [Style(name="fillColor",type="uint",format="Color",inherit="no")]
    public class @ax-professional-flex-code-14-CustomCircle extends UIComponent {
           
      public function @ax-professional-flex-code-14-CustomCircle(){
        super();
      } 
     
      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
        super.updateDisplayList(unscaledWidth, unscaledHeight);
        graphics.lineStyle(1, getStyle("borderColor"), 1.0); 
        graphics.beginFill(getStyle("fillColor"),1.0);
        graphics.drawEllipse(0,0,100,100);       
      }
    }
  }


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.