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

AS3 namespace

It is not documented, but there is a global AS3 namespace declared in the ActionScript 3.0 builtins.

You can see reference to it in the Object class for example

package
{

    public dynamic class Object
    {
        AS3 function hasOwnProperty(V=void 0):Boolean
        {
            return _hasOwnProperty(this,V)
        }

// later in the code

        [API(CONFIG::VM_INTERNAL)]
        public static function _init()
        {
            prototype.hasOwnProperty =
            function(V=void 0):Boolean
            {
                return this.AS3::hasOwnProperty(V)
            }
        }
}

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

By default, when you compile with the argument -AS3
the different AVM2 runtimes do use namespace AS3;.

TODO

Clone this wiki locally