Created
November 15, 2012 17:20
-
-
Save vib3oh/4079892 to your computer and use it in GitHub Desktop.
Apply an existing "AKtween" to an object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Create a new AKtween | |
| local tween = AKtween:newTween({time=5000, y=-600, ease='outQuad', | |
| onComplete={time=5000, y=600, ease='inQuad'} | |
| }) | |
| --Create a display object/ image/ sprite | |
| local obj = display.newCircle(0,0,20) | |
| --Apply tween to the object, with a tween name | |
| tween:apply(obj, 'moveY') | |
| --Play tween | |
| obj:playTween('moveY') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment