In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2010-1-23

Get Adobe Flash player
by CokeIsWater 27 Jan 2010
    Embed
/**
 * Copyright CokeIsWater ( http://wonderfl.net/user/CokeIsWater )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/pgEp
 */

package {
	import flash.utils.Timer;
	import flash.text.engine.TabAlignment;
	import flash.text.*;
    import flash.display.Sprite;
    import flash.events.Event;
    import caurina.transitions.Tweener;
    public class HelloWorld extends Sprite {
        public function HelloWorld() {
            
            var stw:uint = stage.stageWidth;
            var sth:uint = stage.stageHeight;
            
            var tf:TextField = new TextField();
            tf.text = "HelloWorld";
            tf.width = stw/2;
            tf.y = (sth - tf.height)/2;
            
            var fmt:TextFormat = new TextFormat();
            fmt.size = 50;
            fmt.color = 0xff0000;
            fmt.align = "center";
            
            tf.setTextFormat(fmt);
            
            addChild(tf);
            
            tf.x = 0;
            
            tf.addEventListener(Event.ENTER_FRAME , enterFrameFunc);
            function enterFrameFunc(e:Event):void{
            		if(tf.x >= stw-100){
            			tf.x -= 10;
            		}else if(tf.x < stw-100){
            			tf.x +=10;
            		}
            	}
        }
    }
}