Specifications

342
CHAPTER 18
4 The compiler module returns an HTML file to the web server, which returns it to the client.
5 If the SWF file was compiled successfully, the HTML page embeds the SWF file. If the HTML file is an error
page, the SWF file is not embedded in the HTML page and no further requests are made.
6 The client then requests the SWF file based on the contents of the wrapper’s <object> and <embed> tags, if a
current version of the SWF file is not in its local file cache.
When the web server receives a request for a file with the extension *.mxm.swf instead of *.mxml, the compiler
module returns a SWF file only, and not the wrapper around it. In general, you should not request a SWF file
directly, because it may run differently than if it were embedded in a wrapper.
The web-tier compiler has the following advantages over using the command-line compiler:
Provides incremental compilation (recompiles only the bits that have changed, not necessarily the entire
application).
Saves you from having to deploy the SWF file and wrapper files after compiling.
Lets you customize the HTML wrapper or template.
Lets you debug by adding a query string parameter (?debug=true).
Helps you share updates to your application across working groups by sending a link to the web server.
Displays error and warning messages in the browser.
The web-tier compiler has the following disadvantages compared to using the command-line compiler:
Not for production use.
No built-in support for Express Install, deep linking, or version detection.
Caching relies on the web server.
On Linux systems, when you compile certain applications you may get an error message about not having a
graphical display. This is due to the Java compiler being run by the Apache user, which does not have access to the
desktop. To overcome this, add the following line to the flex-config.xml file used by the compiler:
<headless-server>true</headless-server>
Getting started
You can download the compiler module from the following location:
http://www.adobe.com/go/flex3_download