| Package | pegas.transitions |
| Class | public class EasingController |
Example :
import pegas.transitions.easing.; import pegas.transitions.EasingController ; import pegas.transitions.Tween ; var controller:EasingController = new EasingController() ; controller.insert( "elastic_ease_out" , Elastic.easeOut ) ; controller.insert( "elastic_ease_in" , Elastic.easeIn ) ; // in the code var easing:Function = controller.getEasing( "elastic_ease_out" ) ; var tw:Tween = new Tween( mc, "_x" , easing, mc._x, 500, 24 , false, true) ; // mc a display on the root.
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new EasingController instance.
| EasingController | ||
|
clear():void
Removes all elements in this controller.
| EasingController | ||
|
contains(id:String):Boolean
Returns
true if the id passed in argument is registered in the EasingController. | EasingController | ||
|
getEasing(id:String, defaultEasing:Function = null):Function
Returns a easing method register in the EasingController with the specified
id passed in argument. | EasingController | ||
|
[static]
Returns the singleton instance of EasingController.
| EasingController | ||
|
insert(id:String, easingMethod:Function):void
Adds a new entry into the EasingController.
| EasingController | ||
|
remove(id:String):void
Remove an entry into the EasingController.
| EasingController | ||
|
size():Number
Returns the number of elements in the EasingController.
| EasingController | ||
| EasingController | () | constructor |
public function EasingController()Creates a new EasingController instance.
Usage :
var ec:EasingController = new EasingController() ;
| clear | () | method |
public function clear():voidRemoves all elements in this controller.
| contains | () | method |
public function contains(id:String):Boolean
Returns true if the id passed in argument is registered in the EasingController.
id:String — the id of the easing method mapped in the EasingController.
|
Boolean — true if the id passed in argument is registered in the EasingController.
|
| getEasing | () | method |
public function getEasing(id:String, defaultEasing:Function = null):Function
Returns a easing method register in the EasingController with the specified id passed in argument.
If the id isn't find in the controller, this method return a Regular.easeOut function.
id:String — id the id of the easing method mapped in the EasingController.
|
|
defaultEasing:Function (default = null) |
Function — the easing method mapped in the EasingController.
|
| getInstance | () | method |
public static function getInstance():EasingControllerReturns the singleton instance of EasingController.
ReturnsEasingController —
singleton instance of EasingController.
|
| insert | () | method |
public function insert(id:String, easingMethod:Function):voidAdds a new entry into the EasingController.
Parametersid:String — the id of the easing method mapped in the EasingController.
|
|
easingMethod:Function — the function to register in the EasingController.
|
| remove | () | method |
public function remove(id:String):voidRemove an entry into the EasingController.
Parametersid:String — the name of the easing method mapped in the EasingController.
|
| size | () | method |
public function size():NumberReturns the number of elements in the EasingController.
ReturnsNumber — the number of elements in the EasingController.
|