Skip to main content
June 25, 2013
Question

Resize one side of sprite and interrupt tween

  • June 25, 2013
  • 1 reply
  • 546 views

Hey,

In my Actionscript 3 program I would like to resize a sprite, but only one one side. The bottom position, left side and right side shouldn't change, only the top (stretching). However, I have no idea how to accomplish this.

The second problem that has to do with resizing the sprite, is that I would like to interrupt the resizing with a keyboard event. When the sprite is resizing, a user should be able to press a button. This event should be excecuted before the resizing (tween?) has finished. Is this possible?

Hopefully someone can help me.

Thanks in advance

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 25, 2013

you want to resize part of a sprite or a movieclip?

if a sprite, was that something you created with the drawing api?

June 25, 2013

At the moment a sprite, but I'm not limited to that choice.

And it is indeed created by the drawing api, but this is also open for discussion. Do you have an idea how to accomplish what I desire?

kglad
Community Expert
Community Expert
June 26, 2013

you need to use separate objects to control separate parts of your sprite.  ie, create child sprites for each part you need to independently size.