i had totally the same error while public class declared etc all same setting.
let me explain, and also the specific way i fixed it (might be specific for my project so sorry if it doesn't help you).
so my setting was:
- i was using Flex SDK swc file in FlashIDE source path, in order to use Flex [Embed] tag in my FlashIDE project.
- i was embedding different fonts with the [Embed] tag
- okay thats the setting. Very specific and maybe you have different one.
public class MyCustomFonts
[Embed(source="assets/Verdana.ttf", fontName="_Verdana", fontWeight = "normal", mimeType="application/x-font-truetype")]
public static var _Verdana:Class;
[Embed(source = "assets/Verdana Bold.ttf", fontName = "_Verdana", /*fontWeight = "bold", */mimeType = "application/x-font-truetype")]
public static var _VerdanaBold:Class;
Now when the error occured and when not:
- error did occur when - IN THE Document FLA file, i specified "MyCustomFonts" as Document class.
- error didn't occur when - IN THE Document FLA file, i did NOT specify ANY Document class, but rather used actionscript and instantiated instance of that class using:
var f:MyCustomFonts = new MyCustomFonts(); - that worked as expected;
so i just described behavior, but from perception it seems there was some issue with the Document class connected with the FLA itself.
Im just glad it works now, but if you find the true reason of the issue let us know!
PS: one more thing to note: at some point, when the error was occuring, i started running some other FLA files that worked well before, and THE SAME ERROR WAS POPPING UP IN EACH ONE OF THEM . So i unplugged the flex swc, recompiled, same error in all files still (persistent biach). Restarted FlashIDE, with swc plugged in, recompiled - the other files were now working correctly, the MyCustomFonts was still displaying the error (weird!).