0 Replies Latest reply on Dec 18, 2007 8:37 AM by doug31415

    flattened circles in drawing api

    doug31415
      Hi Guys

      When I use the drawing api to create circles, sometimes they appear flattened, as if the edges had been sliced off. Below is the code. Can anyone tell me how to fix this?

      // extends UIComponent
      public function CircleThing ()
      {
      super();

      mouseChildren = false;
      buttonMode = true;
      //resetCircle();
      base = new Sprite();

      baseOver = new Sprite();

      label = new TextField()

      label.autoSize = TextFieldAutoSize.LEFT;
      label.multiline = true;
      label.wordWrap = true;
      label.width = 108;
      label.x = -52;

      addChild(base);
      addChild(baseOver);
      addChild(label);

      addEventListeners();

      //label.border = true;
      //label.borderColor = 0xff0000;
      //addChild(label);
      //resetCircle();
      //addListeners();
      }

      // This function creates the blue circle
      public function drawCircle(_name:String=null):void
      {
      trace ('NavCircle drawCircle');

      var myFilters:Array = [new DropShadowFilter(5,135,0x000000,0.15,5,5)];
      //base.name = _name;
      base.graphics.clear();
      base.graphics.beginFill(_color, .9);
      base.graphics.drawCircle(0, 0, defaultDiameter/2);
      base.graphics.endFill();
      base.filters = myFilters;

      // added djg draw overCircle
      baseOver.graphics.clear();
      baseOver.graphics.beginFill(_overColor, 1);
      baseOver.graphics.drawCircle(0, 0, defaultDiameter/2);
      baseOver.graphics.endFill();
      baseOver.visible = false;
      }