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

In conclusion, I think my question is this:

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

Here is where I am. I am 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 iphone.

I have other samples to compile and post to iphone, but when I compile this sample it complains about 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 is compiled using the following hxml file (flash.hxml):

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

      

but failing as described above with this (cpp.hxml):

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

      

So I guess the problem is that hxcpp is targeting Flash 9 swf and the haxe code is targeting Flash 8. I tried to get it to accept Flash 8 syntax with "-swf-version 8" but it doesn't work (gives the same errors).

+2


source to share


2 answers


I asked Hugh, the guy behind the Haxe hxcpp compiler part that does all the haxe / iphone / hxcpp stuff, and he basically said that Flash 8 is not an available target for hxcpp, just Flash 9 and up ... Thanks for the answer Hugh !



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

+1


source


While Neash is fully complete, I'm not sure if it displays 100% Flash API. This suggests that you probably have a problem with -swf-lib that won't work with Neash; this means that it is impossible to embed swf files on platforms other than flash. You must manage your assets in different ways. It may even be possible to implement SWF resources in the not too distant future, but first someone has to write a good decompiler that transforms them for the intended purpose.



+1


source







All Articles