Type Function Return value none Revision Release 2024.3703 Keywords animation, tween, interpolation, setPosition See also object:getPosition() animation.setPosition() Tween animation.*
Moves/sets the playback position of a Tween object.
object:setPosition( position )
Number. The position (time) to move/set the playback to, in milliseconds.
local object1 = display.newRect( 50, 50, 100, 100 ) -- Move the object local newTween = animation.to( object1, { x=150, y=400 }, { time=5000 } ) -- Set the tween position newTween:setPosition( 2000 )