Repository navigation
Quickstart
github-actions[bot] edited this page Oct 11, 2026
·
4 revisions
This guide gets you from zero to a first AS3 -> Haxe conversion.
- Java runtime (the converter is
converter.jar) - Haxe and haxelib, to install it from lib.haxe.org
- Node.js and npm, only to build it from source (Haxe dependencies are managed by Lix)
From lib.haxe.org:
haxelib install ax4Or build it from source in a clone of this repository:
npm i lix
npx lix download
npx haxe build.hxmlExpected output: converter.jar.
Example:
my-project/
as3-src/
lib/
playerglobal.swc
config.json
{
"src": "as3-src",
"hxout": "haxe-out",
"swc": [
"lib/playerglobal.swc"
]
}Use forward slashes (/) in paths even on Windows.
The converted code needs the compatibility runtime (compat/). With the haxelib install, add -lib ax4 to your Haxe build. Otherwise, add this field to copy it next to the output:
"copy": [
{ "unit": "path/to/ax4/compat", "to": "haxe-out/compat" }
]From the project directory:
haxelib run ax4 config.jsonWith a source build, run the jar instead:
java -jar path/to/ax4/converter.jar config.jsonEither way, paths in config.json are relative to the directory you run it from.
The converter will:
- Parse
.asfiles undersrc - Type and rewrite code
- Write
.hxfiles intohxout - Copy non-AS assets from
srcintodataout(orhxoutwhendataoutis not set)
- Run converter
- Fix unsupported AS3 constructs or add targeted rewrites
- Re-run converter
- Compile generated Haxe project
- Use Config reference for all options
- Use Examples for practical templates
- Use Troubleshooting for common failures