opa, desculpa pela mensagem, já terminei hehe, erra erro bem idiota só lendo meu e-mail já veio na cabeça o que era, mas então, eu estou começando agora com flex, este modo como estou fazendo fica eficiente? tem modos melhores?(algum que de muita diferença de peso da aplicação).
On 27 maio, 22:54, Cristian Edson Göhl <[email protected]> wrote: > Olá, duvida de iniciante... > > tenho este componente > > <?xml version="1.0" encoding="utf-8"?> > > <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > width="472" height="196" title="CADASTRO DE COR" xmlns:ns1="*" > > close="PopUpManager.removePopUp(this)" removedEffect="fechar" > verticalScrollPolicy="off" horizontalScrollPolicy="off" > backgroundColor="#E6E6E6"> > > <mx:Script> > > <![CDATA[ > > import mx.rpc.remoting.RemoteObject; > > var service2:RemoteObject = new RemoteObject("servico"); > > import mx.managers.PopUpManager; > > } > > ]]> > > </mx:Script> > > <mx:Label x="121" y="37" text="Nome:" fontWeight="bold"/> > > <mx:TextInput x="171" y="35" id="tinome" > click="service2.setNome(tinome.text);"/> > > <ns1:Barra x="0" y="84"> > > </ns1:Barra> > > <mx:Button x="377" y="35" label="Vai" id="bvai" > click="service2.setNome(tinome.text);"/> > > </mx:TitleWindow> > > Passando parte pra AS... > > bom eu estava fazendo assim: > > criando esse comp > > <?xml version="1.0" encoding="utf-8"?> > > <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > width="350" height="284" title="PAINEL TODOS" xmlns:ns1="*" > > close="PopUpManager.removePopUp(this)" removedEffect="fechar" > verticalScrollPolicy="off" horizontalScrollPolicy="off" > backgroundColor="#E6E6E6"> > > <mx:Script> > > <![CDATA[ > > import mx.managers.PopUpManager; > > } > > ]]> > > </mx:Script> > > </mx:TitleWindow> > > quando o menu clicado corresponder > > CadCor(); > > //IMPORTS > > import flash.events.MouseEvent; > > import mx.controls.Alert; > > import mx.controls.Button; > > import mx.controls.Label; > > import mx.controls.TextInput; > > import mx.managers.PopUpManager; > > import mx.rpc.remoting.RemoteObject; > > //FUNÇAO CADASTRO COR > > private function CadCor():void { > > //SERVICO > > var service2:RemoteObject = new RemoteObject("servico"); > > //CRIA PAINEL > > var painel:PainelTodos = new PainelTodos(); > > painel.showCloseButton=(true); > > painel.title="CADASTRO DE COR" > > painel.width = 472; > > painel.height = 196; > > //CRIA CONTEUDO > > //label nome > > var labelnome:Label = new Label; > > labelnome.text = "Nome:"; > > labelnome.styleName= "LabelNormal"; > > labelnome.x=121; > > labelnome.y=37; > > //text input para nome > > var tinome:TextInput = new TextInput; > > tinome.x=171; > > tinome.y=35; > > //BARRA > > var barra:Barra = new Barra(); > > barra.x = 0; > > barra.y = 84; > > //ADICIONA CONTEUDO > > painel.addChild(labelnome); > > painel.addChild(tinome); > > painel.addChild(barra); > > //ADICIONA COMO POP UP > > PopUpManager.addPopUp(painel, this, true); > > Até aí tudo certo, ficou como eu queria, mas dai tentei adicionar um botão > apenas pra teste, que quando clicasse nele service2.setNome(tinome.text); > mas não consegui... > > tentei usar addEventListener com MouseEvent.CLICK . > > alguém pode me ajudar com isso? > > obrigado. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
