| Package | net.flashpunk.tweens.misc |
| Class | public class ColorTween |
| Inheritance | ColorTween Tween Object |
| Property | Defined By | ||
|---|---|---|---|
![]() | active : Boolean
If the tween should update. | Tween | |
| alpha : Number = 1
The current alpha. | ColorTween | ||
| blue : uint [read-only]
Blue value of the current color, from 0 to 255. | ColorTween | ||
| color : uint
The current color. | ColorTween | ||
![]() | complete : Function
Tween completion callback. | Tween | |
![]() | delay : Number = 0
Length of time to wait before starting this tween. | Tween | |
| green : uint [read-only]
Green value of the current color, from 0 to 255. | ColorTween | ||
![]() | percent : Number
The completion percentage of the Tween. | Tween | |
| red : uint [read-only]
Red value of the current color, from 0 to 255. | ColorTween | ||
![]() | scale : Number [read-only]
The current time scale of the Tween (after easer has been applied). | Tween | |
| Method | Defined By | ||
|---|---|---|---|
ColorTween(complete:Function = null, type:uint = 0)
Constructor. | ColorTween | ||
![]() | cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback. | Tween | |
![]() | start():void
Starts the Tween, or restarts it if it's currently running. | Tween | |
tween(duration:Number, fromColor:uint, toColor:uint, fromAlpha:Number = 1, toAlpha:Number = 1, ease:Function = null):void
Tweens the color to a new color and an alpha to a new alpha. | ColorTween | ||
![]() | update():void
Updates the Tween, called by World. | Tween | |
| alpha | property |
public var alpha:Number = 1The current alpha.
| blue | property |
blue:uint [read-only] Blue value of the current color, from 0 to 255.
public function get blue():uint| color | property |
public var color:uintThe current color.
| green | property |
green:uint [read-only] Green value of the current color, from 0 to 255.
public function get green():uint| red | property |
red:uint [read-only] Red value of the current color, from 0 to 255.
public function get red():uint| ColorTween | () | Constructor |
public function ColorTween(complete:Function = null, type:uint = 0)Constructor.
Parameterscomplete:Function (default = null) — Optional completion callback.
| |
type:uint (default = 0) — Tween type.
|
| tween | () | method |
public function tween(duration:Number, fromColor:uint, toColor:uint, fromAlpha:Number = 1, toAlpha:Number = 1, ease:Function = null):voidTweens the color to a new color and an alpha to a new alpha.
Parameters
duration:Number — Duration of the tween.
| |
fromColor:uint — Start color.
| |
toColor:uint — End color.
| |
fromAlpha:Number (default = 1) — Start alpha
| |
toAlpha:Number (default = 1) — End alpha.
| |
ease:Function (default = null) — Optional easer function.
|