Or you could create a new 'duplicate' sprite (instead of scaling the
original) and re-parent the children to the new sprite using:

newParent.addChild(objectToReparent);

C:


-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim
D'Silva
Sent: Thursday, 30 July 2009 3:38 PM
To: Flash Coders List
Subject: Re: [Flashcoders] as3 -re-dimensioning spirte but not its
children

I'd say extend a new class from Sprite, and override the getters and
setters for width and height, and scaleX and scaleY if you need them.

However, if you don't want to do that, make two sprites inside your
sprite. One with things you want to change and one width those you
don't. Then just resize the sprite that you want to.

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/7/30 Isaac Alves <isaacal...@gmail.com>:
> Hi list,
>
> Is it possible to alter the width or height of a sprite dynamically
> without altering the width and height of its children ?
>
> Even when I add children to a Sprite that had its dimensions altered
> dynamically, these children have their dimensions changed.
>
> Could I do something like "sprite.resetScaleXandY" ?
>
> What do you suggest in this kind of situation?
>
> Thanks in advance,
> Isaac
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to