GODPAPER | All Packages | All Classes | Index | Frames No Frames |
Transitions

Package | starling.animation
Class | public class Transitions
Inheritance | Transitions Object

The Transitions class contains static methods that define easing functions. Those functions are used by the Tween class to execute animations.

Here is a visual representation of the available transitions:

You can define your own transitions through the "registerTransition" function. A transition function must have the following signature, where `ratio` is in the range 0-1:

    function myTransition(ratio:Number):Number

Public Methods

| Method | Defined By
--- | --- | ---
|  | getTransition(name:String):Function [static] Returns the transition function that was registered under a certain name. | Transitions
|  | register(name:String, func:Function):void [static] Registers a new transition function under a certain name. | Transitions

Protected Methods

| Method | Defined By
--- | --- | ---
|  | easeCombined(startFunc:Function, endFunc:Function, ratio:Number):Number [static] | Transitions
|  | easeIn(ratio:Number):Number [static] | Transitions
|  | easeInBack(ratio:Number):Number [static] | Transitions
|  | easeInBounce(ratio:Number):Number [static] | Transitions
|  | easeInElastic(ratio:Number):Number [static] | Transitions
|  | easeInOut(ratio:Number):Number [static] | Transitions
|  | easeInOutBack(ratio:Number):Number [static] | Transitions
|  | easeInOutBounce(ratio:Number):Number [static] | Transitions
|  | easeInOutElastic(ratio:Number):Number [static] | Transitions
|  | easeOut(ratio:Number):Number [static] | Transitions
|  | easeOutBack(ratio:Number):Number [static] | Transitions
|  | easeOutBounce(ratio:Number):Number [static] | Transitions
|  | easeOutElastic(ratio:Number):Number [static] | Transitions
|  | easeOutIn(ratio:Number):Number [static] | Transitions
|  | easeOutInBack(ratio:Number):Number [static] | Transitions
|  | easeOutInBounce(ratio:Number):Number [static] | Transitions
|  | easeOutInElastic(ratio:Number):Number [static] | Transitions
|  | linear(ratio:Number):Number [static] | Transitions

Public Constants

| Constant | Defined By
--- | --- | ---
|  | EASE_IN : String = easeIn [static] | Transitions
|  | EASE_IN_BACK : String = easeInBack [static] | Transitions
|  | EASE_IN_BOUNCE : String = easeInBounce [static] | Transitions
|  | EASE_IN_ELASTIC : String = easeInElastic [static] | Transitions
|  | EASE_IN_OUT : String = easeInOut [static] | Transitions
|  | EASE_IN_OUT_BACK : String = easeInOutBack [static] | Transitions
|  | EASE_IN_OUT_BOUNCE : String = easeInOutBounce [static] | Transitions
|  | EASE_IN_OUT_ELASTIC : String = easeInOutElastic [static] | Transitions
|  | EASE_OUT : String = easeOut [static] | Transitions
|  | EASE_OUT_BACK : String = easeOutBack [static] | Transitions
|  | EASE_OUT_BOUNCE : String = easeOutBounce [static] | Transitions
|  | EASE_OUT_ELASTIC : String = easeOutElastic [static] | Transitions
|  | EASE_OUT_IN : String = easeOutIn [static] | Transitions
|  | EASE_OUT_IN_BACK : String = easeOutInBack [static] | Transitions
|  | EASE_OUT_IN_BOUNCE : String = easeOutInBounce [static] | Transitions
|  | EASE_OUT_IN_ELASTIC : String = easeOutInElastic [static] | Transitions
|  | LINEAR : String = linear [static] | Transitions

Method Detail

easeCombined | () | method

`protected static function easeCombined(startFunc:Function, endFunc:Function, ratio:Number):Number`

Parameters

| `startFunc:Function`
| `endFunc:Function`
| `ratio:Number`

Returns

| `Number`

easeIn | () | method |

`protected static function easeIn(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeInBack | () | method |

`protected static function easeInBack(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeInBounce | () | method |

`protected static function easeInBounce(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeInElastic | () | method |

`protected static function easeInElastic(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeInOut | () | method |

`protected static function easeInOut(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeInOutBack | () | method |

`protected static function easeInOutBack(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeInOutBounce | () | method |

`protected static function easeInOutBounce(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeInOutElastic | () | method |

`protected static function easeInOutElastic(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOut | () | method |

`protected static function easeOut(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOutBack | () | method |

`protected static function easeOutBack(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOutBounce | () | method |

`protected static function easeOutBounce(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOutElastic | () | method |

`protected static function easeOutElastic(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOutIn | () | method |

`protected static function easeOutIn(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOutInBack | () | method |

`protected static function easeOutInBack(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOutInBounce | () | method |

`protected static function easeOutInBounce(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

easeOutInElastic | () | method |

`protected static function easeOutInElastic(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

getTransition | () | method |

`public static function getTransition(name:String):Function`

Returns the transition function that was registered under a certain name.

Parameters

| `name:String`

Returns

| `Function`

linear | () | method |

`protected static function linear(ratio:Number):Number`

Parameters

| `ratio:Number`

Returns

| `Number`

register | () | method |

`public static function register(name:String, func:Function):void`

Registers a new transition function under a certain name.

Parameters

| `name:String`
| `func:Function`

Constant Detail

EASE_IN | Constant

`public static const EASE_IN:String = easeIn`

EASE_IN_BACK | Constant |

`public static const EASE_IN_BACK:String = easeInBack`

EASE_IN_BOUNCE | Constant |

`public static const EASE_IN_BOUNCE:String = easeInBounce`

EASE_IN_ELASTIC | Constant |

`public static const EASE_IN_ELASTIC:String = easeInElastic`

EASE_IN_OUT | Constant |

`public static const EASE_IN_OUT:String = easeInOut`

EASE_IN_OUT_BACK | Constant |

`public static const EASE_IN_OUT_BACK:String = easeInOutBack`

EASE_IN_OUT_BOUNCE | Constant |

`public static const EASE_IN_OUT_BOUNCE:String = easeInOutBounce`

EASE_IN_OUT_ELASTIC | Constant |

`public static const EASE_IN_OUT_ELASTIC:String = easeInOutElastic`

EASE_OUT | Constant |

`public static const EASE_OUT:String = easeOut`

EASE_OUT_BACK | Constant |

`public static const EASE_OUT_BACK:String = easeOutBack`

EASE_OUT_BOUNCE | Constant |

`public static const EASE_OUT_BOUNCE:String = easeOutBounce`

EASE_OUT_ELASTIC | Constant |

`public static const EASE_OUT_ELASTIC:String = easeOutElastic`

EASE_OUT_IN | Constant |

`public static const EASE_OUT_IN:String = easeOutIn`

EASE_OUT_IN_BACK | Constant |

`public static const EASE_OUT_IN_BACK:String = easeOutInBack`

EASE_OUT_IN_BOUNCE | Constant |

`public static const EASE_OUT_IN_BOUNCE:String = easeOutInBounce`

EASE_OUT_IN_ELASTIC | Constant |

`public static const EASE_OUT_IN_ELASTIC:String = easeOutInElastic`

LINEAR | Constant |

`public static const LINEAR:String = linear`

Thu Jan 16 2014, 01:11 PM +08:00