object:resume()

Type Function
Return value none
Revision Release 2024.3703
Keywords animation, tween, interpolation, resume
See also object:pause()
animation.pause()
animation.resume()
Tween
animation.*

Overview

Resumes a paused Tween object.

Syntax

object:resume()

Example

local object1 = display.newRect( 50, 50, 100, 100 )

-- Move the object
local newTween = animation.to( object1, { x=150, y=400 }, { time=5000 } )

-- After 2 seconds, pause the tween
timer.performWithDelay( 2000, function() newTween:pause(); end )

-- Sometime later, resume the tween
newTween:resume()