Type Function
Return value Tween
Revision Release 2024.3703
Keywords animation, tween, timeline, interpolation, from
See also Animation — Tweens and Timelines (guide)


Similar to except that the starting property values are specified in the properties table and the final values are the corresponding property values of the object prior to the call.


animation.from( target, properties, params )
target (required)

DisplayObject or Userdata. The display object, RectPath point, Paint fill, or fill.effect to tween.

properties (required)

Table. A table that specifies the properties of the object that will be interpolated — see for a list of common options.

params (required)

Table. A table which specifies control parameters for the tween — see for parameter references.


Basic Movement
local square = display.newRect( 0, 0, 100, 100 )

local w, h = display.contentWidth, display.contentHeight

local function tweenListener( obj )
    print( "Tween completed; ID: " .. )

-- Move square from bottom right corner to upper left corner
animation.from( square, { x=(w-50), y=(h-50) }, { time=1500, id="tween1", onComplete=tweenListener } )