flash on 2011-3-22

by uly
♥0 | Line 20 | Modified 2011-03-22 17:42:05 | MIT License
play

ActionScript3 source code

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

package {
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var d:Date = new Date();
            var txt:TextField = new TextField();
            addChild(txt);
            var str:String = String(d.getTime());
            txt.text = str;
            var d2:Date = new Date();
            d2.setMilliseconds(parseInt(str));
            var txt2:TextField = new TextField();
            addChild(txt2);
            txt2.width = 200;
            txt2.y = 15;
            txt2.text = d2.toString();
        }
    }
}