Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
Tween

Package | org.apache.flex.createjs.tween
Class | public class Tween
Inheritance | Tween Effect EventDispatcher flash.events.EventDispatcher
Implements | IDocument

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The Tween effect animates an object from one place to another; it can also fade and object in and out by adjusting the object's alpha value. Once the target object is set, its starting position may be given (or its current location will be used) and an ending position given, the play() function is used to make the animation have effect.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | alphaFrom : Number Starting alpha value. | Tween
|  | alphaTo : Number Ending alpha value. | Tween
|  | duration : Number = 1000 The duration of the effect, defaults to 1000 (1 second). | Effect
|  | easing : Function | Effect
|  | loop : Boolean = false Determines if the effect should loop continuously or not. | Effect
|  | target : String The name of the object upon which the effect is being made. | Effect
|  | xFrom : Number Starting x value. | Tween
|  | xTo : Number Ending x value. | Tween
|  | yFrom : Number Starting y value. | Tween
|  | yTo : Number Ending y value. | Tween

Public Methods

| Method | Defined By
--- | --- | ---
|  | Tween(target:Object = null) Constructor | Tween
|  | internalEffect():IEffect | Tween
|  | play():void [override] Causes the target object to move between its starting and ending positions. | Tween
|  | setDocument(document:Object, id:String = null):void | Tween

Property Detail

alphaFrom | property

`public var alphaFrom:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Starting alpha value. If NaN, the current alpha value is used

alphaTo | property |

`public var alphaTo:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Ending alpha value. If NaN, the current alpha value is not changed

xFrom | property |

`public var xFrom:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Starting x value. If NaN, the current x value is used

xTo | property |

`public var xTo:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Ending x value. If NaN, the current x value is not changed

yFrom | property |

`public var yFrom:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Starting y value. If NaN, the current y value is used

yTo | property |

`public var yTo:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Ending y value. If NaN, the current y value is not changed

Constructor Detail

Tween | () | Constructor

`public function Tween(target:Object = null)`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Constructor

Parameters

| `target:Object` (default = `null`)``

Method Detail

internalEffect | () | method

`public function internalEffect():IEffect`

Returns

| `IEffect`

play | () | method |

`override public function play():void`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Causes the target object to move between its starting and ending positions.

setDocument | () | method |

`public function setDocument(document:Object, id:String = null):void`

Parameters

| `document:Object`
| `id:String` (default = `null`)``

Mon Sep 5 2016, 07:19 AM -07:00