Type Function Library transition.* Return value Object Revision Release 2022.3683 Keywords easing, animation, transition, tween, interpolation
Performs a dissolve transition between two display objects.
transition.dissolve( object1, object2, time, delay )
DisplayObject. The initial display object.
DisplayObject. The final display object.
Number. Specifies the duration of the transition in milliseconds. By default, the duration is 500 milliseconds.
Number. Specifies the delay, in milliseconds, before the transition begins. Default is 0
.
-- Create the initial display object local s1 = display.newImage( "sun.png" ) s1.x, s1.y = 200,300 -- Create the final display object and set its alpha to 0 local s2 = display.newImage( "moon.png" ) s2.x, s2.y = 200,300 s2.alpha = 0 -- Dissolve the two images transition.dissolve( s1, s2, 2000, 500 )