flash on 2010-9-9

by zahir
♥0 | Line 19 | Modified 2010-09-09 04:06:04 | MIT License
play

ActionScript3 source code

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

package {
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var t:TextField = new TextField();
            addChild(t);
            t.width = t.height = 465;
            t.text = "wheel_test\n";
            addEventListener(MouseEvent.MOUSE_WHEEL, function(e:MouseEvent):void{
                t.appendText("\n" + e.delta);
            });
            addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void{
                t.appendText("\n" + "click");
            });
        }
    }
}