Bom dia galera!
Estou com uma duvida em relação a mudanças de state com efeito !
na verdade nao sei como se faz tenho visto exemplos sobre efeitos mas
o que eu quero nao sei fazer !!

vai o meu codigo!


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
        <mx:states>
                <mx:State name="State1">
                        <mx:AddChild position="lastChild">
                                <mx:Canvas x="174" y="81" width="356" 
height="299"
borderStyle="solid" id="c1">
                                        <mx:Panel x="53" y="47" width="250" 
height="200"
layout="absolute" title="state1" id="s1">
                                        </mx:Panel>
                                </mx:Canvas>
                        </mx:AddChild>
                </mx:State>
                <mx:State name="State2">
                        <mx:AddChild position="lastChild">
                                <mx:Canvas x="174" y="81" width="356" 
height="299"
borderStyle="solid" id="c2">
                                        <mx:Panel x="53" y="47" width="250" 
height="200"
layout="absolute" title="state2" id="s2">
                                        </mx:Panel>
                                </mx:Canvas>
                        </mx:AddChild>
                </mx:State>
                <mx:State name="State3">
                        <mx:AddChild position="lastChild">
                                <mx:Canvas x="174" y="81" width="356" 
height="299"
borderStyle="solid" id="c3">
                                        <mx:Panel x="53" y="47" width="250" 
height="200"
layout="absolute" title="state3" id="s3">
                                        </mx:Panel>
                                </mx:Canvas>
                        </mx:AddChild>
                </mx:State>
                <mx:State name="State4">
                        <mx:AddChild position="lastChild">
                                <mx:Canvas x="174" y="81" width="356" 
height="299"
borderStyle="solid" id="c4">
                                        <mx:Panel x="53" y="47" width="250" 
height="200"
layout="absolute" title="state4" id="s4">
                                        </mx:Panel>
                                </mx:Canvas>
                        </mx:AddChild>
                </mx:State>
        </mx:states>


    <mx:ToggleButtonBar horizontalGap="5" x="59" y="10"
        itemClick="changeMenu(event)" width="570" height="29"
color="#ffffff" id="State3">
            <mx:dataProvider>
                <mx:Array>
                    <mx:String>State1</mx:String>
                    <mx:String>State2</mx:String>
                    <mx:String>State3</mx:String>
                    <mx:String>State4</mx:String>
                </mx:Array>
            </mx:dataProvider>
        </mx:ToggleButtonBar>


<mx:Parallel id="efeitoc2" target="{c2}">
   <mx:Fade alphaTo="0"/>
</mx:Parallel>


<mx:Script>
        <![CDATA[
                import mx.effects.easing.Bounce;
                import mx.events.ItemClickEvent;
                private function changeMenu(event:ItemClickEvent):void
                {
                   if(event.label == 'State1')
                   {

             currentState="State1";
           }
           if(event.label == 'State2')
                   {
             efeitoc2.play();

             currentState="State2";
           }
           if(event.label == 'State3')
                   {
             currentState="State3";
           }
           if(event.label == 'State4')
                   {
             currentState="State4";
           }
        }
        ]]>
</mx:Script>
</mx:Application>

o que estou querendo e ter um efeito de aparecer e desaparecer o state
ao se apertar o botao!
tipo apertar o state 1 se tiver no state 2 ele mudar para o state 1
desaparecendo o 2 e aparecendo o 1 !  com o efeito <mx:Fade> !
bem pode ser facil mas preciso muito aprender a trabalhar com efeitos
e estou com muitas duvidas!
quem puder me ajudar fico grato!

tenham um otimo dia


--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para [email protected]
Para sair da lista, envie um email em branco para [EMAIL PROTECTED]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---

Responder a