How to convert an AS3 ANE to Haxe • Andy Moore
I found this post really valuable if you are needing to use someones existing SWF library in a haxe project. Step 3 and 4 is the part I was looking for so here you go.
Open up the command-line prompt. You should already have Haxe installed if you are reading this, so this magical command should work for you:
haxe -swf nothing.swf --no-output -swf-lib library.swf --gen-hx-classes
This command beautifully creates empty classes (like header reference files) for all the stuff in the library you want to use.
The above command will have generated a directory full of .HX source files. You can ignore most of the base system stuff (it’ll generate classes for basic things like array.hx and Sprite.hx) and instead pick out the bits you need – for me, that was the /com/company/extensionName/ directory. Copy this directory to your project’s source folder.