If I get what you are talking about, it's an optical illusion.
They take the backgroundColor of the container and create a fill overlay 'over' the text. Then call an alpha tween on the overlay itself.
That is why it looks like the dissolve tweens the text but, in actuality it doesn't. ;-)
Peace, Mike
Thanks for both responses. The odd thing that led to my initial
inquiry was the code I've included below. If you use a Dissolve
effect to fade them in or out, the fade works during the transition
but the labels then reappear once the transition is complete.
I fixed my problem by adding "visible = false" or "visible = true"
statements as appropriate in response to the "effectStart" and
"effectEnd" events. You can see the original problem by removing
those event handlers.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical">
<mx:Script>
<![CDATA[
import flash.events.MouseEvent;
import mx.controls.Alert;
public function doZoom():void {
if (zoomer.selected)
{
zoomIn.end();
zoomOut.play();
}
else
{
zoomOut.end();
zoomIn.play();
}
}
]]>
</mx:Script>
<mx:Parallel id="zoomIn" target="{theBox}">
<mx:Zoom originX="{theBox.width / 2}"
originY="{theBox.height / 2}"
zoomWidthFrom="10.0"
zoomWidthTo="1.0"
zoomHeightFrom="10.0"
zoomHeightTo="1.0"
/>
<mx:Dissolve alphaFrom="0.0"
alphaTo="1.0"
effectStart="{theBox.visible=true}"
/>
</mx:Parallel>
<mx:Parallel id="zoomOut" target="{theBox}">
<mx:Zoom originX="{theBox.width / 2}"
originY="{theBox.height / 2}"
zoomWidthFrom="1.0"
zoomWidthTo="10.0"
zoomHeightFrom="1.0"
zoomHeightTo="10.0"
/>
<mx:Dissolve alphaFrom="1.0"
alphaTo="0.0"
effectEnd="{theBox.visible=false}"/>
</mx:Parallel>
<mx:Panel width="250"
height="200"
layout="vertical"
horizontalAlign="center"
verticalAlign="middle"
horizontalScrollPolicy="off"
verticalScrollPolicy="off">
<mx:VBox id="theBox" horizontalAlign="center" verticalAlign="middle"
verticalGap="10">
<mx:Button label="Button"/>
<mx:CheckBox label="Checkbox"/>
<mx:ComboBox></mx:ComboBox>
<mx:HSlider/>
<mx:Label/>
</mx:VBox>
</mx:Panel>
<mx:CheckBox label="Zoom Zoom" id="zoomer" click="doZoom()"/>
</mx:Application>
--
What goes up, does come down. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
- [flexcoders] Re: Alpha setting of 0 doesn't work with con... tombaggett
- Re: [flexcoders] Re: Alpha setting of 0 doesn't work... Michael Schmalle
Reply via email to

