Hello World !! on 2010-01-22

by komatsu
♥0 | Line 26 | Modified 2010-01-25 03:52:13 | MIT License
play

ActionScript3 source code

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

package {
	import flash.text.TextFormat;
	import flash.text.TextField;
    import flash.display.Sprite;
    import caurina.transitions.Tweener;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
           
            var stw:uint = stage.stageWidth;
            var sth:uint = stage.stageHeight;
            
            var tf:TextField = new TextField();
            tf.text = "Hello world!!";
            tf.x = stw;
            tf.width = stw;
            tf.y = (sth - tf.height)/2;
            tf.selectable = false;
            
            var fmt:TextFormat = new TextFormat();
            fmt.size = 50;
            fmt.align = "center";
            fmt.color = 0x0000ff;
            
            tf.setTextFormat(fmt)
            
            addChild(tf);
            
            Tweener.addTween(tf , {x:0 , delay:1 , time:1 , transition:"easeOut"});
            Tweener.addTween(tf , {x:-stw , delay:5 , time:1 , transition:"easeIn"});
            
            
        }
    }
}