There are certainly ways to do global functions and variables, but OO
languages like AS3 generally avoid them.  You can describe your
functions as static in a class and make them globally accessible that
way, but you'd still need to import the package.  If you have a bunch of
imports that you'll use in *every* file you could create a little
snippet of AS that has those imports and use the #include statement to
pull them in (#include is dropping the # in the next beta I think).

Matt

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Schutten
Sent: Tuesday, March 21, 2006 2:38 AM
To: [EMAIL PROTECTED] Com
Subject: [flexcoders] Global functions

I want to create a Flex application where each part of the application
is
coded in a seperate mxml file. In the main application mxml i've added a
TabNavigator and added a tab for each seperate mxml file.
I also created a Functions ActionScript file which contains all
functions
for my application. In each mxml file i have to use 'import Functions.*'
to
reach my functions. Also when using an Alert in each file i have to use
'import mx.controls.Alert' in each.

Is there a way to only import the needed stuff once, thus in the main
mxml
file?
Does flex have Global Functions and variables?



Richard





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



Reply via email to