Boa tarde,

Estou desenvolvendo uma aplicação básica e estou enfrentando o seguinte
problema:

Na minha aplicação quando eu clico em um botão um estado é aberto e um
efeito é executado. Porém após eu executar um vídeo (disparado através do
click de uma row do grid) o efeito não é mais executado ao entrar novamente
no estado.

Segue em anexo txt com um trecho do código (não postei no corpo do e-mail
pois são umas 70 linhas, mas tá tudo comentado).

Muito obrigado pela atenção de todos

Ian Raphael

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute" 
width="800" height="600" 
applicationComplete="changeBackground('assets/wallpaper/base.jpg');">

    <mx:WipeLeft id="EfeitoAeroporto" duration="1500"/>

    <mx:transitions>
        <!-- Estado Aeroporto -->
        <mx:Transition id="EfeitoBaseAeroporto" fromState="*" 
toState="Aeroporto">
            <mx:WipeLeft duration="1500" target="{EstadoAeroportoPanel}"/>
        </mx:Transition>
    </mx:transitions>

    <mx:Script>
        <![CDATA[
           <!-- Executa video -->
           private function playVideoAeroporto(event:ListEvent):void{
                videoPlayerAeroporto.source = 
String(event.currentTarget.selectedItem.arquivo);
                textoVideoAeroporto.text = 
String(event.currentTarget.selectedItem.textoVideo);
            }

           <!-- Fecha estado e remove vídeo da execução -->           
            private function fecharAeroporto():void{
                this.currentState = '';
                tabAeroporto.selectedIndex = 0;
                videoPlayerAeroporto.close();
                videoPlayerAeroporto.source = null;
                videoPlayerAeroporto.mx_internal::videoPlayer.clear();
                textoVideoAeroporto.text = '';
            }
        ]]>
    </mx:Script>

    <!-- Estado Aeroporto -->
    <mx:states>
        <mx:State name="Aeroporto">
            <mx:AddChild position="lastChild">
                <mx:Panel x="10" y="95" width="780" height="495" 
layout="absolute" title="Aeroporto" id="EstadoAeroportoPanel">

                    <mx:TabNavigator id="tabAeroporto" x="10" y="10" 
width="742" height="405">
                        <!-- Aba vídeos -->
                        <mx:Canvas label="Vídeos" width="100%" height="100%">

                            <!-- Grid de listagem -->
                            <mx:Panel titleIcon="{lista_icone}" x="10" y="0" 
width="293.25" height="232" layout="absolute" title="Lista de Vídeos">
                                <mx:DataGrid id="dgAeroporto" x="0" y="0" 
width="273.25" height="192" dataProvider="{XMLAeroporto.video}" 
itemClick="playVideoAeroporto(event);" toolTip="Clique para assistir o vídeo">
                                    <mx:columns>
                                        <mx:DataGridColumn headerText="Passo" 
width="43.25" dataField="codigo" textAlign="center"/>
                                        <mx:DataGridColumn 
headerText="Informação" width="230" dataField="textoDica"/>
                                        <mx:DataGridColumn headerText="Caminho" 
dataField="arquivo" visible="false"/>
                                        <mx:DataGridColumn headerText="Texto" 
dataField="textoVideo" visible="false"/>
                                    </mx:columns>
                                </mx:DataGrid>
                            </mx:Panel>
                           
                            <!-- Videoplayer -->
                            <mx:Panel titleIcon="{videoplayer_icone}" 
x="311.25" y="0" width="418.75" height="362" layout="absolute" title="Tocador 
de Vídeo">
                                <mx:VideoDisplay id="videoPlayerAeroporto" 
width="398.75" height="322" bufferTime="100" backgroundAlpha="0.3"/>
                            </mx:Panel>

                            <!-- Painel de textos-->
                            <mx:Panel titleIcon="{texto_icone}" x="10" y="240" 
width="293.25" height="122" layout="absolute" title="Textos do Vídeo">
                                <mx:TextArea id="textoVideoAeroporto" 
width="273.25" height="82" editable="false"/>
                            </mx:Panel>

                        </mx:Canvas>
                       
                        <!-- Aba jogos -->
                        <mx:Canvas label="Jogos" width="100%" height="100%">
                        </mx:Canvas>
                    </mx:TabNavigator>

                    <!-- Botão Fechar -->
                    <mx:Button x="668" y="423" label="Voltar" 
click="fecharAeroporto();" icon="{voltar_icone}"/>
                </mx:Panel>
            </mx:AddChild>
        </mx:State>

        <mx:Button icon="{entrar_icone}" y="513" label="Aeroporto" width="110" 
height="30" left="75" creationCompleteEffect="{EfeitoAeroporto}" 
click="this.currentState='Aeroporto'" 
rollOver="aeroportoSom.play();changeBackground('assets/wallpaper/aeroporto.jpg')"
 toolTip="Clique para entrar"/>

</mx:Application>

Responder a