forked from: flash on 2014-1-20
Saw that line code and just thought I'd do some iteration to it :) Saving it just so I can come back and play more later.
/**
* Copyright 01010111 ( http://wonderfl.net/user/01010111 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/dGC5
*/
// forked from _y3y's flash on 2014-1-20
package {
import flash.display.Sprite;
import Math;
public class FlashTest extends Sprite {
private var color:uint = 0x000000;
public function FlashTest() {
this.graphics.lineStyle(0, 0xFFFFFF);
this.graphics.moveTo(stage.stageWidth/2,stage.stageHeight/2);
for (var i:int = 0; i < 2056; i++){
var size:Number = i / 6;
var offsetX:Number = stage.stageWidth / 2;
var offsetY:Number = stage.stageHeight / 2;
var x:Number = (Math.cos(i) * size + offsetX);
var y:Number = (Math.sin(i) * size + offsetY);
color = getColor24(i * 0.6,i * 1.1,i * 0.1);
this.graphics.lineStyle(i / 100, color);
this.graphics.lineTo(x, y);
}
}
public static function getColor24(red:uint, green:uint, blue:uint):uint
{
return red << 16 | green << 8 | blue;
}
}
}