views:

251

answers:

3

Stupid question I guess, but I haven't managed to find the answer yet :)

If I change some value for a parent sprite, the same value will affect all of its children. So if I set alpha or width on the parent, the child will automaticly get the same value.

Is there some way I can prevent that from happening?

+2  A: 

Short answer: no

Longer answer: for alpha there is no work around that I know of. For width, you could hack something to work so that the child clips looks to see what the parent scaleX is and then increases its own scaleX if it is less than one but this isn't something that I'd do. The best way to do this is to create a holder clip that contains no graphical assets but you can use to move other clips around together.

danjp
Ah, as I thought. Thanks for clearing that up for me :)
Tinelise
A: 

if you are after the dimensions then then you can simply get the inverse of the parent transformation matrix and apply it to the child, there is a pretty good tutorial here for example:Transoform Matrix.

see applications -> Shaking Smilies section for what you are after.

other things like alpha i dont know a way to get around.

shortstick
It's things like alpha or filters. I have had a problem with width before but found a good solution for that. Thanks anyway =)
Tinelise
+1  A: 

It seems that doing alpha = 1/alpha of parent works fine. That means setting the alpha to higher than 1 on the child. At least this work with AS3/Flash 10.

David
whoa! i didn't know this!
grapefrukt