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

sqrt

狙った効果じゃないんで控えめに
Get Adobe Flash player
by Kay 12 Mar 2009
/*
 * 狙った効果じゃないんで控えめに
 */
package {
	import flash.display.Sprite;
	[SWF(backgroundColor=0xcc0066,width=400,height=400)]
	public class Take02 extends Sprite {
		private const SN:uint = 20;
		public function Take02():void {
			for (var v:uint = 0; v <= SN; v++) {
				for (var h:uint = 0; h <= SN; h++) {
					var menu:MenuPanel = new MenuPanel(0x3333cc, 10);
					addChild(menu);
					menu.x = h*SN;
					menu.y = v*SN;
				}
			}
		}
	}
}
import flash.display.Shape;
import flash.events.Event;
class MenuPanel extends Shape {
	public function MenuPanel(color:uint, size:uint):void {
		graphics.beginFill(color);
		graphics.drawCircle(0,0,size);
		graphics.endFill();
		addEventListener(Event.ENTER_FRAME,scale);
	}
	private function scale(e:Event):void {
		scaleX = scaleY = Math.sqrt(Math.sqrt(Math.pow(mouseX,2)+Math.pow(mouseY,2))/100);
	}
}