Search code examples
iphoneflashactionscripthaxehxcpp

Haxe - Flash project compiles fine, but won't compile using hxcpp


In summary, I think my question is this:

How can I force hxcpp to compile haxe code for Flash 8 ?

Here's where I'm at. I'm new to haxe, and am trying to get a sample from here:

http://tilestudio.sourceforge.net/flash/Demo.html

to compile using hxcpp, in my tests to see how haxe compiled apps work on the iphone.

I've gotten other samples to compile fine and put them on the iphone, but when I compile this sample, it complains with things like:

Demo.hx:32: characters 17-53 : Class not found : flash.MovieClip
Demo.hx:42: characters 20-36 : Class not found : flash.Key
Demo.hx:44: characters 43-60 : Class not found : flash.Stage

and as I mentioned, this compiles fine using the following hxml file (flash.hxml):

-swf Demo.swf
-swf-lib DemoRes.swf
-main Demo.hx
-swf-header 480:320:100:808080

but fails as detailed above using this (cpp.hxml):

-main Demo.hx
-lib nme
-lib neash
-swf-lib DemoRes.swf
--remap neko:cpp
--remap flash:neash
-cpp cpp

So I think the problem is that hxcpp is targeting Flash version 9 swf's, and the haxe code is targetting Flash 8. I tried forcing it to accept Flash 8 syntax using "-swf-version 8" but it doesn't work (gives the same errors).


Solution

  • I asked Hugh, the guy behind the hxcpp compiler part of Haxe that's doing all the haxe / iphone / hxcpp stuff, and he basically said that Flash 8 isn't an available target for hxcpp, just Flash 9 and up.... Thanks for the response Hugh!

    http://gamehaxe.com/2009/08/17/switched-to-immix-for-internal-garbage-collection/#comment-309