/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//draw circle line for the preloader var cos:Function=Math.cos; var sin:Function=Math.sin; var pi:Number=Math.PI; var d_r:Number=pi/180; var r_d:Number=180/pi; var midPoint:Object={_x:0,_y:0}; var r:Number=11; var pLoaded=Math.round(event.target.bytesLoaded*100/event.target.bytesTotal); mcPreloader.graphics.clear(); mcPreloader.graphics.lineStyle(3); mcPreloader.graphics.moveTo(11,0); for (var z = 0; z<=pLoaded*3.6; z++) { mcPreloader.graphics.lineTo((cos(z*d_r)*r), (sin(z*d_r)*r)); }