Confusion over manual/automatic sizing of Flash Sprite Objects

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2011-01-10T11:34:50Z Indexed on 2011/01/10 11:53 UTC
Read the original article Hit count: 170

Filed under:
|

If I have a custom class subclassing Sprite and it draws some simple objects, how does this work with respect to the Sprite.width & Sprite.height properties? It seems I can draw (for example) a rectangle of any size, bigger than the Sprite size. Similarly if I set the width/height properties, what happens to the content already drawn?

As a use-case, I might have a stick-man which is drawn as a set of lines, I want to set the man's height and the rendering is scaled to this.

Are there any issues with width/height being auto-calculated or am I misunderstanding what these properties actually mean?

© Stack Overflow or respective owner

Related posts about flash

Related posts about actionscript-3