"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"
   <s:Panel title="My Application">
      <s:Label text="Hello World" fontWeight="bold" fontSize="24"/>

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:
MXML Example - Hello world!

Cool. Adobe Flex compiler, mxmlc, seems to be easy to use.

Last update: 2010.

Table of Contents

 About This Book

 Introduction of Adobe Flash

 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

 Flash Player Projector

 SWFTools - SWF File Manipulation Tools

 SWFC Script to Generate Flash SWF Files

 ActionScript Embedded in SWFC Script

 AS3Compile - ActionScript 3 Compiler

Adobe Flex SDK 4

 Downloading and Installing Flex SDK 4.1

"mxmlc" - Adobe Flex Compiler

 Spark Component Architecture

 MXML Example Using Spark Components

 Compiling ActionScript 3 Scripts with 'mxmlc'

 SWF Disassembler in Flex SDK

 Dumping Simple SWF Files

 Dumping SWF Files Containing ActionScript 3 Statements

 Dumping SWF Files Generated from ActionScript 3 Classes

 Dumping SWF Files Generated from MXML Applications

 SWF File Structure and Tags

 SWF File Processing Rules

 SWF Files for Video and Audio Streams

 Outdated Tutorials


 PDF Printing Version