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 2012-3-11

時間が経つとただのノイズ
Get Adobe Flash player
by Susisu 11 Mar 2012
    Embed
package {
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.events.Event;
    import flash.display.Sprite;
    [SWF(width="465",height="465",frameRate="30")]
    public class FlashTest extends Sprite {
        private const W:uint=128;
        private const H:uint=128;
        private var map:BitmapData;
        private var bmp:Bitmap;
        private const CX:Number=W/2;
        private const CY:Number=H/2;
        private var d:Number;
        public function FlashTest() {
            map=new BitmapData(W,H,false,0);
            bmp=new Bitmap(map);
            addChild(bmp);
            bmp.scaleX=465/W;
            bmp.scaleY=465/H;            
            
            d=1;
            addEventListener(Event.ENTER_FRAME,onEnterFrame);
        }
        private function onEnterFrame(e:Event):void{
            for(var i:int=0;i<H;i++){
                for(var j:int=0;j<W;j++){
                    var r:Number=Math.atan2(i-CY,j-CX);
                    var lp:Number=(j-CX)*(j-CX)+(i-CY)*(i-CY);
                    map.setPixel(j,i,d*lp>>0);
                }
            }
            d*=1.02;
        }

    }
}