0 Replies Latest reply on Jul 1, 2008 1:56 AM by philax

    Image control + rounded + border

    philax
      I have extended the image control to get it rounded with a border.In this code i get rounded images but no border.
      Any idea on what is missing? Or do you know any good tutorial about masking etc...
      Thanks

      Phil

      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
      {
      super.updateDisplayList(unscaledWidth, unscaledHeight);
      //BORDER PART
      graphics.beginFill(0x000000);
      graphics.drawRoundRectComplex(2, 2, unscaledWidth-4, unscaledHeight-4, cornerRad, cornerRad, cornerRad, cornerRad);
      graphics.endFill();

      //ROUND PART
      roundedMask.graphics.clear();
      roundedMask.graphics.beginFill(0x000000);
      roundedMask.graphics.drawRoundRectComplex(2, 2, unscaledWidth-4, unscaledHeight-4, cornerRad, cornerRad, cornerRad, cornerRad);
      roundedMask.graphics.endFill();
      this.mask = roundedMask;
      }