Hi, people.
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:
ActionScript Code:
jacksondunstan.com/articles/1242
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.
ActionScript Code:
91.121.109.140/vrac/Test%20namespace.zip
Can somebody test it for me, please?
Just tell me if it compiles?
Many thanks.
Sorry for the badly shaped links.
This 50 post minimum to post a link is kinda lame, whatever the reason.
EDIT:
Precision, the namespace references are colored in blue by Flashdevelop.
So the syntax must be okay.