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

swastika

Get Adobe Flash player
by Highly 08 Dec 2010
/**
 * Copyright Highly ( http://wonderfl.net/user/Highly )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/aMGR
 */

package {
    import flash.display.Sprite;
    import flash.display.Graphics;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.text.TextField;
    //k what up we're gonna get serious now
    public class FlashTest extends Sprite {
        public function FlashTest() {
            //ok now we add a timer so we can do fun shit LOL
            var sp:Sprite = new Sprite();
            var ti:Timer = new Timer(10,0);
            var out1:TextField = new TextField();
             out1.x=0;
             out1.y=0;
             out1.selectable = false;
             out1.multiline = true;
             out1.width = stage.stageWidth;
             out1.height = stage.stageHeight;
             out1.text = "I'm Gay"
             addChild(out1);
            ti.addEventListener(TimerEvent.TIMER, tmr);
            ti.start();
            sp.graphics.lineStyle(1,0x000000);
            sp.graphics.moveTo(5,-5);
            sp.graphics.lineTo(0,-5);
            sp.graphics.lineTo(0,0);
            sp.graphics.lineTo(5,0); 
            sp.graphics.lineTo(5,5);
            sp.graphics.moveTo(0,0);
            sp.graphics.lineTo(0,5);
            sp.graphics.lineTo(-5,5);
            sp.graphics.moveTo(0,0);
            sp.graphics.lineTo(-5,0);
            sp.graphics.lineTo(-5,-5)
            sp.scaleX=-1;
            sp.width *= 5;
            sp.height *= 5;
            sp.x=stage.stageWidth/2;
            sp.y=stage.stageHeight/2; 
            addChild(sp);
            // alright now we're going to add a rotation velocity variable and play for a second
            var vr:Number = 0;
            var sv:Number = 0.2;
            var b:Boolean = false;
            var vy:Number = 0;
            var g:int = 1;
            function tmr(e:TimerEvent):void{
                if(!b){
                    vr+=sv;
                    if(vr>=15){
                        b=true;
                        vy = -15;
                    }
                }else{
                    vr-=sv;
                    if(vr<=-15){
                        b=false
                        vy = -15;
                    }
                }
                sp.y+=vy;
                if(sp.y<stage.stageHeight/2){
                    vy+=g;
                }else{
                    vy*=-0.7;
                }
                out1.text = Math.round(sp.rotation)+"";
                sp.rotation+=vr;
            }

        }
    }
}