About Compiling - Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

The default option is the target file to compile into a SWF file, and it is required to have a
value. If you use a space-separated list as part of the options, you can terminate the list with a
double hyphen before adding the target file; for example:
$ mxmlc -option arg1 arg2 arg3 -- target_file.mxml
About compiling with Flex Data Services
If you have Adobe Flex Data Services, you can use mxmlc to compile your application when
an HTTP request occurs. To do so, you deploy your application as MXML, ActionScript,
SWC, and RSL files under the web root directory of your application server. When a user
requests the main MXML file, the request triggers the compilation.
A request to an MXML file has the following form:
http://hostname/path/filename.mxml
When Flex Data Services receives an HTTP request for an MXML file, Flex Data Services
performs the following steps:
Compiles the MXML file to produce a SWF file.
1.
Caches the compiled SWF file on the server.
2.
Returns the SWF file to the client.
3.
About case sensitivity during a compilation
The Flex compilers use a case-sensitive file lookup on all file systems. On case-insensitive file
systems, such as the Macintosh and Windows file systems, the Flex compiler generates a case-
mismatch error when you use a component with the incorrect case. On case-sensitive file
systems, such as the UNIX file system, the Flex compiler generates a component-not-found
error when you use a component with the incorrect case.
About the ActionScript classpath
Typically, you put component files in directories that are in the ActionScript classpath. These
include your application's root directory, its subdirectories, and any directory that you specify
to the compiler. To specify a directory, you use the
compiler, or the Project Properties dialog box in Flex Builder.
The following rules can help you organize your custom components:
An application can access MXML and ActionScript components in the same directory,
and in its subdirectories.
option to the mxmlc
source-path

About compiling

65

Advertisement

Table of Contents
loading

Table of Contents