Flash Tutorials - Herong's Tutorial Examples - v3.03, by Dr. Herong Yang
"mxmlc" - Adobe Flex Compiler
This section provides a tutorial example on how to use Adobe Flex compiler, mxmlc, to compile a Flash application from a MXML file to a SWF file.
The most important tool included in Flex SDK 4.1 is the Flash application command-line compiler "mxmlc", which allows you to compile MXML (Macromedia XML) and AS (ActionScript) files into SWF files.
MXML is an XML-based language designed to write Flash applications. Here is a simple Flash application, hello.mxml, written in MXML:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> <s:layout> <s:VerticalLayout/> </s:layout> <s:Panel title="My Application"> <s:Label text="Hello World" fontWeight="bold" fontSize="24"/> </s:Panel> </s:Application>
To compile this application from an MXML file to a SWF file, you need to run the "mxmlc" command as shown below:
C:\herong>\local\flex\bin\mxmlc hello.mxml Loading configuration file C:\local\flex\frameworks\flex-config.xml C:\herong\hello.swf (38342 bytes)
Now open hello.swf in Firefox, you should see the application running as shown in this picture:
Cool. Adobe Flex compiler, mxmlc, seems to be easy to use.
Table of Contents
Adobe Flash Player Plugin for Firefox
Adobe Flash Player Plugin for Chrome
Adobe Flash Player Plugin for Safari
Adobe Flash Player ActiveX for IE
Using "object" Elements for Flash Files
Using "embed" Elements for Flash Files
"mp3player" - MP3 Music Player
SWFObject - Hidding "object" behind JavaScript
SWFTools - SWF File Manipulation Tools
SWFC Script to Generate Flash SWF Files
ActionScript Embedded in SWFC Script
AS3Compile - ActionScript 3 Compiler
Downloading and Installing Flex SDK 4.1
►"mxmlc" - Adobe Flex Compiler
MXML Example Using Spark Components
Compiling ActionScript 3 Scripts with 'mxmlc'
Dumping SWF Files Containing ActionScript 3 Statements
Dumping SWF Files Generated from ActionScript 3 Classes
Dumping SWF Files Generated from MXML Applications