This does not instantiate the class by itself: var objPropostaBusca:as_PropostaBusca;
You will need objPropostaBusca = new as_PropostaBusca() Make sure your as component has a constructor function, no args, un-typed, with the same name. Alert is tricky(You will either need to import it or use mx.core.application.application.alert. And still it is tricky from components, especially AS components). trace() always works. Are you using the debug player, have you enabled logging in flashlog.txt? Tracy -----Original Message----- From: Fernando Barros [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 3:41 PM To: [email protected] Subject: [flexcoders] Acessing a class Hi there! Im trying to make my first flex app and I�ve this problem: I have proposta.mxml with <mx:VBox id="tabBusca" label="Suas Propostas" width="100%" > <PropostaBusca id="PropBusca"/> </mx:VBox> And in PropostaBusca.mxml I have: ... <mx:Script> var objPropostaBusca:as_PropostaBusca; </mx:Script> ... <mx:Button label="Abrir" enabled="{dgProposta.selectedItem!=null}" click="objPropostaBusca.Abrir(dgProposta.selectedItem.NPROPOSTAID);"/> And in as_PropostaBusca.as: import mx.controls.Alert; import mx.services.WebService; class as_PropostaBusca { public function Abrir(nPropostaID:Number):Void { Alert.show('Entrou'); var objSessao:SharedObject; ... But I�ve never got this Alert or any type of trace. What Am I doing wrong? Thks in advance! --------->--------->--------- Fernando Barros --------->--------->--------- Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> 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/

