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 2013-5-22

Get Adobe Flash player
by ifrost 22 May 2013
    Embed
/**
 * Copyright ifrost ( http://wonderfl.net/user/ifrost )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/dHve
 */

package {
    import flash.display.Graphics;
    import flash.text.AntiAliasType;
    import flash.text.TextFormat;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        
        public static const to:int = 82;
        
        public var current:int;
        
        public var text:TextField;
        
        public function FlashTest() {
            // write as3 code here..
            text = new TextField();
            text.width = 450;
            text.height = 500
            
            
            text.defaultTextFormat = new TextFormat("Arial", 230, 0x6f7072, true, null, null, null, null, "right");
            
            current = 0;
            text.text = " 0%";
            
            var timer:Timer = new Timer(20, to+1);
            
            timer.addEventListener(TimerEvent.TIMER, t);
            
            addChild(text);
            timer.start();

        }
        
        public function t(event:TimerEvent):void {
            text.text = current + "%";
            current++;
        }

    }
}