forked from: flash on 2012-8-14

by ohisama
♥0 | Line 35 | Modified 2013-02-21 10:19:07 | MIT License
play

ActionScript3 source code

/**
 * Copyright ohisama ( http://wonderfl.net/user/ohisama )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/qRSe
 */

// forked from 0x04.de's flash on 2012-8-14
package 
{
    import flash.system.Security;
    import flash.system.SecurityDomain;
    import flash.text.TextField;
    import flash.external.ExternalInterface;
    import flash.display.Sprite;
    public class VectorTest extends Sprite 
    {
        public function VectorTest() 
        {
            var vector : Vector.<Vector.<Object>> = new <Vector.<Object>>[new <Object>[{}, {}, {}]];
            var error : Error = null;
            if (ExternalInterface.available) 
            {
                try 
                {
                    Security.allowDomain('*');
                    Security.allowInsecureDomain('*');
                    ExternalInterface.call('alert', ['hello world!']);
                }
                catch (e : Error) 
                {
                    error = e;
                }
            }            
            var tf : TextField = new TextField;
            addChild(tf);
            tf.width = stage.stageWidth;
            tf.height = stage.stageHeight;
            if (error) tf.text = error.toString();
            else tf.text = 'done!';
        }
    }
}