//設定--------------------------------------------- color_scheme = 1; //配色 (1:白基調/2:黒基調/3:グレー) 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) r_spd = 36; //ボールの回る速さ //以下はいじらない============================================== 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; t_border = 0; size_qb = 22; size_pb = 50; size_lamp = 14; if(color_scheme == 1){ c_pb1 = 0x999999; c_pb2 = 0x666666; c_pt1 = 0xffffff; c_pt2 = 0xffffff; c_qb1 = 0xcccccc; c_qb2 = 0x999999; c_qt1 = 0xffffff; c_qt2 = 0xffffff; c_lamp1 = 0xcccccc; c_lamp2 = 0x999999; c_bg = 0xeeeeee; c_per = 0x222222; }else if(color_scheme == 2){ c_pb1 = 0xaaaaaa; c_pb2 = 0xeeeeee; c_pt1 = 0x000000; c_pt2 = 0x000000; c_qb1 = 0x888888; c_qb2 = 0xcccccc; c_qt1 = 0x000000; c_qt2 = 0x000000; c_lamp1 = 0x666666; c_lamp2 = 0xcccccc; c_bg = 0x222222; c_per = 0xeeeeee; }else if(color_scheme == 3){ c_pb1 = 0xdddddd; c_pb2 = 0x808080; c_pt1 = 0x303030; c_pt2 = 0xffffff; c_qb1 = 0x808080; c_qb2 = 0xcccccc; c_qt1 = 0xcccccc; c_qt2 = 0x000000; c_lamp1 = 0x606060; c_lamp2 = 0xcccccc; c_bg = 0x808080; c_per = 0x000000; } //ムービークリップ生成 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){ 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;} cMC(name,depth,x,y); eval(name).createTextField(name,1,tx,ty,w,h); with(eval(name+"."+name)){ text = value; selectable = false; setTextFormat(tf); if(_parent._parent.t_border == 1){border = true;} } }; //テキストフォーマット設定 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){ _quality = q; qh.qh.setTextFormat(TFqb1); qm.qm.setTextFormat(TFqb1); ql.ql.setTextFormat(TFqb1); cBall("qh",c_qb1,size_qb); cBall("qm",c_qb1,size_qb); cBall("ql",c_qb1,size_qb); if(_quality == "HIGH"){qh.qh.setTextFormat(TFqb2); cBall("qh",c_qb2,size_qb);} else if(_quality == "MEDIUM"){qm.qm.setTextFormat(TFqb2); cBall("qm",c_qb2,size_qb);} else if(_quality == "LOW"){ql.ql.setTextFormat(TFqb2); cBall("ql",c_qb2,size_qb);} }; //ボール描画 function cBall(target,color,size){ with(eval(target)){ clear(); lineStyle(size,color,100); moveTo(0,0); lineTo(0,1); } }; //ステータス制御----------------------------------------------------- for(i=1;i<=10;i++){ cMC("l"+i,10+i,(1+9*i)*x,90*y); cBall(eval("l"+i),c_lamp1,size_lamp); } l_num = Math.floor(loaded/10); 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); ring.r._alpha = 100-loaded; if(Math.floor(loaded/10)>l_num){ l_num = Math.floor(loaded/10); for(i=1;i<=l_num;i++){cBall(eval("l"+i),c_lamp2,14);} } }else if(loaded == 100){ if(autoplay == 1){_root.Play();}else{ cTX("pb",300,"Play",x*80,y*60,35,22,"cm",TFpb1); cBall("pb",c_pb1,size_pb); pb.onPress = function(){_root.Play();}; pb.onRollOver = function(){pb.pb.setTextFormat(TFpb2);cBall("pb",c_pb2,size_pb);}; pb.onRollOut = function(){pb.pb.setTextFormat(TFpb1);cBall("pb",c_pb1,size_pb);}; removeMovieClip("ring"); removeMovieClip("per"); } 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",16,c_pt1,"_serif","center","b"); cTF("TFpb2",16,c_pt2,"_serif","center","b"); cTF("TFqb1",16,c_qt1,"_typewriter","center",""); cTF("TFqb2",16,c_qt2,"_typewriter","center",""); cTF("TFper",16,c_per,"_serif","center","b"); cTF("TFstat",12,c_stat,"_typewriter","center",""); //-------------------------------------画質ボタン if(q_button == 1){ cTX("qh",201,"H",28*sc,7*y,22,22,"cm",TFqb1); cTX("qm",202,"M",58*sc,7*y,22,22,"cm",TFqb1); cTX("ql",203,"L",88*sc,7*y,22,22,"cm",TFqb1); if(_quality == "HIGH"){setQuality("HIGH");} else if(_quality == "MEDIUM"){setQuality("MEDIUM");} else if(_quality == "LOW"){setQuality("LOW");} qh.onPress = function(){setQuality("HIGH");}; qm.onPress = function(){setQuality("MEDIUM");}; ql.onPress = function(){setQuality("LOW");}; } //-------------------------------------%表示 if(percentage == 1){cTX("per",205,"",x*80,y*60,50,22,"cm",TFper);} //-------------------------------------ステータス if(stat_view == 1){ cMC("ring",204,x*80,y*60); cBall("ring",c_pb1,size_pb); with(ring){ ring.createEmptyMovieClip("r",1); cBall("ring.r",c_bg,size_pb-2); ring.createEmptyMovieClip("b",2); cBall("ring.b",c_pb1,10); with(b){ ring.b.radian = 0; ring.b.deg = 90; ring.b.onEnterFrame = function(){ radian = deg / 180 * Math.PI; _x = _parent._parent.size_pb/2 * Math.cos(radian); _y = _parent._parent.size_pb/2 * Math.sin(radian); deg += _parent._parent.r_spd; }; } } } //-------------------------------背景 createEmptyMovieClip("bgMC",1); with(bgMC){ lineStyle(); beginFill(c_bg,100); lineTo(Stage.width,0); lineTo(Stage.width,Stage.height); lineTo(0,Stage.height); lineTo(0,0); endFill(); }