Throwing a haXe !
Friday, June 19th, 2009I’ve been meaning to try haXe for flash development for a while. At first I thought that it could not target flash 10, but I was wrong. All you have to do is add ‘-swf-version 10′ to your compiler arguments and you’re good to go. In case you still don’t believe, here is a proof of concept, using the flash player 10 ‘rotationY’ attribute of the Sprite class.
flash 10 required
You may be wondering, ‘why bother with haXe?’ so here are some reasons I can think of …
- faster compiler (pretty much instantaneous in my experience so far)
- richer language constructs in haXe (enums, more flavours of types)
- access to superfast ByteArray currently only available to Alchemy
- multiple platform targets…Javascript, PHP, even iPhone
Da Code
the .hxml is just a way of setting compiler arguments. In future I’m just going to set them inline , but its useful in this case to see the argument for targeting Flash Player 10. I have some ideas for using my homegrown Vim Actionscript autocompletion script in haXe.