zoom and rotate an object

I have an small object in the center of the screen.

I have displayed from alpha=0 to 1 by using transition.to() for it.

Question:

While the object is translating to visible, i want that object to rotate 2 times full circles and zoom in (scale little more) and zoom to actual size to show some kind of splash.

can some one help us in API’s or code snippet?

Sudheer

transition.to(yourObject,{xScale = 2.0, yScale = 2.0, rotation = 720, alpha = 1, time = 500})  

This will transition an object named “yourObject” to scale 2x larger, rotate twice, and set the alpha to 1 (assuming you are starting from 0) over 1/2 second.  If you want it to scale back down to some other size after that transition you can have an onComplete parameter that points to another transition inside a function.  For example:

function scaleBack() transition.to(yourObject, {xScale = 1.0, yScale = 1.0, time = 200}) end transition.to(yourObject,{xScale = 2.0, yScale = 2.0, rotation = 720, alpha = 1, time = 500, onComplete = scaleBack})  
transition.to(yourObject,{xScale = 2.0, yScale = 2.0, rotation = 720, alpha = 1, time = 500})  

This will transition an object named “yourObject” to scale 2x larger, rotate twice, and set the alpha to 1 (assuming you are starting from 0) over 1/2 second.  If you want it to scale back down to some other size after that transition you can have an onComplete parameter that points to another transition inside a function.  For example:

function scaleBack() transition.to(yourObject, {xScale = 1.0, yScale = 1.0, time = 200}) end transition.to(yourObject,{xScale = 2.0, yScale = 2.0, rotation = 720, alpha = 1, time = 500, onComplete = scaleBack})