Including ActionScript Code In A Flex Application Using the mx:script Tag's Source Attribute
For many of my Flex applications I have a large block of ActionScript code within the main application MXML file. For example see: http://www.stfm.org/flex/relateComboBoxes/bin/relateComboBoxes.html (right click on the app to view the source).
The ActionScript code usually consists of some import statements, variable declarations, and function definitions. I've often wondered how I could put all of the ActionScript code in a separate file to make my source code more organized.
It works for me
http://www.flashcomguru.com/index.cfm/2007/1/10/Us...
As I become more advanced in Flex, using the code behind technique will be something I try. Aral's example was a bit complicated since he over rode many of the event handling functions and extended all the classes.
I'll need to start with a simpler code behind example to learn the technique.