Starting out with Flex, I used the command-line compiler of the open source Adobe Flex 3 SDK for compiling MXML and ActionScript source files into SWF files.
A full list of compiler options and default behaviours are available in the Flex 3 documentation, but following is a summary to get going, including some links on Flex components and styles.
An example of using the mxmlc.exe application compiler:
mxmlc -language+=MyLanguage -title "MyTitle" -localized-description "MyAmericanDescription" en-us -localized-description "MyBritishDescription" en-gb -creator "Me" -publisher "MyPublisher" filename.mxml
To set SWF file metadata, used by search engines, the settings in the flex-config.xml file can be set, or the command-line options in the example can be used.
Other compiler options include:
- output filename
- Sets the output path and filename for the compiled SWF file; Defaults to match the target filename (with an SWF file extension)
- default-size width height
- Sets the default application size in pixels
- default-frame-rate int
- Sets the application frame rate; Defaults to 24
- debug=true|false
- Generates a debug SWF file used that can be used by the command-line debugger, fdb.exe; Defaults to false to generate a smaller SWF file size; To debug Flex applications, the debug version of Flash player (comes with the SDK) must be used to run the Flex app
- load-config filename
- Configuration files can provide options to the command-line compiler and can be set with this option
- generate-frame-loader=true|false
- Generates an IFlexBootstrap-derived loader class
- include-libraries library [...]
- Links classes inside a SWC component file; To compile SWC files, use the compc.exe compiler; All SWC component files in the /libs, /libs/player and current directories are linked by default; See the Flex Component Explorer for details on built-in Flex components; Data components are not free, but there are some open source components (which I have not yet tested): CustomGrid and TreeGrid
- includes class [...]
- Links classes
- defaults-css-files filename [, ...]
- Inserts CSS files into the SWF file; See the Flex Style Explorer for more on Flex CSS
- accessible=true|false
- Enables the application to communicate with a screen reader; Defaults to false so it may be worth setting this to true; Flash player 9 uses Microsoft Active Accessibility and works with IE on Windows 2000 or later only.
- help [-list [advanced]]
- The help option, always good
For frequent compilation of more complex applications, use fcsh.exe, the Flex compiler shell.
No Comments Yet
No comments yet.
Comments RSS TrackBack Identifier URI
Leave a comment
