can transition increase object size?

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?

Thanks

[blockcode]
local hoop = display.newImageRect(“greenhoop.png”, 0, 0 )
gamescreen:insert( 1 , hoop )
dospawn = 0
hoop.alpha = 0
hoop.x = centreX
hoop.y = centreY
transition.to( hoop, { time=2250, alpha = 1,} )
transition.to( hoop, { time=2250, width = 500, height = 500, transition=easing.inQuad, onComplete = destroyHoop } )
timer.performWithDelay(1000, resetSpawn, 1 )
[/blockcode] [import]uid: 8699 topic_id: 5552 reply_id: 305552[/import]

gaz,

Use xScale and yScale instead of width/height:

[lua]function blob()

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]

I thought I tried using scale, but it wouldn’t work which I put down to it being an imageRect rather than just an image.

I’ll give it another try! Thanks [import]uid: 8699 topic_id: 5552 reply_id: 19729[/import]