Line provides a Tweenable line 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
protected var _ex:Number
ex:Number
[read-write]
Return the end x pos.
Implementation
public function get ex():Number
public function set ex(value:Number):void
protected var _ey:Number
ey:Number
[read-write]
Return the end y pos.
Implementation
public function get ey():Number
public function set ey(value:Number):void
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
public function Line(startX:Number, startY:Number, endX:Number, endY:Number, thickness:Number, color:uint, alpha:Number, pixelHinting:Boolean, scaleMode:String, caps:String = null, joints:String, miterLimit:Number)
Line Constructor
Parameters
| startX:Number |
|
| startY:Number |
|
| endX:Number |
|
| endY:Number |
|
| thickness:Number |
|
| color:uint |
|
| alpha:Number |
|
| pixelHinting:Boolean |
|
| scaleMode:String |
|
| caps:String (default = null )
|
|
| joints:String |
|
| miterLimit:Number |
Example
var line:Line = new Line(0, 0, 100, 100, 1, 0xff00ff);
addChild(line);
Tweener.addTween(line, {sx:50, sy:350, ex:700, ey:350, color:0xffff00, time:5, transition:"easeInOutQuart", onUpdate:renderLine});
Tweener.addTween(line, {sx:850, sy:50, ex:950, ey:0, color:0xffffff, time:5, delay:5, transition:"easeInQuart", onUpdate:renderLine});
function renderLine():void {
line.draw(); // add to the existing drawing
//line.redraw(); // clear the drawing and 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.