Section 1
//GAMEOVER_MC_24 (madokatrain2_fla.GAMEOVER_MC_24)
package madokatrain2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class GAMEOVER_MC_24 extends MovieClip {
public var score_txt:TextField;
public var rankin_mc:MovieClip;
public var nextGame_mc:MovieClip;
}
}//package madokatrain2_fla
Section 2
//MainTimeline (madokatrain2_fla.MainTimeline)
package madokatrain2_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public const PHP_RANKING = "php198712/ranking.php";
public var bgmVolume:int;
public var trainOk:Boolean;
public var seVolume:int;
public var rankingLastScore:int;
public var seList:Dictionary;
public var hiScore:int;
public var titleDisp:int;
public var madokaMove:Boolean;
public var ranking_mc:MovieClip;
public var madokaX:Array;
public var scoreName:String;
public var so:SharedObject;
public var rankingScore_array:Array;
public var stage_mc:MovieClip;
public var bgm_txt:TextField;
public var gameOverFlag:Boolean;
public var gameOver_mc:MovieClip;
public var score:int;
public var info:LoaderInfo;
public var keysDown:Array;
public var blackMask_mc:MovieClip;
public var se_txt:TextField;
public var playSeNo:int;
public var bgmLoopTime_array:Array;
public var trainNext:int;
public var testFlag:Boolean;
public var cursor_mc:MovieClip;
public var hikareFlag:Boolean;
public var hiScore_txt:TextField;
public var score_txt:TextField;
public var bgmCh;
public var trainX:Array;
public var test_txt:TextField;
public var train_array:Array;
public var link1_mc:SimpleButton;
public var bgmTr;
public var madoka_mc:MovieClip;
public var rails_mc:MovieClip;
public var rankingXmlLoader:URLLoader;
public var bgmList:Dictionary;
public var trainWait:int;
public var stepCount:int;
public var cursorX_array:Array;
public var sndCh;
public var cursorNo:int;
public var link2_mc:SimpleButton;
public var mask_mc:MovieClip;
public var sndTr;
public var playBgmNo:int;
public var trainStage:int;
public var madokaPoint:int;
public var XML_RANKING;
public var beforeTrain:int;
public var rankingPage:int;
public var trainNow:Array;
public var counter;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
public function xKeyDown(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
public function errorHandler(_arg1:IOErrorEvent):void{
}
public function addGameEvent():void{
addEventListener(Event.ENTER_FRAME, xEnterMain);
stage.addEventListener(KeyboardEvent.KEY_DOWN, xKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, xKeyUp);
}
function frame3(){
stop();
ranking_mc.visible = false;
updateVolume();
titleDisp = 0;
cursorNo = 0;
cursorX_array = [300, 340, 380, 420];
rankingPage = 0;
hiScore_txt.text = (("ハイスコア " + hiScore) + " 回");
updateRanking();
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeInTitle);
}
public function xClickRankNoSend(_arg1:MouseEvent):void{
gameOver_mc.rankin_mc.send_btn.removeEventListener(MouseEvent.CLICK, xClickRankSend);
gameOver_mc.rankin_mc.noSend_btn.removeEventListener(MouseEvent.CLICK, xClickRankNoSend);
playSe(1);
gameOver_mc.rankin_mc.visible = false;
gameOver_mc.nextGame_mc.visible = true;
}
function frame5(){
stop();
gameOver_mc.visible = false;
gameOver_mc.alpha = 0;
gameOver_mc.rankin_mc.visible = false;
gameOver_mc.rankin_mc.rankName_txt.restrict = "^,<>";
counter = 0;
train_array = [];
train_array[0] = [0, 0, 1, 700, 2, 1400, 3, 2100, 4, 4200, 2, 6300, 0, 7000, 3, 8400, 1, 11200, 4, 12600];
train_array[1] = [1, 0, 3, 1000];
keysDown = [];
madokaPoint = 2;
madokaX = [35, 165, 295, 425, 555];
trainX = [0, 130, 260, 390, 520];
trainNow = [0, 0, 0, 0, 0];
beforeTrain = 0;
madokaMove = false;
stepCount = 0;
trainWait = 0;
trainNext = 200;
trainStage = 0;
trainOk = true;
score = 0;
hikareFlag = false;
gameOverFlag = false;
if (playBgmNo != 0){
playBgmLoop(0);
};
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeInGame);
}
public function playSeLoop(_arg1){
if (playSeNo == -1){
playSeNo = _arg1;
sndCh = seList[_arg1].play(1, 1, sndTr);
sndCh.addEventListener(Event.SOUND_COMPLETE, gameSeComplete);
};
}
function frame1(){
stop();
hiScore = 0;
scoreName = "";
contextInit();
bgmVolume = 2;
seVolume = 2;
bgmList = new Dictionary();
playBgmNo = -1;
bgmTr = new SoundTransform();
bgmCh = new SoundChannel();
bgmTr.volume = (bgmVolume * 0.1);
bgmCh.soundTransform = bgmTr;
bgmLoopTime_array = [];
bgmLoopTime_array[0] = 0;
seList = new Dictionary();
playSeNo = -1;
sndTr = new SoundTransform();
sndCh = new SoundChannel();
sndTr.volume = (seVolume * 0.2);
sndCh.soundTransform = sndTr;
loadSound();
so = SharedObject.getLocal("madokatrain");
soInit();
info = root.loaderInfo;
stage.addEventListener(Event.ENTER_FRAME, xLoadEnter);
}
function frame4(){
stop();
gotoAndStop("game");
}
function frame2(){
stop();
testFlag = false;
XML_RANKING = "xml418501/ranking.xml";
if (testFlag == false){
XML_RANKING = ("xml418501/ranking.xml?" + new Date().getTime());
};
rankingScore_array = [];
rankingLastScore = 0;
rankingXmlLoader = new URLLoader();
rankingXmlLoader.addEventListener(Event.COMPLETE, xCompleteRanking);
rankingXmlLoader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
rankingXmlLoader.load(new URLRequest(XML_RANKING));
}
public function xFadeInTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha - 0.05);
if (blackMask_mc.alpha < 0){
blackMask_mc.alpha = 0;
blackMask_mc.visible = false;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeInTitle);
addTitleEvent();
};
}
public function xFadeGameToTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.05);
if (blackMask_mc.alpha >= 1){
stopBgm();
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeGameToTitle);
gotoAndStop("loadRanking");
};
}
public function addTitleEvent():void{
stage.addEventListener(KeyboardEvent.KEY_UP, xKeyUpTitle);
link1_mc.addEventListener(MouseEvent.CLICK, xClickLink1);
link2_mc.addEventListener(MouseEvent.CLICK, xClickLink2);
}
public function playSe(_arg1){
seList[_arg1].play(0, 1, sndTr);
}
public function gameOverCheck():void{
if (score > hiScore){
hiScore = score;
so.data.hiScore = hiScore;
if (rankingLastScore < score){
gameOver_mc.rankin_mc.rankName_txt.text = scoreName;
stage.focus = gameOver_mc.rankin_mc.rankName_txt;
gameOver_mc.rankin_mc.visible = true;
gameOver_mc.nextGame_mc.visible = false;
gameOver_mc.rankin_mc.send_btn.addEventListener(MouseEvent.CLICK, xClickRankSend);
gameOver_mc.rankin_mc.noSend_btn.addEventListener(MouseEvent.CLICK, xClickRankNoSend);
};
};
}
public function removeTitleEvent():void{
stage.removeEventListener(KeyboardEvent.KEY_UP, xKeyUpTitle);
link1_mc.removeEventListener(MouseEvent.CLICK, xClickLink1);
link2_mc.removeEventListener(MouseEvent.CLICK, xClickLink2);
}
public function gameBgmComplete(_arg1:Event):void{
bgmCh.removeEventListener(Event.SOUND_COMPLETE, gameBgmComplete);
bgmCh = null;
bgmCh = bgmList[playBgmNo].play(bgmLoopTime_array[playBgmNo], 1, bgmTr);
bgmCh.addEventListener(Event.SOUND_COMPLETE, gameBgmComplete);
}
public function xFadeGameToRetry(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.05);
if (blackMask_mc.alpha >= 1){
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeGameToRetry);
gotoAndStop("reset");
};
}
public function xFadeInGame(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha - 0.05);
if (blackMask_mc.alpha < 0){
blackMask_mc.alpha = 0;
blackMask_mc.visible = false;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeInGame);
addGameEvent();
};
}
public function xEnterMain(_arg1:Event):void{
counter++;
if (hikareFlag == false){
if (madokaMove == false){
if (keysDown[Keyboard.LEFT] == true){
madokaPoint--;
madokaMove = true;
if (madokaPoint < 0){
madokaPoint = 0;
};
} else {
if (keysDown[Keyboard.RIGHT] == true){
madokaPoint++;
madokaMove = true;
if (madokaPoint > 4){
madokaPoint = 4;
};
};
};
};
if (madokaMove == true){
if (madoka_mc.x == madokaX[madokaPoint]){
madokaMove = false;
} else {
if (madoka_mc.x < madokaX[madokaPoint]){
madoka_mc.x = (madoka_mc.x + 13);
} else {
if (madoka_mc.x > madokaX[madokaPoint]){
madoka_mc.x = (madoka_mc.x - 13);
};
};
};
};
rails_mc.y = (rails_mc.y + 0.5);
if (rails_mc.y >= 960){
rails_mc.y = 0;
};
score_txt.text = (score + " 回");
trainWait++;
if (trainWait >= trainNext){
addTrain();
trainWait = 0;
if (trainNext >= 100){
trainNext = (trainNext - 10);
} else {
trainNext = (trainNext - 2);
};
if (trainNext <= 50){
trainNext = 50;
};
};
} else {
if (gameOverFlag == false){
madoka_mc.y = (madoka_mc.y + 20);
if ((((stepCount == 0)) && ((madoka_mc.y >= 650)))){
if (gameOver_mc.visible == false){
gameOver_mc.score_txt.text = score.toString();
gameOver_mc.visible = true;
gameOverCheck();
};
gameOver_mc.alpha = (gameOver_mc.alpha + 0.05);
if (gameOver_mc.alpha >= 0.9){
stopSe();
gameOverFlag = true;
};
};
};
};
test_txt.text = trainNow.toString();
}
public function xFadeLoadToTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.05);
if (blackMask_mc.alpha >= 1){
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeLoadToTitle);
gotoAndStop("loadRanking");
};
}
public function xCompleteRanking(_arg1:Event):void{
var _local2:XML;
var _local3:XMLList;
var _local4:Array;
var _local5:Array;
var _local6:*;
_local2 = new XML(rankingXmlLoader.data);
_local3 = _local2.ranking;
_local4 = [];
for each (_local2 in _local3) {
_local4.push({name:_local2.name, score:_local2.score, player:_local2.player});
};
_local4.sortOn(["score"], [(Array.DESCENDING | Array.NUMERIC)]);
_local5 = [];
_local6 = 0;
while ((((rankingScore_array.length < 300)) && ((_local6 < _local4.length)))) {
if (_local5.indexOf(_local4[_local6].name.toString()) == -1){
rankingScore_array.push(_local4[_local6]);
_local5.push(_local4[_local6].name.toString());
};
_local6++;
};
_local4.sortOn(["score"], [(Array.DESCENDING | Array.NUMERIC)]);
_local4 = null;
_local5 = null;
if (rankingScore_array[299] != null){
rankingLastScore = rankingScore_array[299].score;
} else {
rankingLastScore = 0;
};
rankingXmlLoader.removeEventListener(Event.COMPLETE, xCompleteRanking);
rankingXmlLoader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
gotoAndStop("title");
}
public function addTrain2():void{
var _local1:*;
var _local2:MovieClip;
var _local3:*;
if (trainOk == true){
trainOk = false;
_local1 = 0;
while (_local1 < train_array[trainStage].length) {
_local2 = new TRAIN_MC();
_local3 = Math.floor((Math.random() * 5));
if (beforeTrain == _local3){
_local3++;
if (_local3 > 4){
_local3 = 0;
};
};
_local2.x = trainX[train_array[trainStage][_local1]];
_local2.y = ((-50 - _local2.height) - train_array[trainStage][(_local1 + 1)]);
stage_mc.addChild(_local2);
stepCount++;
_local1 = (_local1 + 2);
};
trainStage++;
if (train_array.length <= trainStage){
trainStage = 0;
};
};
}
public function updateRanking():void{
var _local1:*;
_local1 = 0;
_local1 = 0;
while (_local1 < 10) {
ranking_mc[(("list" + _local1) + "_mc")].rank_txt.text = ((((rankingPage * 10) + _local1) + 1) + "位 :");
if (rankingScore_array[((rankingPage * 10) + _local1)] != null){
ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = rankingScore_array[((rankingPage * 10) + _local1)].name;
ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = (rankingScore_array[((rankingPage * 10) + _local1)].score + " 回");
} else {
ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = "-";
ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = "-";
};
_local1++;
};
}
public function gameSeComplete(_arg1:Event):void{
sndCh.removeEventListener(Event.SOUND_COMPLETE, gameSeComplete);
if (hikareFlag == false){
playSeNo = -1;
playSeNo = 5;
sndCh = seList[playSeNo].play(0, 1, sndTr);
sndCh.addEventListener(Event.SOUND_COMPLETE, gameSeComplete);
};
}
public function updateVolume():void{
var _local1:*;
se_txt.text = "Se ";
_local1 = 0;
while (_local1 < seVolume) {
se_txt.appendText("☆");
_local1++;
};
bgm_txt.text = "Bgm ";
_local1 = 0;
while (_local1 < bgmVolume) {
bgm_txt.appendText("☆");
_local1++;
};
bgmTr.volume = (bgmVolume * 0.1);
bgmCh.soundTransform = bgmTr;
sndTr.volume = (seVolume * 0.2);
sndCh.soundTransform = sndTr;
so.data.bgmVolume = bgmVolume;
so.data.seVolume = seVolume;
}
public function contextInit():void{
var _local1:*;
var _local2:*;
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
_local2 = new Sprite();
stage.addChildAt(_local2, 0);
_local2.graphics.beginFill(0xFF0000, 0);
_local2.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
_local2.graphics.endFill();
_local2.contextMenu = _local1;
}
public function stopBgm(){
bgmCh.removeEventListener(Event.SOUND_COMPLETE, gameBgmComplete);
bgmCh.stop();
playBgmNo = -1;
}
public function xClickLink1(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://3-me.net/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function xClickLink2(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://chacocco.blog94.fc2.com/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function soInit():void{
if (so.size == 0){
so.data.scoreName = "";
so.data.hiScore = 0;
so.data.bgmVolume = 2;
so.data.seVolume = 2;
} else {
if (so.data.scoreName != null){
scoreName = so.data.scoreName;
};
if (so.data.hiScore != null){
hiScore = so.data.hiScore;
};
if (so.data.bgmVolume != null){
bgmVolume = so.data.bgmVolume;
};
if (so.data.seVolume != null){
seVolume = so.data.seVolume;
};
};
}
public function removeGameEvent():void{
removeEventListener(Event.ENTER_FRAME, xEnterMain);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, xKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, xKeyUp);
}
public function xKeyUpTitle(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 90){
if (titleDisp == 0){
if (cursorNo == 0){
removeTitleEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeTitleToGame);
} else {
if (cursorNo == 1){
titleDisp = 1;
ranking_mc.visible = true;
} else {
if (cursorNo == 2){
bgmVolume++;
if (bgmVolume > 5){
bgmVolume = 0;
};
updateVolume();
} else {
if (cursorNo == 3){
seVolume++;
if (seVolume > 5){
seVolume = 0;
};
updateVolume();
};
};
};
};
} else {
if (titleDisp == 1){
titleDisp = 0;
ranking_mc.visible = false;
};
};
playSe(1);
} else {
if (_arg1.keyCode == Keyboard.UP){
if (titleDisp == 0){
cursorNo--;
if (cursorNo < 0){
cursorNo = 0;
};
playSe(0);
cursor_mc.y = cursorX_array[cursorNo];
} else {
if (titleDisp == 1){
rankingPage--;
if (rankingPage < 0){
rankingPage = 0;
};
playSe(0);
updateRanking();
};
};
} else {
if (_arg1.keyCode == Keyboard.DOWN){
if (titleDisp == 0){
cursorNo++;
if (cursorNo > 3){
cursorNo = 3;
};
playSe(0);
cursor_mc.y = cursorX_array[cursorNo];
} else {
if (titleDisp == 1){
rankingPage++;
if (rankingPage > 29){
rankingPage = 29;
};
playSe(0);
updateRanking();
};
};
};
};
};
}
public function xKeyUp(_arg1:KeyboardEvent):void{
var _local2:String;
var _local3:String;
var _local4:URLRequest;
keysDown[_arg1.keyCode] = false;
if ((((gameOverFlag == true)) && ((gameOver_mc.rankin_mc.visible == false)))){
if (_arg1.keyCode == 90){
playSe(1);
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToRetry);
} else {
if (_arg1.keyCode == Keyboard.SPACE){
playSe(1);
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToTitle);
} else {
if (_arg1.keyCode == Keyboard.SHIFT){
playSe(1);
_local2 = escapeMultiByte((("まどかは " + score) + "回 避けたところで XXにXかれました。 http://bit.ly/ftrvsH #madoka_train"));
_local3 = ("http://twitter.com/intent/tweet?text=+" + _local2);
_local4 = new URLRequest(_local3);
navigateToURL(_local4, "_blank");
};
};
};
};
}
public function loadSound():void{
bgmList[0] = new BGM();
seList[0] = new cursor0();
seList[1] = new enter0();
seList[2] = new fue();
seList[3] = new train0();
seList[4] = new train1();
seList[5] = new train2();
seList[6] = new train3();
seList[7] = new miss0();
}
public function xFadeTitleToGame(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.05);
if (blackMask_mc.alpha >= 1){
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeTitleToGame);
gotoAndStop("game");
};
}
public function playBgmLoop(_arg1){
playBgmNo = _arg1;
bgmCh = bgmList[_arg1].play(1, 1, bgmTr);
bgmCh.addEventListener(Event.SOUND_COMPLETE, gameBgmComplete);
}
public function registHiscore(_arg1:String, _arg2:int):void{
var url:URLRequest;
var playerNo:int;
var variables:URLVariables;
var loader:URLLoader;
var nameStr = _arg1;
var scoreInt = _arg2;
url = new URLRequest(PHP_RANKING);
playerNo = 0;
variables = new URLVariables();
variables.name = nameStr;
variables.score = scoreInt;
variables.player = playerNo;
url.data = variables.toString();
url.method = URLRequestMethod.POST;
loader = new URLLoader();
try {
loader.load(url);
} catch(e:Error) {
};
url = null;
loader = null;
}
public function xClickRankSend(_arg1:MouseEvent):void{
playSe(1);
if (gameOver_mc.rankin_mc.rankName_txt.length != 0){
gameOver_mc.rankin_mc.send_btn.removeEventListener(MouseEvent.CLICK, xClickRankSend);
gameOver_mc.rankin_mc.noSend_btn.removeEventListener(MouseEvent.CLICK, xClickRankNoSend);
registHiscore(gameOver_mc.rankin_mc.rankName_txt.text, score);
scoreName = gameOver_mc.rankin_mc.rankName_txt.text;
so.data.scoreName = scoreName;
gameOver_mc.rankin_mc.visible = false;
gameOver_mc.nextGame_mc.visible = true;
};
}
public function addTrain():void{
var _local1:int;
var _local2:Boolean;
var _local3:*;
var _local4:Boolean;
var _local5:*;
var _local6:int;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Boolean;
var _local11:Boolean;
var _local12:*;
var _local13:MovieClip;
_local1 = (Math.floor((Math.random() * 2)) + 1);
_local1 = 2;
_local2 = false;
_local3 = 0;
while (_local3 < _local1) {
_local4 = true;
_local5 = Math.floor((Math.random() * 5));
if (beforeTrain == _local5){
++_local5;
if (_local5 > 4){
_local5 = 0;
};
_local4 = false;
};
if (madokaPoint == _local5){
_local8 = (madokaPoint - 1);
_local9 = (madokaPoint + 1);
_local10 = false;
_local11 = false;
if ((((trainNow[_local8] >= 1)) || ((_local8 == -1)))){
_local10 = true;
};
if ((((trainNow[_local9] >= 1)) || ((_local9 == 5)))){
_local11 = true;
};
if ((((_local10 == true)) && ((_local11 == true)))){
_local4 = false;
};
};
_local8 = (_local5 - 1);
_local9 = (_local5 + 1);
_local10 = false;
_local11 = false;
if ((((trainNow[_local8] >= 1)) || ((_local8 == -1)))){
_local10 = true;
};
if ((((trainNow[_local9] >= 1)) || ((_local9 == 5)))){
_local11 = true;
};
if ((((((_local10 == true)) && ((_local11 == true)))) && ((((((_local8 == madokaPoint)) || ((_local9 == madokaPoint)))) || ((_local5 == madokaPoint)))))){
_local4 = false;
};
_local6 = 0;
_local7 = 0;
while (_local7 < trainNow.length) {
_local6 = (_local6 + trainNow[_local7]);
_local7++;
};
if (_local6 >= 4){
_local4 = false;
};
if (_local4 == true){
_local12 = 0;
switch (Math.floor((Math.random() * 3))){
case 0:
_local13 = new TRAIN_MC();
break;
case 1:
_local13 = new TRAIN1_MC();
break;
case 2:
_local13 = new TRAIN2_MC();
break;
};
_local13.x = trainX[_local5];
beforeTrain = _local5;
var _local14 = trainNow;
var _local15 = _local5;
var _local16 = (_local14[_local15] + 1);
_local14[_local15] = _local16;
_local13.railNo = _local5;
if (_local3 >= 1){
if (Math.floor((Math.random() * 3)) == 0){
_local13.y = (-50 - _local13.height);
} else {
_local13.y = (((-50 - _local13.height) - Math.floor((Math.random() * 400))) - 500);
};
} else {
_local13.y = (-50 - _local13.height);
};
_local2 = true;
stage_mc.addChild(_local13);
stepCount++;
};
_local3++;
};
if (_local2 == true){
playSe(2);
};
}
public function stopSe(){
sndCh.removeEventListener(Event.SOUND_COMPLETE, gameSeComplete);
sndCh.stop();
playSeNo = -1;
}
public function xLoadEnter(_arg1:Event):void{
var _local2:*;
_local2 = Math.floor(((info.bytesLoaded / info.bytesTotal) * 100));
if (info.bytesLoaded == info.bytesTotal){
stage.removeEventListener(Event.ENTER_FRAME, xLoadEnter);
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeLoadToTitle);
};
}
}
}//package madokatrain2_fla
Section 3
//RANKIN_MC_25 (madokatrain2_fla.RANKIN_MC_25)
package madokatrain2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class RANKIN_MC_25 extends MovieClip {
public var noSend_btn:SimpleButton;
public var rankName_txt:TextField;
public var send_btn:SimpleButton;
}
}//package madokatrain2_fla
Section 4
//RANKING_LIST_6 (madokatrain2_fla.RANKING_LIST_6)
package madokatrain2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class RANKING_LIST_6 extends MovieClip {
public var score_txt:TextField;
public var name_txt:TextField;
public var rank_txt:TextField;
}
}//package madokatrain2_fla
Section 5
//RANKING_MC_5 (madokatrain2_fla.RANKING_MC_5)
package madokatrain2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class RANKING_MC_5 extends MovieClip {
public var list9_mc:MovieClip;
public var list1_mc:MovieClip;
public var list4_mc:MovieClip;
public var list7_mc:MovieClip;
public var rankTitle_txt:TextField;
public var list2_mc:MovieClip;
public var list8_mc:MovieClip;
public var list5_mc:MovieClip;
public var list0_mc:MovieClip;
public var list3_mc:MovieClip;
public var list6_mc:MovieClip;
}
}//package madokatrain2_fla
Section 6
//TRAINHEAD_MC_30 (madokatrain2_fla.TRAINHEAD_MC_30)
package madokatrain2_fla {
import flash.display.*;
public dynamic class TRAINHEAD_MC_30 extends MovieClip {
public function TRAINHEAD_MC_30(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package madokatrain2_fla
Section 7
//BGM (BGM)
package {
import flash.media.*;
public dynamic class BGM extends Sound {
}
}//package
Section 8
//cursor0 (cursor0)
package {
import flash.media.*;
public dynamic class cursor0 extends Sound {
}
}//package
Section 9
//enter0 (enter0)
package {
import flash.media.*;
public dynamic class enter0 extends Sound {
}
}//package
Section 10
//fue (fue)
package {
import flash.media.*;
public dynamic class fue extends Sound {
}
}//package
Section 11
//miss0 (miss0)
package {
import flash.media.*;
public dynamic class miss0 extends Sound {
}
}//package
Section 12
//TRAIN_MC (TRAIN_MC)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class TRAIN_MC extends MovieClip {
public var railNo;
public var rectLeft:Number;
public var scrollSpeedY:Number;
public var head_mc:MovieClip;
public var rectRight:Number;
public var safeFlag:Boolean;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public function TRAIN_MC(){
addFrameScript(0, frame1);
}
public function xEnterStep(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
this.y = (this.y + scrollSpeedY);
_local2 = rootObj.madoka_mc.x;
_local3 = (rootObj.madoka_mc.x + 40);
_local4 = rootObj.madoka_mc.y;
_local5 = (rootObj.madoka_mc.y + 80);
_local6 = (this.x - 0);
_local7 = (this.x + 100);
_local8 = this.y;
_local9 = (this.y + 1900);
if ((((((((((_local2 < _local7)) && ((_local3 > _local6)))) && ((_local4 < _local9)))) && ((_local5 > _local8)))) && ((rootObj.hikareFlag == false)))){
rootObj.playSe(7);
rootObj.hikareFlag = true;
};
if ((((this.y > 200)) && ((safeFlag == false)))){
safeFlag = true;
var _local10 = rootObj.trainNow;
var _local11 = railNo;
var _local12 = (_local10[_local11] - 1);
_local10[_local11] = _local12;
};
if (this.y > 650){
deleteFlag = true;
if (rootObj.hikareFlag == false){
rootObj.score++;
if ((rootObj.score % 10) == 0){
if (rootObj.madoka_mc.y > 180){
rootObj.madoka_mc.y = (rootObj.madoka_mc.y - 1);
};
};
};
};
if (deleteFlag == true){
removeThisObject();
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterStep);
rootObj.stepCount--;
rootObj = null;
this.parent.removeChild(this);
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
deleteFlag = false;
scrollSpeedY = 20;
rectLeft = 50;
rectRight = 50;
safeFlag = false;
if (Math.floor((Math.random() * 500)) == 0){
head_mc.gotoAndStop("rare");
};
rootObj.playSeLoop(5);
addEventListener(Event.ENTER_FRAME, xEnterStep);
}
}
}//package
Section 13
//train0 (train0)
package {
import flash.media.*;
public dynamic class train0 extends Sound {
}
}//package
Section 14
//train1 (train1)
package {
import flash.media.*;
public dynamic class train1 extends Sound {
}
}//package
Section 15
//TRAIN1_MC (TRAIN1_MC)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class TRAIN1_MC extends MovieClip {
public var railNo;
public var rectLeft:Number;
public var scrollSpeedY:Number;
public var head_mc:MovieClip;
public var rectRight:Number;
public var safeFlag:Boolean;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public function TRAIN1_MC(){
addFrameScript(0, frame1);
}
public function xEnterStep(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
this.y = (this.y + scrollSpeedY);
_local2 = rootObj.madoka_mc.x;
_local3 = (rootObj.madoka_mc.x + 40);
_local4 = rootObj.madoka_mc.y;
_local5 = (rootObj.madoka_mc.y + 80);
_local6 = (this.x - 0);
_local7 = (this.x + 100);
_local8 = this.y;
_local9 = (this.y + 1150);
if ((((((((((_local2 < _local7)) && ((_local3 > _local6)))) && ((_local4 < _local9)))) && ((_local5 > _local8)))) && ((rootObj.hikareFlag == false)))){
rootObj.playSe(7);
rootObj.hikareFlag = true;
};
if ((((this.y > 200)) && ((safeFlag == false)))){
safeFlag = true;
var _local10 = rootObj.trainNow;
var _local11 = railNo;
var _local12 = (_local10[_local11] - 1);
_local10[_local11] = _local12;
};
if (this.y > 650){
deleteFlag = true;
if (rootObj.hikareFlag == false){
rootObj.score++;
if ((rootObj.score % 10) == 0){
if (rootObj.madoka_mc.y > 180){
rootObj.madoka_mc.y = (rootObj.madoka_mc.y - 1);
};
};
};
};
if (deleteFlag == true){
removeThisObject();
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterStep);
rootObj.stepCount--;
rootObj = null;
this.parent.removeChild(this);
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
deleteFlag = false;
scrollSpeedY = 20;
rectLeft = 50;
rectRight = 50;
safeFlag = false;
if (Math.floor((Math.random() * 500)) == 0){
head_mc.gotoAndStop("rare");
};
rootObj.playSeLoop(5);
addEventListener(Event.ENTER_FRAME, xEnterStep);
}
}
}//package
Section 16
//train2 (train2)
package {
import flash.media.*;
public dynamic class train2 extends Sound {
}
}//package
Section 17
//TRAIN2_MC (TRAIN2_MC)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class TRAIN2_MC extends MovieClip {
public var railNo;
public var rectLeft:Number;
public var scrollSpeedY:Number;
public var head_mc:MovieClip;
public var rectRight:Number;
public var safeFlag:Boolean;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public function TRAIN2_MC(){
addFrameScript(0, frame1);
}
public function xEnterStep(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
this.y = (this.y + scrollSpeedY);
_local2 = rootObj.madoka_mc.x;
_local3 = (rootObj.madoka_mc.x + 40);
_local4 = rootObj.madoka_mc.y;
_local5 = (rootObj.madoka_mc.y + 80);
_local6 = (this.x - 0);
_local7 = (this.x + 100);
_local8 = this.y;
_local9 = (this.y + 450);
if ((((((((((_local2 < _local7)) && ((_local3 > _local6)))) && ((_local4 < _local9)))) && ((_local5 > _local8)))) && ((rootObj.hikareFlag == false)))){
rootObj.playSe(7);
rootObj.hikareFlag = true;
};
if ((((this.y > 200)) && ((safeFlag == false)))){
safeFlag = true;
var _local10 = rootObj.trainNow;
var _local11 = railNo;
var _local12 = (_local10[_local11] - 1);
_local10[_local11] = _local12;
};
if (this.y > 650){
deleteFlag = true;
if (rootObj.hikareFlag == false){
rootObj.score++;
if ((rootObj.score % 10) == 0){
if (rootObj.madoka_mc.y > 180){
rootObj.madoka_mc.y = (rootObj.madoka_mc.y - 1);
};
};
};
};
if (deleteFlag == true){
removeThisObject();
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterStep);
rootObj.stepCount--;
rootObj = null;
this.parent.removeChild(this);
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
deleteFlag = false;
scrollSpeedY = 20;
rectLeft = 50;
rectRight = 50;
safeFlag = false;
if (Math.floor((Math.random() * 500)) == 0){
head_mc.gotoAndStop("rare");
};
rootObj.playSeLoop(5);
addEventListener(Event.ENTER_FRAME, xEnterStep);
}
}
}//package
Section 18
//train3 (train3)
package {
import flash.media.*;
public dynamic class train3 extends Sound {
}
}//package