Transition from center

How do you achieve transitions that start from the center of the image and grows in xScale in all directions? Because right now my image grows from the top left corner.

For example when you inflate a balloon, you’d need a transition.to that grows in all directions, not just from the bottomright corner

Thanks in advance, [import]uid: 30185 topic_id: 5815 reply_id: 305815[/import]

http://developer.anscamobile.com/reference/index/objectsetreferencepoint [import]uid: 12108 topic_id: 5815 reply_id: 19943[/import]

I don’t know how to apply that to the transition.to function, though. I’ve got it set to center at the moment and it’s not working

Edit: Using this code right now
local ballTrans = transition.to(ball, { time=800, xScale=ball.xScale*2, yScale=ball.yScale*2, alpha=0 })
ballTrans:setReferencePoint(display.CenterReferencePoint) [import]uid: 30185 topic_id: 5815 reply_id: 19954[/import]

Bump [import]uid: 30185 topic_id: 5815 reply_id: 20021[/import]

you need to set the reference point on your ball not your transition!

[lua]ball:setReferencePoint(display.CenterReferencePoint)
local ballTrans = transition.to(ball, { time=800, xScale=ball.xScale*2, yScale=ball.yScale*2, alpha=0 })[/lua] [import]uid: 6645 topic_id: 5815 reply_id: 20049[/import]

Ah, cheers mate. [import]uid: 30185 topic_id: 5815 reply_id: 20053[/import]