View Full Version : Question about alpha fading (fast)
Ozymandias
March 20th, 2009, 03:05 PM
Is there a way to avoid the problem demonstrated here:
http://cid-151851e0a027f0bd.skydrive.live.com/self.aspx/.Public/testalpha.swf
Where if you have an MC with children MC that are on-top of eachother you get an inconsistent fade? I don't seem to remember this happening in earlier versions of flash.
This is all the code:
import gs.TweenLite;
TweenLite.to(testbox, 3, {alpha: 0});
NJB
March 20th, 2009, 03:28 PM
that fade problem has been around for a while, simply put, fading the parent MC fades the child MCs to the same degree (50% on parent == 50% on child) the result being that when child MCs overlap, those areas will appear more opaque. the only solution I knew was only applicable with a fade to black/white situation, where you have an MC with the backdrop image/colour that would fade in from 0% thus giving a smooth effect. There's probably a better method around now though.
snickelfritz
March 20th, 2009, 03:42 PM
Try assigning the "Layer" blendmode to the parent movieclip.
This essentially composites the nested children into a single "fill" for the parent, with regard to alpha values applied to the parent.
Otherwise the alpha property for the parent will propagate to the children individually, resulting in the fore-mentioned alpha blending of the children.
This is roughly analogous to disabling "mouseChildren" for a Movieclip, which stops events from propagating to its children, effectively creating a single composite fill.
Ozymandias
March 20th, 2009, 03:51 PM
Try assigning the "Layer" blendmode to the parent movieclip.
This essentially composites the nested children into a single "fill" for the parent, with regard to alpha values applied to the parent.
Otherwise the alpha property for the parent will propagate to the children individually, resulting in the fore-mentioned alpha blending of the children.
This is roughly analogous to disabling "mouseChildren" for a Movieclip, which stops events from propagating to its children, effectively creating a single composite fill.
Awesome, thanks. Exactly what I was looking for.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.