Package | starlingbuilder.engine.tween |
Interface | public interface ITweenBuilder |
Implementors | DefaultTweenBuilder |
You need to manually call start/stop in your project when you want to start/stop a tween. NOTE: The stop method should ALWAYS be called with the start method to avoid memory leak when the components are disposed. The following example shows how to start and stop a tween:
var data:Object = uiBuilder.load(layoutData); var sprite:Sprite = data.object as Sprite; var paramsDict:Dictionary = data.params; uiBuilder.tweenBuilder.startTween(sprite, paramsDict); ... uiBuilder.tweenBuilder.stopTween(sprite);
See also
Method | Defined By | ||
---|---|---|---|
start(root:DisplayObject, paramsDict:Dictionary, names:Array = null):void
Start tween according tweenData in layout
| ITweenBuilder | ||
stop(root:DisplayObject, paramsDict:Dictionary = null, names:Array = null):void
Stop tween according tweenData in layout
| ITweenBuilder |
start | () | method |
public function start(root:DisplayObject, paramsDict:Dictionary, names:Array = null):void
Start tween according tweenData in layout
Parameters
root:DisplayObject — of the DisplayObjects need to tween
| |
paramsDict:Dictionary — A dictionary of the mapping of every UIElement to its layout data
| |
names:Array (default = null ) — array of names (e.g. ["container.button1", "container.button2") to be start tween, if null then start all the available tween
|
stop | () | method |
public function stop(root:DisplayObject, paramsDict:Dictionary = null, names:Array = null):void
Stop tween according tweenData in layout
Parameters
root:DisplayObject — of the DisplayObject needs to be tween
| |
paramsDict:Dictionary (default = null ) — A dictionary of the mapping of every UIElement to its layout data, if null then stop all the available tweens
| |
names:Array (default = null ) — array of names (e.g. ["container.button1", "container.button2") to be stop tween, if null then stop all the available tweens
|