added gfx2gfx to Makefile, small fix in as3compile
[swftools.git] / src / as3compile.1
1 .TH as3compile "1" "April 2009" "as3compile" "swftools"
2 .SH NAME
3 as3compile - Compile .as ActionScript 3.0 files to swf.
4
5 .SH Synopsis
6 .B as3compile file.as [-o file.swf] 
7
8 .SH DESCRIPTION
9 Compiles a file written in ActionScript 3.0 to a SWF file.
10
11 .SH OPTIONS
12 .TP
13 \fB\-h\fR, \fB\-\-help\fR 
14     Print short help message and exit
15 .TP
16 \fB\-V\fR, \fB\-\-version\fR 
17     Print version info and exit
18 .TP
19 \fB\-v\fR, \fB\-\-verbose\fR 
20     Increase verbosity
21 .TP
22 \fB\-q\fR, \fB\-\-quiet\fR 
23     Decrease verbosity
24 .TP
25 \fB\-C\fR, \fB\-\-cgi\fR 
26     Output to stdout (for use in CGI environments)
27 .TP
28 \fB\-R\fR, \fB\-\-resolve\fR 
29     This flag will cause the compiler to try filenames like "FooBar.as" for classes named "FooBar".
30 .TP
31 \fB\-D\fR, \fB\-\-define\fR \fInamespace::variable\fR
32     Set a compile time variable (for doing conditional compilation)
33 .TP
34 \fB\-X\fR, \fB\-\-width\fR 
35     Set target SWF width
36 .TP
37 \fB\-Y\fR, \fB\-\-height\fR 
38     Set target SWF width
39 .TP
40 \fB\-r\fR, \fB\-\-rate\fR 
41     Set target SWF framerate
42 .TP
43 \fB\-M\fR, \fB\-\-mainclass\fR 
44     Set the name of the main class (extending flash.display.MovieClip)
45 .TP
46 \fB\-l\fR, \fB\-\-library\fR \fIfile\fR
47     Include library file \fIfile\fR. <file> can be an .abc or .swf file.
48 .TP
49 \fB\-I\fR, \fB\-\-include\fR \fIdir\fR
50     Add additional include dir \fIdir\fR.
51 .TP
52 \fB\-N\fR, \fB\-\-local-with-network\fR 
53     Make output file "local with networking"
54 .TP
55 \fB\-L\fR, \fB\-\-local-with-filesystem\fR 
56     Make output file "local with filesystem"
57 .TP
58 \fB\-T\fR, \fB\-\-flashversion\fR \fInum\fR
59     \fInum\fR must be >= 9.
60 .TP
61 \fB\-o\fR, \fB\-\-output\fR \fIfilename\fR
62     Set output file to \fIfilename\fR.
63 .SH EXAMPLE
64
65  The following is a basic as3 file that can be compiled e.g.
66  with \fBas3compile -X 400 -Y 400 smiley.as\fR
67
68  // smiley.as
69  package
70  {
71      import flash.display.MovieClip
72  
73      public class Main extends MovieClip
74      {
75          function Main()
76          {
77              this.graphics.beginFill(0xcccc00)
78              this.graphics.drawCircle(200,200,200)
79              this.graphics.endFill()
80              this.graphics.beginFill(0x000000)
81              this.graphics.drawCircle(140,150,50)
82              this.graphics.drawCircle(260,150,50)
83              this.graphics.drawRoundRect(140,270,120,10,20);
84              this.graphics.endFill()
85          }
86      }
87  }
88
89 .SH AUTHOR
90
91 Matthias Kramm <kramm@quiss.org>