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>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to