Tips for converting ActionScript to OpenFl/Haxe

I am trying to convert Actionscript 3 based Flash apps to HTML5 based OpenFl/Haxe apps. I am starting to find differences between the two languages that forces to me to make these changes:

There are is public class, just class
All types must start with uppercase: int -> Int
There’s no “protected”: protected -> private
Type coercion is different: aVar as Number -> Number(aVar)
There’s no constant type: constant -> var
Setters and getters are different: set varName -> set_ varName
Number -> Float
Boolean -> Bool

I’m sure I’ll encounter more. And I’m sure I’m not the first person to try to convert from AS3 to OpenFl/Haxe. Does anyone have any tips on how to better discover these differences than to go through the complete Haxe manual and then depend on error messages I get from doing a build. Is there a description somewhere of the differences between the two?

Also is there a way to have a Visual Studio Code build not stop at the first error and keep going listing all errors?

Thanks in advance.


Take a look at

I tried it on a few test classes and it worked great. Thanks!

I found that as3hx inserts some new commands that are not recognized and throws errors, i.e. as3hx.Compat.parseFloat. What do I need to do to for “Type not found : as3hx.Compat” errors?

A few more resources:

So apparently as3hx has some classes it expects you to compile into your app:

Just add <haxelib name="as3hx" /> to project.xml, and it’ll be able to find this function.

Thanks you very much!!!