I must be missing something small here, but how do I set an image's width and height, so that it's scaled to that width and height?
And how efficient would this probably be if I make the width, height increase/decrease by a pixel, on each enterFrame?
People call me "underscore".
Comments
Sprite:setScaleX()
Sprite:setScaleY()
but the use percentage value no pixels
so
Sprite:setScale(1.2) will bew Width*1.2and Height*1.2
they are fast!
www.tntengine.com
Thanks!
I don't actually know how long to resize, it would be based on touch. I don't suppose GTween will be more efficient than a simple width++, height++?
Then yes, it would probably be better to use onEnterFrame event. But you probably would not want to increase size on every enter frame, but control resize speed using some kind of a count variable, and only when it reaches a certain amount reset it to 0 and add a bit to the size of the image.