Para visualizar melhor coloquei no pasterbien

http://pastebin.com/3cnEMApZ



A minha duvida por exemplo é de como separa essa chamado de formulario
com o metodo chamarform como faço para colocar isso em .as e fazer
referência como meu mxml principal.Fico no aguardo.Obrigado!

On 14 abr, 19:54, Cristiano Gonçalves <cristiano...@gmail.com> wrote:
> Pessoal estou com um exemplo de uma aplicação em flex porem estou com
> tudo junto  como faço pra criar um arquivo .as separando o action
> script dos compontes segue o meu codigo abaixo.Fico no
> aguardo.Obrigado!
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="absolute" borderColor="#777D81"
> backgroundGradientAlphas="[1.0, 1.0]"
> backgroundGradientColors="[#F7F7F2, #D4D0D0]"
> backgroundImage="calculadora.jpg">
>         <mx:Button id="btn" click="{limpar()}" x="689" y="107"
> label="Iniciar" width="88" height="32"/>
>         <mx:Button id="btnsoma" click="{calculo()}" x="689" y="164"
> label="Somar" width="100" height="42"/>
>
> <mx:Script>
>         <![CDATA[
>                 import mx.managers.PopUpManager;
>                 import mx.effects.easing.Elastic;
>                 import mx.controls.Alert;
>                 private function limpar():void {
>
>              numero1.text="";
>              numero2.text="";
>              rotulo.text="";
>                  rotulo2.text="";
>                  nomecaixa.text="";
>
>                 }
>
>                 private function calculo():void {
>
>                         var valor1:Number;
>                         var valor2:Number;
>                     valor1=Number(numero1.text);
>                     valor2=Number(numero2.text);
>                         var soma:Number;
>                         soma = valor1 + valor2;
>
>                         rotulo.text = soma.toString();
>                     Alert.show(soma.toString());
>
>                 }
>
>                 private function mostrarnome():void {
>                         var nome:String;
>                         nome = String(nomecaixa.text);
>                         rotulo2.text = nome.toString();
>
>                 }
>
>                 private function chamarform():void{
>                         var form:fomulario
>                         form  = 
> fomulario(PopUpManager.createPopUp(this,fomulario,true));
>                         PopUpManager.centerPopUp(form);
>                 }
>
>         ]]>
> </mx:Script>
>         <mx:TextInput id="numero1" x="530" y="107" height="41" width="137"
> color="#0B1AE0" fontSize="29"/>
>         <mx:TextInput id="numero2" x="530" y="165" height="41" width="137"
> color="#0B1AE0" fontSize="29"/>
>         <mx:Label x="363" y="107" text="VALOR 1:" fontSize="29"
> fontWeight="bold" color="#0219FA"/>
>         <mx:Label x="527" y="10" text="CALCULADORA" fontSize="29"
> fontWeight="bold" color="#0219FA"/>
>         <mx:Label x="363" y="167" text="VALOR 2:" fontSize="29"
> fontWeight="bold" color="#0219FA"/>
>         <mx:Label x="420" y="290" text="RESULTADO:" fontSize="29"
> fontWeight="bold" width="235" color="#0219FA"/>
>         <mx:Label x="650" y="290" fontSize="36" fontWeight="bold" width="157"
> height="71" id="rotulo" color="#F4080D"/>
>         <mx:TextInput x="94" id="nomecaixa" y="150" height="41"/>
>         <mx:Label x="94" id="rotulo2" y="199"   text="{nomecaixa.text}"
> height="42" color="#0219FA" fontSize="23" width="146"/>
>         <mx:Button x="104" click="{mostrarnome()}" y="249" label="Mostrar"
> height="39"/>
>         <mx:Button x="94" y="60" click="{chamarform()}" label="Chamar Form"
> height="34" width="160"/>
>
> </mx:Application>

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

To unsubscribe, reply using "remove me" as the subject.

Responder a