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

点描で球体

綺麗なコッペパンみたいなのが出来上がります
2/5 少し改良(?)
Get Adobe Flash player
by Susisu 05 Feb 2010
// 綺麗なコッペパンみたいなのが出来上がります
// 2/5 少し改良(?)
package {
	import flash.display.Sprite;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.PixelSnapping;
	import flash.events.Event;
	public class dotcircle extends Sprite{
		private var bmpData:BitmapData=new BitmapData(465,465,true,0x00000000);
		private var stgBmp:Bitmap=new Bitmap(bmpData,PixelSnapping.AUTO,true);
		private var angle:Number;
		private var xpos:Number;
		private var ypos:Number;
		private var r:Number;
		private var i:uint;
		public function dotcircle(){
			addChild(stgBmp);
			addEventListener("enterFrame", loop);
		}
		private function loop(e:Event):void{
			for(i=0;i<100;i++){
				r=Math.sin(Math.random()*Math.PI/2)*200;
				if(Math.sin(Math.random()*Math.PI/2)*200<r){
					angle=Math.random()*Math.PI*2;
					xpos=Math.cos(angle)*r+232;
					ypos=Math.sin(angle)*r+232;	
					bmpData.setPixel32(xpos,ypos,0xff000000);
				}
				else{
					i--;
				}
			}
		}
	}
}