To make your MXML code more readable, you can also reference ActionScript files in your <mx:Script> tags, rather than insert large blocks of script. You can include or import ActionScript files.
There is a distinct difference between including and importing in ActionScript. Including is copying lines of code from one file into another. Importing is adding a reference to a class file or package so that you can access objects and properties defined by external classes. Files that you import must be found in the ActionScript classpath. Files that you include must be located relative to the application root or use an absolute path.
You use the #include directive or the <mx:Script source="filename"> tag to add ActionScript code snippets to your Flex applications.
You use import statements in an <mx:Script> block to add ActionScript classes and packages to your Flex applications.
Version 1.5
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/15/flex_docs_en/00000047.htm