Ramblings

November 10, 2006

Flash: Cast to Array with MTASC

Filed under: flash — michaelangela @ 3:09 am

The code got a bit mangled… but the idea is that the Array() operator can cause problems leading to unpredictable results…

lessrain blog » Blog Archive » Flash: Cast to Array with MTASC

public function ArrayTest()
{

    testArray(Array({x:1}));
    // Flash: Array.length: 1
    // MTASC: Array.length: undefined
    testArray([ {x:1} ]);
    // Both: Array.length: 1
    testArray(new Array( {x:1} ));
    // Both: Array.length: 1
}
}

powered by performancing firefox

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

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

Blog at WordPress.com.

%d bloggers like this: