Im trying to increase the size of an object from 0,0 to 500,500 over 2.25 seconds, I have the codes as below, but can’t seem to get it to work. Can anybody help?
transition.to( img, {time=500, xScale=2}) – Scale x by 2
transition.to( img, {time=500, yScale=2}) – Scale y by 2
transition.to( img, {time=500, xScale=1, delay = 500}) – Scale x back to 1 after 500ms
transition.to( img, {time=500, yScale=1, delay = 500, onComplete=blob}) – Scale y back to 1 after 500ms and call function when transition completed
end
img = display.newRect( 100, 100, 100, 100 ) – Draw rect
blob() – Call function to animate it[/lua] [import]uid: 11393 topic_id: 5552 reply_id: 19366[/import]