Datasheet

MXML is a pure XML-based markup language that is used to define a Flex application
and many of its components. Most of the elements in MXML correspond to an
ActionScript 3 class that’s delivered as part of the Flex class library.
When you compile a Flex application, your MXML code is rewritten in the background into pure
ActionScript 3. MXML can be described as a “convenience language” for ActionScript 3 that makes
it easier and faster to write your applications than if you had to code completely in ActionScript.
ActionScript 3 also is used in the Flash CS3 authoring environment for logical code, cre-
ating class definitions, and other programming tasks. Unlike Flex 3, which uses only ver-
sion 3 of ActionScript, you can create Flash documents in Flash CS3 that use older versions of the
language, such as ActionScript 2.
The diagram in Figure 1.1 describes the relationship between the Flex SDK’s command-line com-
piler, Flex Builder, the MXML and ActionScript programming languages, and the Flash Player and
Adobe Integrated Runtime.
MXML versus ActionScript 3
MXML and ActionScript can be used interchangeably in many situations. MXML is commonly
used to declare visual layout of an application and many objects, but it’s usually your choice as a
developer as to when to use each language.
NOTE
NOTE
5
About Flex 3
1
Flex as Open Source
I
n April 2007, Adobe Systems announced its intention to migrate the Flex SDK to an open-source
project, to be licensed under the Mozilla Public License (MPL). This license allows developers to
modify and extend source code, and to distribute components of the code (or the entire SDK). Any
changes that developers make to the ActionScript files that make up the Flex SDK must in turn be
made available to other developers. This does not affect the developer’s own proprietary code. You
still own the MXML and ActionScript code you write for your own applications.
Not all components in the Flex SDK are available in the open-source package. Some components,
such as the Flex Charting Components and
AdvancedDataGrid, are available only through com-
mercial licenses. Also, Flex Builder is available only through a license that you purchase from
Adobe.
The open-source Flex SDK is managed through the
http://opensource.adobe.com/wiki/
display/flexsdk/
Web site. Additional information and ongoing discussion of the Flex open-
source project is available at these Web sites:
http://groups.google.com/group/flex-open-source
http://flex.org/
To get a copy of the Mozilla Public License, visit www.mozilla.org/MPL/.
06_287644-ch01.qxp 6/23/08 11:28 PM Page 5