Here's another taste on my next game. This is a toy you can unlock.
http://img92.echo.cx/my.php?image=spiral7ro.swf
Here's the code.
deg = 10;
spd = 50;
alp = 70;
wid = 1;
this.createEmptyMovieClip("clip", 1);
clip._x = 275;
clip._y = 200;
function frame() {
deg = Number(deg);
spd = Number(spd);
alp = Number(alp);
wid = Number(wid);
if (isNaN(deg)) {
deg = 10;
}
if (isNaN(spd)) {
spd = 10;
}
if (isNaN(alp)) {
alp = 100;
}
if (isNaN(wid)) {
wid = 1;
}
}
function generate() {
clip.clear();
angle = 0;
dist = 200;
speed = (spd/1000)+.9;
x = dist*Math.sin(angle*(Math.PI/180));
y = dist*Math.cos(angle*(Math.PI/180));
clip.moveTo(x, y);
clip.lineStyle(wid, 0x000000, alp);
while (dist>3) {
dist *= speed;
angle += deg;
x = dist*Math.sin(angle*(Math.PI/180));
y = dist*Math.cos(angle*(Math.PI/180));
clip.lineTo(x, y);
}
}
Put that in your frame. No need to edit the code.
Now all you need are 3 input text boxes. 1 for "deg", 1 for "spd" and 1 for "wid".
And 2 buttons. On one button, put
on(release){
generate()
}
And on the other put
on(release){
clip.clear()
}
POST YOUR BEST SPIRAL COMBONATIONS!