more spirally goodness.
click to generate a new one, then click again to make another, etc…
*edit - much improved version here: http://www.kirupa.com/forum/attachment.php?attachmentid=32647&d=1137412554
improved code here: http://www.kirupa.com/forum/showthread.php?p=1754527#post1754527
var randomNum = function (Min, Max) {
return Min+random(((Max+1)-Min));
};
var myRefArray = [];
var HH=this.createEmptyMovieClip("HH", this.getNextHighestDepth());
HH._x = HH._y=200;
onMouseDown = function () {
startRotate(randomNum(-30, 60), randomNum(-100, 100), 0, randomNum(60, 600));
};
startRotate = function(aaa, bbb, c, scl) {
for (var p = 0; p<30; p++) {
var hw = (200/(p+1))+6;
var aHH = HH.createEmptyMovieClip("aHH", 300+p);
var cHH = aHH.createEmptyMovieClip("cHH", 2000+p);
var eHH = cHH.createEmptyMovieClip("eHH", this.getNextHighestDepth()+1);
eHH.lineStyle(0.8, 0xFFFFFF, (6*p)+10);
for (i=0; i<4; i++) {
eHH.curveTo(hw*Math.cos(aaa), hw*Math.sin(bbb), hw*Math.cos(aaa), hw*Math.cos(bbb));
eHH.curveTo(hw*Math.cos(bbb), hw*Math.sin(aaa), 0, 0);
}
myRefArray[p] = cHH;
}
this.onEnterFrame = function() {
myRefArray[c]._parent._yscale = myRefArray[c]._parent._xscale=scl;
myRefArray[c].onEnterFrame = function() {
this._parent._rotation -= aaa;
this._rotation += bbb;
};
if (c<myRefArray.length) {
c++;
} else {
c = 0;
}
};
};
can someone check if i’m meeting the <=25 lines requirement? i think i’m counting this right, but i hope i’m not over.