In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

# フィボナッチの勉強

```フィボナッチの勉強
*
* 数値の変化でどんな感じになるのか見たかったです。
*
* ところどころなんか可愛い動きがあってかわいいですｗｗ
*```
by _azzip 22 May 2010
```/**
* Copyright _azzip ( http://wonderfl.net/user/_azzip )
*/

/*
* フィボナッチの勉強
*
* 数値の変化でどんな感じになるのか見たかったです。
*
* ところどころなんか可愛い動きがあってかわいいですｗｗ
*
*/
package
{
import flash.display.Sprite;
import flash.filters.GlowFilter;
import flash.events.Event;
import flash.text.*;

[SWF(backgroundColor="#000000", width="480", height="480", frameRate="30")]

public class FlashTest extends Sprite
{
private var spList:Array = new Array();
private var list:Array = new Array();
private var angle:Number;
private var count:Number=1;
private var totalNum:int = 200;
private var tf:TextField;

public function FlashTest()
{
//ブラー
var grow:GlowFilter = new GlowFilter(0xffcc00,1,10,10);
this.filters = [grow];

tf = new TextField();
var tfmt:TextFormat = new TextFormat("ARIAL",null,0xFFFFFF);
tf.defaultTextFormat = tfmt;
tf.x = 0;
tf.y = 0;

for(var k:int =0; k<totalNum ;k++)
{
angle = k * Math.PI * 1 * ((1 + Math.sqrt(5))/2);
list.push(angle);

var sp:Sprite = new Sprite();
sp.graphics.beginFill(Math.random() * 0xFFFFFF);
sp.graphics.drawCircle(0,0,2);
sp.graphics.endFill();
spList.push(sp);

spList[k].alpha = 0.6;
spList[k].x = stage.stageWidth/2 + (k+1) * Math.cos(list[k]);
spList[k].y = stage.stageHeight/2 + (k+1) * Math.sin(list[k]);
spList[k].scaleX = 1 * (k+2)/50;
spList[k].scaleY = 1 * (k+2)/50;
}
}

private function enterHandler(e:Event):void
{
count +=0.04;
tf.text = String(count);
for(var i:int =0; i<totalNum ;i++)
{
list[i] = i * Math.PI * Math.floor(count) * ((1 + Math.sqrt(5))/2);
spList[i].x += ((stage.stageWidth/2 + (i+1) * Math.cos(list[i])) - spList[i].x)/5;
spList[i].y += ((stage.stageHeight/2 + (i+1) * Math.sin(list[i])) - spList[i].y)/5;
}
}
}
}```