Setting size of an animated sprite

I have an animated sprite (an explosion) created via display.newSprite() from an image sheet (via TexturePacker). I want to be able to show this explosion in an arbitrary number of sizes on the stage; for example, sometimes I may want it to be 30x30, sometimes 150x 150, depending on the size of the game object that exploded.

I’ve tried setting object.width and object.height but they appear to have no effect: the animation always shows at the size specified in the sheet options. I haven’t tried object:scale() because I need this to work for physics bodies as well. 

Any advice?

I faced this problem too. The only options I had was :

  1. Adjust the ‘scale()’

  2. Adjust the width/height in the imageSheet options (where you specify a different width/height of the image-sprite-sheet). Just need to ensure the ratio remains.

Hope this helps.

I faced this problem too. The only options I had was :

  1. Adjust the ‘scale()’

  2. Adjust the width/height in the imageSheet options (where you specify a different width/height of the image-sprite-sheet). Just need to ensure the ratio remains.

Hope this helps.