Refactor as2_to_haxe error

hi
i am new to openfl, i am trying to convert swf into html5.
openfl-samples are working good.

$openfl test html5 (under PiratePig works good)

when i try to convert my as2 scripts into haxe,

$ haxelib run refactor as2_to_haxe.cmd

Called from ? line 1

Called from Main.hx line 72

Called from hant/Process.hx line 196

Called from hant/Process.hx line 99

Called from a C function

Called from hant/Process.hx line 174

Called from hant/Process.hx line 173

Called from a C function

Called from C:\MyProg_tools\motion-twin\haxe\std/neko/Lib.hx line 42

Uncaught exception - load.c(237) : Failed to load library : hant.ndll (dlopen(hant.ndll, 1): image not found)

Stack trace:

Called from a C function

Called from hant/Process.hx line 10

Called from a C function

Called from hant/Process.hx line 10

Called from hant/Process.hx line 174

Called from a C function

Called from hant/Process.hx line 99

Called from hant/Process.hx line 196

Called from Main.hx line 72

Called from ? line 1

i tired the same in mac, ubuntu 18, windows10, all are getting the same error

please help.

thank you

Hey, that’s cool! I haven’t seen that library before

Perhaps the library works for Haxe 3.4.2 but needs a patch to run using Haxe 4.x

Could you try installing Haxe 3 and giving it another try?

1 Like

thank you
i found the right format to use to convert the as2 files in to hx

$haxelib run refactor convertFile web1.as web1.hx as2_to_haxe.rules .

it is ok for me to convert one by one.

i setup NanyaCat demo, and added my swf library in the Assets. it shows the first screen in the html5. when i run (it gives me an error - the embeded font is not found, where to keep the font / image folders)

openfl test html5

i want to know where to keep the converted .hx files (action script 2 files) and how they are linked to the html5 conversion?

please guide

thank you

You can add assets using the <assets /> tag in your project.xml, like <assets path="Assets" rename="assets" />

Most of our samples include a <source path="Source" /> tag which means it will look for Haxe code within the “Source” directory, but you can also add other directories if you prefer

1 Like

thank you

my current situation is the same as this

my swf has - multiple supporting swfs and action scripts (version 2)

how did you help that user? if you can guide me the steps i can finish the conversion.

i can see the main swf first screen is playing in the html5 export.

few more steps, i can successfully covert the swf into html5.

thank you for you help.

thank you a lot.