flash on 2010-2-2

by 9re
♥0 | Line 29 | Modified 2010-02-02 12:20:32 | MIT License
play

ActionScript3 source code

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

package {
	import flash.text.TextField;
	import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var a:MouseEvent;
            var tf:TextField = new TextField;
            try {
            		a.altKey;
            } catch(e:Error) {
            		tf.appendText(e + '\n');
            }
            
            try {
	            	a = MouseEvent(new Sprite);
            } catch(e:Error) {
            		tf.appendText(e + '\n');
            }
            
            try {
	            	this["b"]
            } catch(e:Error) {
            		tf.appendText(e + '\n');
            }
            tf.width = tf.textWidth + 4;
            tf.height = tf.textHeight + 4;
                        
            addChild(tf);
        }
    }
}