flash on 2012-5-4
/**
* Copyright jokehn9 ( http://wonderfl.net/user/jokehn9 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/6D7m
*/
package {
import flash.events.Event;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.MouseEvent;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
this.x = 0;
this.y = 0;
var ix:Array = [];
var iy:Array = [];
var ii:int = 0;
var n:int = 30;
function draw():void
{
var centerX:Number = Math.random() * 465;
var centerY:Number = Math.random() * 465;
for (ii = 0; ii < n; ii++)
{
ix[ii] = 150* Math.cos((6.28/n)*(ii+1));
iy[ii] = 150* Math.sin((6.28/n)*(ii+1));
}
var i1:int = 0;
var i2:int = 0;
for (i1 = 0; i1 < n-1; i1++)
{
graphics.lineStyle(1,0xffffff*Math.random());
graphics.moveTo(centerX,centerY);
for (i2 = 1; i2 < n-i1; i2++)
{
graphics.moveTo(centerX+ix[i1],iy[i1]);
graphics.curveTo(centerX,centerY,centerX+ix[i1+i2],centerY+iy[i1+i2]);
}
}
}
draw();
}
}
}