Actionscript 2, Flash, Web developer

ASNative – Undocumented Flash command list

ASNative is a undocumented function reference list that can be called from Flash.

For example :

 t = ASnative(100, 4); // trace
 function t("hi"); // output: hi

Find out more on OSFlash and Flashcoders Wiki

Advertisements
Standard

4 thoughts on “ASNative – Undocumented Flash command list

  1. Lusoned says:

    Ii is said that ASnative is top level as, but what does that means exactly? As an example:
    //random num from 2 to 9 (test)
    function rand(i,j){
    r = ASnative(200, 11)()*(j-i)+i;
    return ASnative(200, 10)(r);
    }
    var num:Number = rand(2,9);
    ASnative(100, 4)(num);

    Is there any advantage in coding like this?
    Thanks
    lusoned

  2. Chris Kitching says:

    I have done some experiments with this, and found that, on average, ASnative is significantly slower to execute than just calling the function normally. My experiment was iterativley calling Math.random() using both the normal notation and the ASnative notation, after 4000 tried with each, the program outputted the average time taken to run 200 operations using that function, and in every single test Math.random() was faster than ASnative(200, 11);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s