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 2016-4-16

Get Adobe Flash player
by mutantleg 15 Apr 2016
/**
 * Copyright mutantleg ( http://wonderfl.net/user/mutantleg )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/oOy6
 */

package {
    import flash.events.Event;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
          stage.addEventListener(Event.ENTER_FRAME, onEnter);  
        }//ctor
        
        public var cx:Number = 230;
        public var cy:Number = 230;
        public var vx:Number = 0;
        public var vy:Number = 0;
    
        public var ang:Number = 0;
        public var vang:Number = 0;
        public var wt:int = 64;  
        public var cmd:int =0;
        public var wang:Number = 0;
   
        public function onEnter(e:Event):void
        {
            graphics.clear();
            graphics.lineStyle(2, 0);
        
            var i:int;
          cx = 230; cy = 30;
          wt=64; vang=0; ang = 0;
          cmd=0;
          ang =Math.sin(wang);
 
           wang+=0.01;         
      
           for (i=0;i<320;i+=1)
           {
      
               vx = Math.cos(ang)*3;
               vy = Math.sin(ang)*3;
               cx +=vx; cy+=vy;
               ang += vang;   
               wt+=1;
    
              if (wt > 31) 
              { cmd+=1; wt=0; 
                graphics.drawCircle(cx,cy,8);
                if (cmd ==1) {wt=-1;}
                if (cmd ==2) {wt=0;}
                if (cmd ==3) {wt=-1;}
                if (cmd ==4) {wt=0;}
                if (cmd ==5) {wt=0;}
                if (cmd ==6) {wt=0;}
                if (cmd > 7) {wt=-1;}
                if (cmd==9){wt=0;}
                
                vang = (1.57/32);
                if (wt>0){ vang*=-1; } 
                if (wt<0){vang=0;}
                wt = 0;
                if (cmd==5){wt=15;}
              }//endif
          
            graphics.drawCircle(cx,cy, 2);
     
           }//nexti 
        }//onenter     
        
        
    }//classend
}