Use default "haxelib install nape" to AS3

58 views
Skip to first unread message

Tiger Chan

unread,
Apr 13, 2016, 4:37:47 AM4/13/16
to Haxe
zpp_nape/geom/PartitionedPoly.hx:1381: This expression cannot be generated to AS3

I am using haxelib install nape with version : v2.0.20.
I have check that line just a statement "break;"

Why the default package cannot be generated?

Tiger Chan

unread,
Apr 13, 2016, 6:27:30 AM4/13/16
to Haxe
I change my haxe tool kit to development version than no error.
I will keep update if either everything smooth or any.

Tiger Chan

unread,
Apr 13, 2016, 12:09:34 PM4/13/16
to Haxe
I have generated AS3 source code with the latest haXe latest windows installer, but the surprising me is AS3 code cannot be compiled.

flash/Boot.as:229
Error: Implicit coercion of a value with static type Object to a possibly unrelated type Array.

var arr : Array = this;
                        ^


On Wednesday, April 13, 2016 at 4:37:47 PM UTC+8, Tiger Chan wrote:

JLM

unread,
Apr 13, 2016, 7:16:09 PM4/13/16
to Haxe
Haxe compiles direct to swf byte code. The as3 output is rarely used and not well supported. If you must use AS3 which is inferior in most cases - bar perhaps e4x depending on your view point, then I would suggest using a Haxe swc of Nape with AS3, it should be well supported with flashdevelop but can be a pain to setup, but it going to take a lot more effort than just using Haxe all the way.

If it is your choice to use as3 - then I wonder why !!! - if it's company policy then totally understand :( , I have similar feeling about js verses haxe js, but sometimes porting or extern large code bases can be too much of a pain.

Nape is quite a complex library it is probably not ideal for as3 export so good luck!!! - better to use a haxe swc or load a haxe swf at runtime, or rewrite your as3... which I am sure we can help with :)

Tiger Chan

unread,
Apr 13, 2016, 11:02:11 PM4/13/16
to Haxe
Major reason that I choose to export AS3 is I don't find the right way to export swc.

Someone to tell "-swf Output.swc" I suppose it just change extension rather than create a normal catalog.xml.
After a carefully study and try to unzip that, I've solved now.

But another problem come out...
Reply all
Reply to author
Forward
0 new messages