Haxe NME evaluation

(edited]

Given the recent annoucements about Flex, I have started a second round of looking around for alternatives. I had a quick look at Haxe a few years ago. At the time, it exported mostly to flash and had less features than Flex. I didn't see how I could use it for interactive applications.

But a new project has emerged, HaXe NME, which seems full of promise. Same code base to run on desktops and mobile devices (similar to AIR) but with also the ability to export to HTML5. That's the latest feature I was interested in testing out.

I went for a simple carousel that somehow captures what my minimal requirements would be for designing (non game) interactive applications on devices. The ability to read config data from an external file (saving data would be better, read/write to a sqlite db would be perfect), sprites with animation and interactivity and text that be assigned any custom font.

Here is what I came up with, testing with html5 and flash export:

Flash export

HTML5 export

Source code: widged/NmeCarousel @github

The flash export is pretty good... but that is kind of expected.

The html5 export presents a few issues. It doesn't always load properly. Hit page refresh if you can see only a single line of text when you roll over any planet. I had to hit the forums to the get multiline text to work (the text shows as multiline only if the textfield border is set to true and autosize is not used) but I am still having issues with using a custom font. The zindex appears to be inverted between flash and html5. The animation is noticeably slower. It kind of stops as the picture description gets updated in the textfield on the right. This takes enough time to hinder the experience.

The mac export couldn't read an external file using URLLoader and nme.fileSystem.File doesn't appear to be fully functional yet. I haven't tried the android export yet. Because of the requirement to work offline, it makes sense only when able to access the local file system.

Powered by Drupal, an open source content management system