Class cc.ActionTween
- Defined in: CCActionTween.js
- Extends cc.ActionInterval
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
cc.ActionTween
cc.ActionTween is an action that lets you update any property of an object.
|
Method Summary
Class Detail
cc.ActionTween()
cc.ActionTween
cc.ActionTween is an action that lets you update any property of an object.
//For example, if you want to modify the "width" property of a target from 200 to 300 in 2 seconds, then: var modifyWidth = cc.actionTween(2,"width",200,300) target.runAction(modifyWidth); //Another example: cc.ScaleTo action could be rewriten using cc.PropertyAction: // scaleA and scaleB are equivalents var scaleA = cc.scaleTo(2,3); var scaleB = cc.actionTween(2,"scale",1,3);
Field Detail
Please use cc.actionTween instead
Creates an initializes the action with the property name (key), and the from and to parameters.
Method Detail
-
<static> cc.ActionTween.ctor(duration, key, from, to)Creates an initializes the action with the property name (key), and the from and to parameters. Constructor of cc.ActionTween
- Parameters:
- {Number} duration
- {String} key
- {Number} from
- {Number} to
-
<static> {Boolean} cc.ActionTween.initWithDuration(duration, key, from, to)initializes the action with the property name (key), and the from and to parameters.
- Parameters:
- {Number} duration
- {String} key
- {Number} from
- {Number} to
- Returns:
- {Boolean}
-
- Returns:
- {cc.ActionTween}
-
<static> cc.ActionTween.startWithTarget(target)
- Parameters:
- {cc.Node} target
-
<static> cc.ActionTween.update(dt)
- Parameters:
- {Number} dt