[Solved] Building for HTML5 fails: Invalid field access : superclass

Hello,

I got my Flash projected converted to Haxe and it is running in the Flash target. However when I try to compile it to HTML5 I see this compiler message:

Error: Invalid field access : superclass
Build halted with errors.

No line or file info, just this output. Any idea what is wrong?

Thanks in advance,
Ruben

Search your code, does superclass show up in the code somewhere?

Thanks, I searched the project and the term “superclass” shows up in a couple of classes from libraries I am using, for example in lime, openfl and robotlegs. It also shows up in the file ApplicationMain.hx that is located in the bin/flash/haxe folder. I assume it was auto generated?

However none of my own classes include the term “superclass”. I am overriding functions and calling “super.” in a few cases and I am also overriding some Flash DisplayObjects getters and setters, could that be related to the problem?

It’s possible that it’s a super call of some kind. Perhaps it would be possible to comment things out in your project so that you can try and isolate what is triggering this error. If you open the HTTP debugger, is there no stack trace or error location?

Thank you, I was able to isolate the error, there seems to be a problem with the preloader.swf that we are using.

It compiles if I comment out the line <library path="assets/swf/preloader_fx.swf" preload="true" />

We are using the same preloader for different games and export the swf via JSFL that removes layers that are not needed for the current game. I did the same process manually and removed all elements from the .fla that are not needed in my case and exported the same preloader_fx.swf. The file size is the same but the manually exported file compiles without issues. So I assume there is some edgecase with the .fla / export process.

Maybe this description is handy for someone else in the future.

Thanks for your help on the issue!