flash on 2012-11-23

by asou_jp
♥0 | Line 17 | Modified 2012-11-23 20:04:39 | MIT License
play

ActionScript3 source code

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

package {
    import flash.text.TextField;
    import flash.external.ExternalInterface;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..

                var tf:TextField = new TextField();

                tf.text = String(ExternalInterface.available);
                

                stage.addChild(tf);
                try {
                    ExternalInterface.call("function () { console.log('test'); }");
                } catch (e:Error) {
                    tf.text = "ashartha";
                }

        }
        
        
        
    }
}