Error "Type not found" for classes in swf

I am on Mac 10.12.2 with haxe 3.4.0 using lime 3.5.2 & openfl 4.5.2, when I try to build the project, I get this error:

src/com/clientside/compoents/Fan.hx:34: characters 15-24 : Type not found : FanBlades

where, line 34, is:

var bladesBtm:FanBlades;

I have listed the swf library in the xml file as:

<library path="assets/fan.swf" preload="true" generate="true"  />

I did not list the swf library in the xml file, as swf is already within openfl now? even when swf library included, I got the same error.

And I also tried to add embed=“true” and type=“swflite” attribute, with no luck.

In the Export/html5/debug/haxe I only can see those files:

ApplicationMain.hx
DefaultAssetLibrary.hx
debug.hxml
final.hxml
release.hxml

I am sure that the type FanBlades is in the fan.swf but why I get this error?

Try a clean build again, you should get a “_generated” directory under “Export/html5/debug/haxe” if all goes well :slight_smile: … and the symbol in the SWF is set for “Export for ActionScript”, right?

Thanks for fast reply, Yes, the symbol in the SWF is set for “Export for ActionScript”, but, there is no directory “_generated” under “Export/html5/debug/haxe”, although I have deleted Export/html5 folder and did a new build

What do you get if you do a -verbose build?

here: https://gist.github.com/hopewise/4c641d109171a1e8222197a5e59c2a0f

Hmm, yeah it says it processed the SWF library, but generate="true" should be enough :frowning:

So, what could be wrong? or what do you advice?

Either we have a fix in the repositories (so a dev build of Lime and OpenFL might fix it) or there might be something else going on, and we’d have to look at your exact files, and dig in to see what might be wrong

I have uploaded the swf file, so that you can test at your side here: https://s3.amazonaws.com/swfs.lab.com/fan.swf
The class name is FanBlades my current build file is here: https://gist.github.com/hopewise/ab195871900a4d3fc4328f392a914d87
Shall I provide further details?

I looked at the SWF in FlashDevelop, it says there are no classes, but I have another test SWF that is generating properly. Perhaps the SWF needs to be exported again? :slight_smile:

That’s a good news :slight_smile:, I had this error when try to generate the swf file:

However, the swf file is generated, I thought it the classes will be there…
I am using Flash CS6, what do you recommend?

Does this help?

https://support.apple.com/kb/DL1572?locale=en_US

Yes! Awesome :grinning: