flash on 2011-3-26

by enecre
♥0 | Line 20 | Modified 2011-03-26 15:55:48 | MIT License
play

ActionScript3 source code

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

package {
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.events.*;
    public class FlashTest extends Sprite {
        private var tf:TextField = new TextField;
        public function FlashTest() {
            // write as3 code here..
            tf.width = tf.height = 465;
            addChild(tf);
            
            var sp:Sprite = new Sprite;
            tr(sp.willTrigger(MouseEvent.CLICK));
            sp.addEventListener(MouseEvent.CLICK, function():void{});
            tr(sp.willTrigger(MouseEvent.CLICK));
        }
        
        private function tr(...o:Array):void{
            tf.appendText(o + "\n");
            tf.scrollV = tf.maxScrollV;
        }

    }
}