how to resize a button widget properly using transition.to?

For a newImageRect is can resize/move it (say if I am zooming in/out a scene) using:

transition.to( img, { x=((280-147)/2 + 107 - 407), y=((293-153)/2 + 469 - 35), width=280, height=293, time=0.4 } )

where the x/y values are the average of the size plus some constants to move it to the correct place, and the width/height are the new values. If I try this with a newButton, the x/y work properly, but the width/height do not, either blowing up ridiculously or shrinking to nothing depending on whether the new values are greater or less than the original values. How do I properly resize a button? [import]uid: 39505 topic_id: 31407 reply_id: 331407[/import]

Try xScale and yScale rather than width and height and let me know if that helps, please :slight_smile: [import]uid: 52491 topic_id: 31407 reply_id: 125698[/import]

Try xScale and yScale rather than width and height and let me know if that helps, please :slight_smile: [import]uid: 52491 topic_id: 31407 reply_id: 125698[/import]