Skip to content
Zwetan Kjukov edited this page Jan 20, 2016 · 2 revisions

AVM2 namespace

We don't make it obvious in the Redtamarin documentation but we use a global AVM2 namespace.

Same principle as the AS3 namespace, our AVM2 namespace is here to be able to access some internal definitions of the Redtamarin API.

You can see an example in the booting system

package shell
{
    use namespace AVM2;

    Program.onExit = function()
    {
        var f:Function;
        while( Program._exitcall.length > 0 )
        {
            f = Program._exitcall.pop();
            f();
        }

        Program.setExitListener( null );
    }

    Program.setExitListener( Program.onExit );
}

Because this namespace is global, you don't need to import it to use it.

But to activate it you need to do use namespace AVM2;.

TODO

Clone this wiki locally