flash on 2010-4-1

by 1031no
♥0 | Line 22 | Modified 2010-04-01 21:24:29 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    import flash.utils.Timer;
    import flash.text.TextField;
    import flash.events.Event;
    public class FlashTest extends Sprite {
        public function FlashTest(){
            // write as3 code here..
        addEventListener(Event.ENTER_FRAME,loop);
        function loop(event:Event):void{
        var clock:TextField = new TextField();
        clock.x = 100;
        clock.y = 100;
        addChild(clock);
        var date:Date = new Date();
        var hh:Number = date.getHours();
        var mm:Number = date.getMinutes();
        var ss:Number = date.getSeconds();
        clock.text = hh+":"+mm+":"+ss+"";
        }
        }
    }
}