03/06/26 02:33
>>73 改造してみました
txtcolor = 0xFF0000;gacolor = 0x000000;gbcolor = 0x00FF00;gwcolor = 0xFFFFFF;
tf = new TextFormat(null, 40, txtcolor, true);tfm = new TextFormat(null, 16, txtcolor, true);
gageset = this.createEmptyMovieClip("gageset", 1000);gage_bg = gageset.createEmptyMovieClip("gage_bg", 1);
gage_bg.beginFill(gacolor);gage_bg.moveTo(20, Stage.height/2-12);gage_bg.lineTo(Stage.width-20, Stage.height/2-12);
gage_bg.lineTo(Stage.width-20, Stage.height/2+12);gage_bg.lineTo(20, Stage.height/2+12);gage_bg.lineTo(20, Stage.height/2-12);gage_bg.endFill();
gage_bar = gageset.createEmptyMovieClip("gage_bar", 2);gage_bar.beginFill(gbcolor);gage_bar.moveTo(0, Stage.height/2-10);
gage_bar.lineTo(Stage.width-40, Stage.height/2-10);gage_bar.lineTo(Stage.width-40, Stage.height/2+10);gage_bar.lineTo(0, Stage.height/2+10);
gage_bar.lineTo(0, Stage.height/2-10);gage_bar.endFill();gage_bar._x = 20;
gage_bar._xscale = 0;gageset.createTextField("ttt", 1001, Stage.width/2-20, Stage.height/2-40, 1, 1);
gageset.ttt.autoSize = true;gageset.ttt.setTextFormat(tf);gageset.createTextField("ttm", 1002, Stage.width-100, Stage.height-20, 1, 1);gageset.ttm.autoSize = true;gageset.ttm.setTextFormat(tfm);
stop();
gageset.onEnterFrame = function() {var ld = getBytesLoaded()/1024;var lm = getBytesTotal()/1024;var per = ld/lm*100;if (lm == 0) {per = 0;}
if (per == 100) {this._parent.play();this.removeMovieClip();}this.ttt.text = Math.floor(per)+"%";this.ttm.text = Math.floor(ld)+"/"+Math.floor(lm);this.gage_bar._xscale = per;};