At 9/3/05 11:53 AM, Glaiel_Gamer wrote:
demo please
Fleshed it out a bit (added counter, button, fade), still needs work though. Drawing seems glitchy, too.
DEMO
stop();
Stage.scaleMode = "showAll";
SW = Stage.width;
SH = Stage.height;
aTF = new TextFormat();
with (aTF) {
color = 0xFE3301;
font = "Tahoma";
size = 12;
bold = 1;
align = "center";
}
createEmptyMovieClip("back", 1);
with (back) {
beginFill(0, 100);
moveTo(0, 0);
lineTo(SW, 0);
lineTo(SW, SH);
lineTo(0, SH);
endFill();
createEmptyMovieClip("circle", 2);
circle.rd = SH/4;
circle.oA = 0;
with (circle) {
_rotation = 270;
_x = SW/2;
_y = SH/2;
}
createEmptyMovieClip("butt", 3);
with (butt) {
beginFill(0, 0);
moveTo(-150, -150);
lineTo(150, -150);
lineTo(150, 150);
lineTo(-150, 150);
endFill();
createTextField("txt", 1, -150, -10, 300, 30);
txt.selectable = 0;
_x = SW/2;
_y = SH/2;
}
}
onEnterFrame = function () {
pc = (_root.getBytesLoaded()/_root.getBytesTota
l())*100;
back.circle.rp = int(pc*3.6);
back.butt.txt.text = int(pc)+"% LOADED";
back.butt.txt.setTextFormat(aTF);
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
back.butt.txt.text = "PLAY";
back.butt.txt.setTextFormat(aTF);
back.butt.onPress = function() {
this.txt._visible = 0;
ml = 1;
gotoAndStop(2);
};
}
if (!_root.ml) {
with (back.circle) {
if (rp>oA) {
beginFill(0x8F0101, 100);
am = Math.tan(22.5*Math.PI/180);
var startx = rd*Math.cos(oA*Math.PI/180);
var starty = rd*Math.sin(oA*Math.PI/180);
moveTo(0, 0);
lineTo(startx, starty);
var endx = rd*Math.cos(rp*Math.PI/180);
var endy = rd*Math.sin(rp*Math.PI/180);
var cx = endx+rd*am*Math.cos((rp-90)*Math.PI/180);
var cy = endy+rd*am*Math.sin((rp-90)*Math.PI/180);
curveTo(cx, cy, endx, endy);
lineTo(0, 0);
endFill();
oA = rp;
}
}
} else {
back._alpha -= 5;
back._alpha<5 ? back.removeMovieClip() : null;
}
};