Rect provides a Tweenable rectangle Shape.
protected var _alpha:Number
protected var _caps:String
protected var _color:uint
color:uint
[read-write]
Return the color.
Implementation
public function get color():uint
public function set color(value:uint):void
h:Number
[read-write]
Return the height.
Implementation
public function get h():Number
public function set h(value:Number):void
protected var _height:Number
protected var _joints:String
protected var _miterLimit:Number
protected var _pixelHinting:Boolean
protected var _scaleMode:String
protected var _sx:Number
sx:Number
[read-write]
Return the start x pos.
Implementation
public function get sx():Number
public function set sx(value:Number):void
protected var _sy:Number
sy:Number
[read-write]
Return the start y pos.
Implementation
public function get sy():Number
public function set sy(value:Number):void
protected var _thickness:Number
thickness:uint
[read-write]
Return the thickness.
Implementation
public function get thickness():uint
public function set thickness(value:uint):void
w:Number
[read-write]
Return the width.
Implementation
public function get w():Number
public function set w(value:Number):void
protected var _width:Number
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();
}
public function clear():void
Clear the drawn graphics Shape.
public function draw():void
Draw in to the graphics Shape.
public function redraw():void
Clear & draw in to the graphics Shape.
public static const ALPHA:Number = 1
public static const CAPS:String = "square"
public static const COLOR:uint = 0x000000
public static const HINTING:Boolean = true
public static const JOINTS:String = "miter"
public static const MITER_LIMIT:Number = 3
public static const SCALE_MODE:String = "none"
public static const THICKNESS:Number = 1
I know this is BS but compiler bug in mxmlc prevents proper compilation.
See also
Copyright © 2008-2012 jason m horwitz, Sekati LLC. All Rights Reserved.