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:


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?


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:
The class name is FanBlades my current build file is here:
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?

Yes! Awesome :grinning: