Packagesekati.draw
Classpublic class Rect
InheritanceRect Inheritance flash.display.Shape
ImplementsITweenableDrawing

Rect provides a Tweenable rectangle Shape.



Public Properties
 PropertyDefined by
  color : uint
Return the color.
Rect
  h : Number
Return the height.
Rect
  sx : Number
Return the start x pos.
Rect
  sy : Number
Return the start y pos.
Rect
  thickness : uint
Return the thickness.
Rect
  w : Number
Return the width.
Rect
Protected Properties
 PropertyDefined by
  _alpha : Number
Rect
  _caps : String
Rect
  _color : uint
Rect
  _height : Number
Rect
  _joints : String
Rect
  _miterLimit : Number
Rect
  _pixelHinting : Boolean
Rect
  _scaleMode : String
Rect
  _sx : Number
Rect
  _sy : Number
Rect
  _thickness : Number
Rect
  _width : Number
Rect
Public Methods
 MethodDefined by
  
Rect(width:Number, height:Number, startX:Number = 0, startY:Number = 0, thickness:Number, color:uint, alpha:Number, pixelHinting:Boolean, scaleMode:String, caps:String, joints:String, miterLimit:Number)
Rect Constructor
Rect
  
clear():void
Clear the drawn graphics Shape.
Rect
  
draw():void
Draw in to the graphics Shape.
Rect
  
redraw():void
Clear & draw in to the graphics Shape.
Rect
Public Constants
 ConstantDefined by
  ALPHA : Number = 1
[static]
Rect
  CAPS : String = "square"
[static]
Rect
  COLOR : uint = 0x000000
[static]
Rect
  HINTING : Boolean = true
[static]
Rect
  JOINTS : String = "miter"
[static]
Rect
  MITER_LIMIT : Number = 3
[static]
Rect
  SCALE_MODE : String = "none"
[static]
Rect
  THICKNESS : Number = 1
[static] I know this is BS but compiler bug in mxmlc prevents proper compilation.
Rect
Property detail
_alphaproperty
protected var _alpha:Number
_capsproperty 
protected var _caps:String
_colorproperty 
protected var _color:uint
colorproperty 
color:uint  [read-write]

Return the color.

Implementation
    public function get color():uint
    public function set color(value:uint):void
hproperty 
h:Number  [read-write]

Return the height.

Implementation
    public function get h():Number
    public function set h(value:Number):void
_heightproperty 
protected var _height:Number
_jointsproperty 
protected var _joints:String
_miterLimitproperty 
protected var _miterLimit:Number
_pixelHintingproperty 
protected var _pixelHinting:Boolean
_scaleModeproperty 
protected var _scaleMode:String
_sxproperty 
protected var _sx:Number
sxproperty 
sx:Number  [read-write]

Return the start x pos.

Implementation
    public function get sx():Number
    public function set sx(value:Number):void
_syproperty 
protected var _sy:Number
syproperty 
sy:Number  [read-write]

Return the start y pos.

Implementation
    public function get sy():Number
    public function set sy(value:Number):void
_thicknessproperty 
protected var _thickness:Number
thicknessproperty 
thickness:uint  [read-write]

Return the thickness.

Implementation
    public function get thickness():uint
    public function set thickness(value:uint):void
wproperty 
w:Number  [read-write]

Return the width.

Implementation
    public function get w():Number
    public function set w(value:Number):void
_widthproperty 
protected var _width:Number
Constructor detail
Rect()constructor
public function Rect(width:Number, height:Number, startX:Number = 0, startY:Number = 0, thickness:Number, color:uint, alpha:Number, pixelHinting:Boolean, scaleMode:String, caps:String, joints:String, miterLimit:Number)

Rect Constructor

Parameters
width:Number
 
height:Number
 
startX:Number (default = 0)
 
startY:Number (default = 0)
 
thickness:Number
 
color:uint
 
alpha:Number
 
pixelHinting:Boolean
 
scaleMode:String
 
caps:String
 
joints:String
 
miterLimit:Number

Example
   var rect:Rect = new Rect(300, 100, 50,50, 1, 0xffff00);
   addChild(rect);
   Tweener.addTween(rect, {sx:750, sy:0, w:300, h:30, color:0xffccee, alpha:0.25, thickness:5, transition:"easeOutQuad", time:5, onUpdate:renderRect});
   function renderRect():void {
    rect.redraw();
   }
   

Method detail
clear()method
public function clear():void

Clear the drawn graphics Shape.

draw()method 
public function draw():void

Draw in to the graphics Shape.

redraw()method 
public function redraw():void

Clear & draw in to the graphics Shape.

Constant detail
ALPHAconstant
public static const ALPHA:Number = 1
CAPSconstant 
public static const CAPS:String = "square"
COLORconstant 
public static const COLOR:uint = 0x000000
HINTINGconstant 
public static const HINTING:Boolean = true
JOINTSconstant 
public static const JOINTS:String = "miter"
MITER_LIMITconstant 
public static const MITER_LIMIT:Number = 3
SCALE_MODEconstant 
public static const SCALE_MODE:String = "none"
THICKNESSconstant 
public static const THICKNESS:Number = 1

I know this is BS but compiler bug in mxmlc prevents proper compilation.

See also