Fun with spirals
A tutorial and swish scource code for generating a spiral gives our first inkling into pseudo-physics in Swishmax
The Script
function settings(){
angle=45;
x=150;
r=1;
y=150;
_root.createEmptyMovieClip("holder",0);
holder.lineStyle(0, 0x000000, 100);
holder.moveTo(x+r, y);
a = Math.tan(22.5 * Math.PI/180);
}
onLoad() {
settings();
}
onframe(1){
var endx = r*Math.cos(angle*Math.PI/180);
var endy = r*Math.sin(angle*Math.PI/180);
var cx =endx + r*a*Math.cos((angle-90)*Math.PI/180);
var cy =endy + r*a*Math.sin((angle-90)*Math.PI/180);
holder.curveTo(cx+x, cy+y, endx+x, endy+y);
}
onframe(2){
angle+=45;
r++;
if(r>200){holder.clear();settings();}
gotoandplayPrev();
}
Fun with this script
This is one of those scripts you can play with endlessly, like spirograph. Here's a minor modification made simply by changing the r(radius) value to -200 and. I change the "if(r>200)" bit to "if(r>225)" just to hold the look of the finished spiral al ittle longer.