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-11-12

Get Adobe Flash player
by mutantleg 12 Nov 2013
    Embed
/**
 * Copyright mutantleg ( http://wonderfl.net/user/mutantleg )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/fBXV
 */

package {
    import flash.events.Event;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            
            
            stage.addEventListener(Event.ENTER_FRAME, onEnter);
        }//ctor
        
        public var ang:Number = 0;
        
        public function onEnter(e:Event):void
        {
            graphics.clear();
            graphics.lineStyle(2, 0);
            
            ang += 0.1;
            
            var dx:Number;
            var dy:Number;
            
            dx = 200 + Math.cos(ang) * 64;
            dy = 200 + (Math.cos(ang)*Math.sin(ang))*64;
            
            graphics.drawCircle(dx,dy,16);
            
            
          /*  
            var a:Number;
            for (a = 0; a < 6.28; a+=0.2)
            {
                 graphics.moveTo(200+Math.cos(a)*64,200 + (Math.cos(ang)*Math.sin(ang))*64);
                 graphics.lineTo(200+Math.cos(a+0.2)*64,200 + (Math.cos(ang+0.2)*Math.sin(ang))*64);
                    
            }
           */ 
            var a:Number;
            for (a = 0; a < 6.28; a+=0.2)
            {
                 graphics.moveTo(200+Math.cos(a)*64,200 + (Math.cos(a)*Math.sin(ang))*64);
                 graphics.lineTo(200+Math.cos(a+0.2)*64,200 + (Math.cos(a+0.2)*Math.sin(ang))*64);
                    
            }
            
            
            for (a = 0; a < 6.28; a+=0.2)
            {
                 graphics.moveTo(200+Math.cos(a)*64,200 + (Math.cos(a)*Math.sin(a))*64);
                 graphics.lineTo(200+Math.cos(a+0.2)*64,200 + (Math.cos(a+0.2)*Math.sin(a+0.2))*64);
                    
            }
            
        }//onenter
        
    }//classend
}