Reputation: 125
Is it possible to convert ActionScript 3 to Haxe? I have seen a converter on the Haxe website but I have no idea on how to use it! All it is, is a bunch of code which I am not understanding. If someone would show me how to use it, it would be a great help!
Upvotes: 3
Views: 2732
Reputation: 450
I recently converted quite a large project from Actionscript 3 to Haxe and I'd strongly suggest doing it manually yourself: the conversion tools I used did not seem entirely reliable (and required a lot of manual fixes anyway) and, in the process, you will begin to learn the key differences between the two languages.
This AS3 to Haxe cheat sheet should allow you to do a simple Find and Replace on the most basic changes (e.g. void
=> Void
, public class MyClass
=> class MyClass
) and clearly outlines the differences on slightly more complicated ones that Find and Replace may not be able to handle alone (e.g. loops, casting, reflection).
This comparison of an AS3 to Haxe code snippet should also help your understanding if the cheat sheet is not clear enough.
Upvotes: 5
Reputation: 149
I have ported as3tohx convertor(from Caffeine-hx repository) to Haxe 3.
It's not perfect, and can throw bugs, but you can save some time if you use it.
as3tohx folder/with/as3/code
as3tohx will generate output folder with Haxe code.
https://github.com/as3boyan/as3tohxfromcaffeine-hx
Upvotes: 2