//設定--------------------------------------------- //-----------------以下すべて、1:オン 0:オフ------- color_scheme = 1; //配色 (1:白/2:黒) autoplay = 0; //オートプレイ (1:する/0:しない) q_button = 1; //画質ボタン (1:表示/0:非表示) percentage = 1; //パーセント数値 (1:表示/0:非表示) stat_view = 1; //ロードステータス (1:表示/0:非表示) parts_stretch = 0; //パーツの引き伸ばし (1:する/0:しない) test_preview = 0; //テストプレビュー (1〜:ON/0:OFF) //以下はいじらない============================================== if(test_preview != 0){pb.removeMovieClip();} x = Stage.width/100; y = Stage.height/100; if(parts_stretch == 1){_global.sc = Stage.height/240;}else{_global.sc = 1;} loaded = 0; if(color_scheme == 1){ c_pb1 = 0x333333; c_qb1 = 0x888888; c_per = 0x666666; c_pb2 = 0xd9785b; c_qb2 = 0x333333; c_stat = 0x777777; c_bg = 0xffffff; c_mt1 = 0xcccccc; c_mt2 = 0x333333; }else if(color_scheme == 2){ c_pb1 = 0xeeeeee; c_qb1 = 0xbbbbbb; c_per = 0xeeeeee; c_pb2 = 0xe39b86; c_qb2 = 0xdddddd; c_stat = 0xdddddd; c_bg = 0x000000; c_mt1 = 0x999999; c_mt2 = 0xeeeeee; } //ムービークリップ生成 function cMC(name,depth,x,y,target){ if(target){eval(target).createEmptyMovieClip(name,depth);name=target+"."+name;} else{createEmptyMovieClip(name,depth);} with(eval(name)){ _x = x; _y = y; _xscale = _yscale = sc*100;} }; //テキスト生成 function cTX(name,depth,value,x,y,w,h,align,tf,target){ if(align.indexOf("l")!=-1){tx = 0;}else if(align.indexOf("r")!=-1){tx = -w;}else{tx=-w/2;} if(align.indexOf("t")!=-1){ty = 0;}else if(align.indexOf("b")!=-1){ty = -h;}else{ty=-h/2;} if(target){cMC(name,depth,x,y,target);path=target+"."+name;} else{cMC(name,depth,x,y);path=name;} eval(path).createTextField(name,1,tx,ty,w,h); with(eval(path+"."+name)){ //border=true; text = value; selectable = false; setTextFormat(tf); } }; //テキストフォーマット設定 function cTF(name,sz,cl,fn,ag,st){ with(eval(name)){ size = sz; color = cl; font = fn; align = ag; if(st.indexOf("b") == -1){bold = false;}else{bold = true;} if(st.indexOf("i") == -1){italic = false;}else{italic = true;} if(st.indexOf("u") == -1){underline = false;}else{underline = true;} }}; //画質設定 function setQuality(q,path){ _quality = q; if(path){h=path+".qh.qh"; m=path+".qm.qm"; l=path+".ql.ql";} else{ h="qh.qh"; m="qm.qm"; l="ql.ql";} eval(h).setTextFormat(TFqb1); eval(m).setTextFormat(TFqb1); eval(l).setTextFormat(TFqb1); if(_quality == "HIGH"){eval(h).setTextFormat(TFqb2);} else if(_quality == "MEDIUM"){eval(m).setTextFormat(TFqb2);} else if(_quality == "LOW"){eval(l).setTextFormat(TFqb2);} }; //ステータス制御----------------------------------------------------- function onEnterFrame(){ if(loaded < 100){ if(_root._currentframe > 1){_root.gotoAndStop(1);} if(test_preview == 0){loaded = Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100);} else if(test_preview != 0){loaded += test_preview;} per.per.text = loaded; per.per.setTextFormat(TFper); with(mt2MC){ clear(); lineStyle(2,c_mt2,100); moveTo (55*x,95*y); lineTo ((55+0.4*loaded)*x,95*y);} }else if(loaded == 100){ if(autoplay == 1){_root.Play();}else{ cMC("pb",300,55*x,95*y); with(pb){ lineStyle(0,0,0); beginFill(0,0); moveTo(0*x,0*y); lineTo(22*x,0*y); lineTo(22*x,-6*y); lineTo(0*x,-6*y); lineTo(0,0); } pb.createEmptyMovieClip("pb1",301,0,0); with(pb.pb1){ lineStyle(2,c_pb1,100); beginFill(c_pb1,100); moveTo(3*x,-2*y); lineTo(20*x,-2*y); lineTo(16*x,-3.5*y); lineTo(17*x,-2*y); } pb.createEmptyMovieClip("pb2",302,0,0); with(pb.pb2){_visible=false; lineStyle(2,c_pb2,100); beginFill(c_pb2,100); moveTo(3*x,-2*y); lineTo(20*x,-2*y); lineTo(16*x,-3.5*y); lineTo(17*x,-2*y); } pb.onPress = function(){_root.Play();}; pb.onRollOver = function(){pb.pb1._visible=false;pb.pb2._visible=true;}; pb.onRollOut = function(){pb.pb1._visible=true;pb.pb2._visible=false;}; stat_txt.removeMovieClip(); } loaded = 200; } }; //テキストフォーマット TFpb1 = new TextFormat(); //PlayButton1 TFpb2 = new TextFormat(); //PlayButton2 TFqb1 = new TextFormat(); //QualityButton1 TFqb2 = new TextFormat(); //QualityButton2 TFper = new TextFormat(); //PercentageText TFstat = new TextFormat(); //StatusText cTF("TFpb1",20,c_pb1,"_serif","center","b"); cTF("TFpb2",20,c_pb2,"_serif","center","b"); cTF("TFqb1",12,c_qb1,"_serif","center","i"); cTF("TFqb2",12,c_qb2,"_serif","center","iu"); cTF("TFper",12,c_per,"_serif","right","i"); cTF("TFstat",12,c_stat,"_serif","left","i"); //-------------------------------------画質ボタン if(q_button == 1){ createEmptyMovieClip("qMC",200); with(qMC){ _x=2*x; _y=98*y;} cTX("qh",201," H ",0*sc,0,20,20,"lb",TFqb1,qMC); cTX("qm",202," M ",25*sc,0,20,20,"lb",TFqb1,qMC); cTX("ql",203," L ",50*sc,0,20,20,"lb",TFqb1,qMC); if(_quality == "HIGH"){setQuality("HIGH",qMC);} else if(_quality == "MEDIUM"){setQuality("MEDIUM",qMC);} else if(_quality == "LOW"){setQuality("LOW",qMC);} qMC.qh.onPress = function(){setQuality("HIGH",qMC);}; qMC.qm.onPress = function(){setQuality("MEDIUM",qMC);}; qMC.ql.onPress = function(){setQuality("LOW",qMC);}; } //-------------------------------------%表示 if(percentage == 1){cTX("per",101,0,95*x,95*y,40,19,"rb",TFper);} //-------------------------------------ステータス if(stat_view == 1){cTX("stat_txt",100,"Loading...",55*x,95*y,120,19,"lb",TFstat);} //-------------------------------------背景 createEmptyMovieClip("bgMC",1); with(bgMC){ lineStyle(); beginFill(c_bg,100); lineTo(x*100,0); lineTo(x*100,y*100); lineTo(0,y*100); lineTo(0,0); endFill(); } createEmptyMovieClip("mt1MC",2); with(mt1MC){ lineStyle(2,c_mt1,100); moveTo(x*55,y*95); lineTo(x*95,y*95); } createEmptyMovieClip("mt2MC",3);