I come to you because I have a very weird problem with namespaces.
I have tried two SDKs, and Flashdevelop before and after update.
I have also tried to target different Flash player versions.
I declare a simple namespace in a file, at package level, and try to import it on another file.
Although the "import" line doesn't bring an error, the compiler throw an error as soon as I try to use the namespace (in a "use" or in a function declaration), claiming that it cannot be found.
To be sure I have build a simple project with some code from an online tutorial:
But I get the same problem as for my test:
"Namespace was not found or is not a compile-time constant. mynamespace var myna:int;"
I have tried to declare it on the same File as a class, as it is done here:
But I get a message:
"A file found in a source-path can not have more than one externally visible definition."
I know that to be true for classes, but I thought you could declare namespaces that way.
I have tried to target a few Flash player versions with no luck.
I'm running out of ideas.
Here is the simple test project.
Can somebody test it for me, please?
Just tell me if it compiles?
Sorry for the badly shaped links.
This 50 post minimum to post a link is kinda lame, whatever the reason.
Precision, the namespace references are colored in blue by Flashdevelop.
So the syntax must be okay.