Thanks João ! It´s working now, but i needed to put the ActionScript File in root folder.
Regards, Haroldo. --- In [email protected], João Fernandes <[EMAIL PROTECTED]> wrote: > > Haroldo , > > Your source should be an ActionScript File not an ActionScript Class: > > import mx.controls.Alert; > function sampleFunction () > { > mx.controls.Alert.show("just a test!"); > } > > Regards, > > João Fernandes > Secção de Desenvolvimento > Departamento de Informática > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Haroldo > Sent: sexta-feira, 3 de Fevereiro de 2006 12:18 > To: [email protected] > Subject: [flexcoders] How to use action script in flex builder 2 beta1 ? > > I have a problem with flex builder 2 beta 1 to use an action script > file. > The problem is: when i create an action script class, and try to > call it in a mxml file, like flex builder 1.5 ( <mx:Script > source="Test.as"/> ), i have this error message: > > Unable to open file: H:\fes2\jrun4\servers\default\flex\Testflex2 > \Test.as > > My "as" file: > package > { > import mx.controls.Alert; > class Test { > function sampleFunction () > { > mx.controls.Alert.show("just a test!"); > } > } > } > > I create the "as" file in [classpath]user_classes folder. > > Regards, > Haroldo. > > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/

