draw custom round rect border

Adobe Flash/ActionScript 3.0 2011. 2. 22. 15:56
반응형

package 
{
 import flash.display.Graphics;
 import flash.display.Shape;
 import flash.display.Sprite;
 
 /**
  * ...
  * @author jang sang wook ( smilejsu@nate.com )
  */
 public class ImagePanel extends Sprite
 {
  private var _g:Graphics;
  
  private var _border:Shape = new Shape;
  
  public function ImagePanel($width:Number, $height:Number, $color:uint, e)
  {
   
   _g = this.graphics;
   _g.beginFill(0xffffff);
   _g.drawRoundRect(0, 0, 300, 200, 5, 5);
   _g.endFill();
   
   _border.graphics.lineStyle(2, Math.random() * 0xffffff);
   _border.graphics.drawRoundRect(0, 0, 300, 200, 5, 5);
   this.addChild(_border);
   
  }
  
 }

}

 

반응형

'Adobe Flash > ActionScript 3.0' 카테고리의 다른 글

FlashDevelop + Molehill + Away3d_4.0.0  (0) 2011.03.10
ProportionalScale  (0) 2011.02.24
What is an ArrayCollection?  (0) 2011.02.22
MovieClip의 center point 와 Scale변경  (0) 2011.02.02
tabIndex  (0) 2011.01.17
: