as3compile: small bugfixes, added documentation
[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\-l\fR, \fB\-\-library\fR \fIfile\fR
44     Include library file \fIfile\fR. <file> can be an .abc or .swf file.
45 .TP
46 \fB\-I\fR, \fB\-\-include\fR \fIdir\fR
47     Add additional include dir \fIdir\fR.
48 .TP
49 \fB\-N\fR, \fB\-\-local-with-network\fR 
50     Make output file "local with networking"
51 .TP
52 \fB\-L\fR, \fB\-\-local-with-filesystem\fR 
53     Make output file "local with filesystem"
54 .TP
55 \fB\-T\fR, \fB\-\-flashversion\fR \fInum\fR
56     \fInum\fR must be >= 9.
57 .TP
58 \fB\-o\fR, \fB\-\-output\fR \fIfilename\fR
59     Set output file to \fIfilename\fR.
60 .SH EXAMPLE
61
62  The following is a basic as3 file that can be compiled e.g.
63  with \fBas3compile -X 400 -Y 400 smiley.as\fR
64
65  // smiley.as
66  package
67  {
68      import flash.display.MovieClip
69  
70      public class Main extends MovieClip
71      {
72          function Main()
73          {
74              this.graphics.beginFill(0xcccc00)
75              this.graphics.drawCircle(200,200,200)
76              this.graphics.endFill()
77              this.graphics.beginFill(0x000000)
78              this.graphics.drawCircle(140,150,50)
79              this.graphics.drawCircle(260,150,50)
80              this.graphics.drawRoundRect(140,270,120,10,20);
81              this.graphics.endFill()
82          }
83      }
84  }
85
86 .SH AUTHOR
87
88 Matthias Kramm <kramm@quiss.org>