"using" or "include" statement in Javascript?

Hi,

I’ve figured out how to override C# methods from Javascript, how to use namespaces (see images) and it all works great.

The only aspect of C# that I cannot reproduce in Javascript is “using” statement on the top of the file.

Instead of the line

var item:Com.DankoKozar.Unity.Gui.Forms.ContactsForm = new Com.DankoKozar.Unity.Gui.Forms.ContactsForm();

… I’d like to have a line

var item:ContactsForm = new ContactsForm();

… and the namespace defined on the top, just before the class definition, like:

using Com.DankoKozar.Unity.Gui.Forms.ContactsForm;

Thanks…


Substitute “using” with “import”.

–Eric

Great, that’s it!

Thanks