Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Compiling and running SWF and ABC files

Yury Delendik edited this page Feb 16, 2015 · 1 revision

Compile ActionScript 3 source code

To compile AS code use "utils/compileabc.js" utility to create ABC file:

node utils/compileabc.js path-to-source.as

If you need to compile code that uses playerglobal library -- add '-p' parameter; if you need to produce SWF file -- add '--swf':

node utils/compileabc.js -p --swf path-to-source.as

Running ABC/SWF from command line

The shell utility can be used to run ABC or SWF files.

utils/jsshell/js build/ts/shell.js -x path-to-compiled.abc

You can also add '-i' switch to disable the compiler during execution.

Unit testing compared the output of the shell.js with avmshell. To execute ABC with avmshell, find OS specific builds in the utils/avmshell folder:

utils/avmshell/mac/avmshell path-to-compiled.abc

Running ABC/SWF with inspector

The rfile= inspector query parameter can be used to specify ABC/SWF file, e.g. open a web browser at http://localhost:8000/examples/inspector/inspector.html?rfile=/test/avm2/pass/compiled.abc.