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 2011-4-9

Get Adobe Flash player
by Scmiz 09 Apr 2011
    Embed
/**
 * Copyright Scmiz ( http://wonderfl.net/user/Scmiz )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/yUCV
 */

package {
    import flash.events.Event;
    import flash.display.BitmapData;
    import flash.display.Bitmap;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        private var _rad0:Number;
        
        public function FlashTest() {
            _rad0 = 0.0;
            this.addEventListener(Event.ENTER_FRAME, proc);
        }
        
        private function proc(e:Event):void {
            _rad0 += (Math.PI * 2) / 40.0;
            
            this.graphics.beginFill(0xFFB0B0);
            this.graphics.drawRect(0, 0, 465, 465);
            this.graphics.endFill();
            
            this.graphics.beginFill(0xFFFF20, 0.8);
            var size:Number = 2.0;
            for (var index:uint = 0; index < 116; ++index) {
                var rad:Number = (Math.PI * 2) * (index / 116) + _rad0;
                this.graphics.drawRect(100 + (40 * Math.sin(rad)), index * size * 2, 120, size);
                this.graphics.drawRect(225 + (40 * Math.sin(rad)), index * size * 2, 20, size);
                this.graphics.drawRect(250 + (40 * Math.sin(rad)), index * size * 2, 10, size);
            }
            this.graphics.endFill();
        }

    }
}