I was messing around with polar graphs and decided to make a preloader out of one. There are some things i need to fix such as it doesn’t load small files so well, it loads big files good though.
Just paste this on your first frame and change what you would like.
Be careful with some of the numbers though for instance don’t make scale > 200 or it will be huge same with complexity, if complexity > 4 it is huge.
here is the script:
stop();
//Variables
var scale:Number = 60;
var complexity:Number = 2;
var numPedals:Number = 6;
var fillColor:Number = 0x006699;
var fillAlpha = 50;
var strokeColor:Number = 0x000000;
var strokeAlpha:Number = 0;
var strokeThickness:Number = 1;
this.lineStyle(strokeThickness, strokeColor, strokeAlpha);
this.moveTo(Stage.width/2, Stage.height/2);
this.beginFill(fillColor, fillAlpha);
var i:Number = 0;
onEnterFrame = function () {
i = (_root.getBytesLoaded()/_root.getBytesTotal())*360;
t = (i*(Math.PI/180));
r = scale*(complexity+Math.sin(numPedals*t));
this.lineTo((r*Math.cos(t))+(Stage.width/2), (r*Math.sin(t))+(Stage.height/2));
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
trace("LOADED");
}
};
let me know of bugs or fixes and comments of course