- First ActionScript 3 Example

This section provides a tutorial example on using AS3Compile to compile a simple ActionScript 3 example into a SWF Flash file.

Now let's use the example provided on the SWFTools Web site to learn how to use AS3Compile:

1. Create a text file called with these ActionScript3 statements:

package {
   import flash.display.MovieClip
   public class Main extends MovieClip {
      function Main() {,200,200),150,50),150,50),270,120,10,20)

2. Compile file into a SWF file, smiley.swf:

C:\herong>\local\SWFTools\as3compile -X 400 -Y 400

3. Generate a HTML file, smiley.html, to view the SWF file:

C:\herong>\local\SWFTools\swfdump -E smiley.swf > smiley.html

4. Open smiley.html in a Web browser. You will see:

AS3Compile - Smiley
AS3Compile - Smiley

Congratulations, you have successfully compiled an ActionScript 3 source code into a SWF application with AS3Compile!

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

 What Is AS3Compile? - First ActionScript 3 Example - Adding Graphics and Text - Showing System Properties

 Adobe Flex SDK 4

 SWF File Structure and Tags

 SWF File Processing Rules

 SWF Files for Video and Audio Streams

 Outdated Tutorials


 Full Version in PDF/EPUB