Section 1
//BACK_MC_24 (chal_fla.BACK_MC_24)
package chal_fla {
import flash.display.*;
public dynamic class BACK_MC_24 extends MovieClip {
public var mask_mc:MovieClip;
}
}//package chal_fla
Section 2
//BALLOON_MC_31 (chal_fla.BALLOON_MC_31)
package chal_fla {
import flash.display.*;
public dynamic class BALLOON_MC_31 extends MovieClip {
public var okashi_mc:MovieClip;
}
}//package chal_fla
Section 3
//BOMANIME_MC_61 (chal_fla.BOMANIME_MC_61)
package chal_fla {
import flash.display.*;
public dynamic class BOMANIME_MC_61 extends MovieClip {
public function BOMANIME_MC_61(){
addFrameScript(0, frame1, 11, frame12, 32, frame33);
}
function frame12(){
gotoAndPlay("start");
}
function frame1(){
stop();
}
function frame33(){
stop();
}
}
}//package chal_fla
Section 4
//BOMANIME2_MC_67 (chal_fla.BOMANIME2_MC_67)
package chal_fla {
import flash.display.*;
public dynamic class BOMANIME2_MC_67 extends MovieClip {
public function BOMANIME2_MC_67(){
addFrameScript(0, frame1, 1, frame2, 12, frame13, 33, frame34);
}
function frame1(){
stop();
}
function frame13(){
gotoAndPlay("start");
}
function frame2(){
stop();
}
function frame34(){
stop();
}
}
}//package chal_fla
Section 5
//CHARA_MC_34 (chal_fla.CHARA_MC_34)
package chal_fla {
import flash.display.*;
public dynamic class CHARA_MC_34 extends MovieClip {
public var tail0_mc:MovieClip;
public var tail1_mc:MovieClip;
public var player_mc:PLAYER_MC;
}
}//package chal_fla
Section 6
//CIRCLE_MC_30 (chal_fla.CIRCLE_MC_30)
package chal_fla {
import flash.display.*;
public dynamic class CIRCLE_MC_30 extends MovieClip {
public function CIRCLE_MC_30(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package chal_fla
Section 7
//CLEAR_MC_52 (chal_fla.CLEAR_MC_52)
package chal_fla {
import flash.display.*;
public dynamic class CLEAR_MC_52 extends MovieClip {
public function CLEAR_MC_52(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package chal_fla
Section 8
//DASHMARK_MC_82 (chal_fla.DASHMARK_MC_82)
package chal_fla {
import flash.display.*;
public dynamic class DASHMARK_MC_82 extends MovieClip {
public function DASHMARK_MC_82(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package chal_fla
Section 9
//DEAD0_54 (chal_fla.DEAD0_54)
package chal_fla {
import flash.display.*;
public dynamic class DEAD0_54 extends MovieClip {
public var animationFlag:Boolean;
public function DEAD0_54(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 16, frame17, 49, frame50, 50, frame51, 78, frame79, 93, frame94);
}
function frame79(){
stop();
animationFlag = false;
}
function frame94(){
stop();
}
function frame16(){
stop();
animationFlag = false;
}
function frame1(){
stop();
animationFlag = false;
}
function frame17(){
animationFlag = true;
}
function frame2(){
animationFlag = true;
}
function frame51(){
animationFlag = true;
}
function frame50(){
stop();
animationFlag = false;
}
}
}//package chal_fla
Section 10
//DEAD1_58 (chal_fla.DEAD1_58)
package chal_fla {
import flash.display.*;
public dynamic class DEAD1_58 extends MovieClip {
public var animationFlag:Boolean;
public function DEAD1_58(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 16, frame17, 49, frame50, 64, frame65);
}
function frame65(){
stop();
}
function frame16(){
stop();
animationFlag = false;
}
function frame1(){
stop();
animationFlag = false;
}
function frame17(){
animationFlag = true;
}
function frame2(){
animationFlag = true;
}
function frame50(){
stop();
animationFlag = false;
}
}
}//package chal_fla
Section 11
//DEAD2_69 (chal_fla.DEAD2_69)
package chal_fla {
import flash.display.*;
public dynamic class DEAD2_69 extends MovieClip {
public var animationFlag:Boolean;
public function DEAD2_69(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 16, frame17, 49, frame50, 64, frame65);
}
function frame65(){
stop();
}
function frame16(){
stop();
animationFlag = false;
}
function frame1(){
stop();
animationFlag = false;
}
function frame17(){
animationFlag = true;
}
function frame2(){
animationFlag = true;
}
function frame50(){
stop();
animationFlag = false;
}
}
}//package chal_fla
Section 12
//DEAD3_73 (chal_fla.DEAD3_73)
package chal_fla {
import flash.display.*;
public dynamic class DEAD3_73 extends MovieClip {
public var animationFlag:Boolean;
public function DEAD3_73(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 16, frame17, 49, frame50, 64, frame65);
}
function frame65(){
stop();
}
function frame16(){
stop();
animationFlag = false;
}
function frame1(){
stop();
animationFlag = false;
}
function frame17(){
animationFlag = true;
}
function frame2(){
animationFlag = true;
}
function frame50(){
stop();
animationFlag = false;
}
}
}//package chal_fla
Section 13
//DEAD4_76 (chal_fla.DEAD4_76)
package chal_fla {
import flash.display.*;
public dynamic class DEAD4_76 extends MovieClip {
public var animationFlag:Boolean;
public function DEAD4_76(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 16, frame17, 49, frame50, 64, frame65);
}
function frame65(){
stop();
}
function frame16(){
stop();
animationFlag = false;
}
function frame1(){
stop();
animationFlag = false;
}
function frame17(){
animationFlag = true;
}
function frame2(){
animationFlag = true;
}
function frame50(){
stop();
animationFlag = false;
}
}
}//package chal_fla
Section 14
//EATGRA_MC_33 (chal_fla.EATGRA_MC_33)
package chal_fla {
import flash.display.*;
public dynamic class EATGRA_MC_33 extends MovieClip {
public function EATGRA_MC_33(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package chal_fla
Section 15
//GAMEOVER_MC_44 (chal_fla.GAMEOVER_MC_44)
package chal_fla {
import flash.display.*;
public dynamic class GAMEOVER_MC_44 extends MovieClip {
public var survivalBtns_mc:MovieClip;
public var normalBtns_mc:MovieClip;
public var suv_mc:MovieClip;
}
}//package chal_fla
Section 16
//INPUTNAME_MC_2 (chal_fla.INPUTNAME_MC_2)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INPUTNAME_MC_2 extends MovieClip {
public var ok_btn:SimpleButton;
public var name_txt:TextField;
}
}//package chal_fla
Section 17
//KUBIANIME_MC_65 (chal_fla.KUBIANIME_MC_65)
package chal_fla {
import flash.display.*;
public dynamic class KUBIANIME_MC_65 extends MovieClip {
public function KUBIANIME_MC_65(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package chal_fla
Section 18
//MainTimeline (chal_fla.MainTimeline)
package chal_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
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 const PHP_TOTAL = "php198712/total.php";
public const PHP_SURVIVAL = "php198712/survival.php";
public const MODE_SURVIVAL:int = 0;
public const MODE_NORMAL:int = 1;
public var mapData_array:Array;
public var seVolume:int;
public var rateCount:int;
public var block_array:Array;
public var rightKeyCount:int;
public var cursor_array:Array;
public var scoreName:String;
public var survivalScore_array:Array;
public var MASS_HEIGHT_MAX:int;
public var MASS_CENTERX:int;
public var MASS_CENTERY:int;
public var nowPoint:int;
public var rankingScore_array:Array;
public var g:Graphics;
public var itemMessage1_txt:TextField;
public var totalScore_array:Array;
public var gameOver_mc:MovieClip;
public var gameOverFlag:Boolean;
public var dashCount:int;
public var wait_mc:MovieClip;
public var g2:Graphics;
public var keySample_mc:MovieClip;
public var inputName_mc:MovieClip;
public var clearStage:int;
public var gameMode:int;
public var madokaDead:Boolean;
public var downKeyCount:int;
public var continueFlag:Boolean;
public var keysDown:Array;
public var clear_mc:MovieClip;
public var messageStr:String;
public var moveKey:int;
public var title_mc:MovieClip;
public var rate:int;
public var XML_TOTAL;
public var itemMessage0_txt:TextField;
public var dashNo:int;
public var playSeNo:int;
public var rateSprite2;
public var mapXmlLoader:URLLoader;
public var obj_array:Array;
public var XML_MAP;
public var chalMode:int;
public var MAX;
public var rate_mc:MovieClip;
public var stageNo:int;
public var bgmTr;
public var rateColor_array:Array;
public var bgmList:Dictionary;
public var scoreTitle_txt:TextField;
public var playerY:Number;
public var option_mc:MovieClip;
public var playerX:Number;
public var tail_array:Array;
public var totalScore:int;
public var survivalClear:int;
public var ready_mc:MovieClip;
public var map_array:Array;
public var autoFlag:Boolean;
public var upKeyCount:int;
public var sndTr;
public var playBgmNo:int;
public var objData_array:Array;
public var tail0:Point;
public var tail1:Point;
public var noEatFlag:Boolean;
public var clear_array:Array;
public var warp_array:Array;
public var stageClear_mc:MovieClip;
public var noEat_array:Array;
public var survivalScore:int;
public var playerSpeed:Number;
public var noMiss_array:Array;
public var stageClearFlag:Boolean;
public var counter:int;
public var bgmVolume:int;
public var seList:Dictionary;
public var bgmPosition:int;
public var balloonCount:int;
public var warp0Flag:Boolean;
public var playCount:int;
public var keyType:int;
public var rate_array:Array;
public var route:Array;
public var objCount:int;
public var stageSelect_mc:MovieClip;
public var so:SharedObject;
public var clearPoint_array:Array;
public var rateColor:int;
public var mapMax:int;
public var mc_array:Array;
public var hiSurvivalScore:int;
public var stage_mc:MovieClip;
public var massCount:int;
public var keyConfig:Array;
public var chara_mc:MovieClip;
public var chalGage_mc:MovieClip;
public var missFlag:Boolean;
public var waitFlag:Boolean;
public var rate_txt:TextField;
public var XML_SURVIVAL;
public var rateTarget:int;
public var mitume_btn:SimpleButton;
public var eaten_array:Array;
public var score:int;
public var itemStage_mc:MovieClip;
public var hiScore_array:Array;
public var totalLastScore:int;
public var allClearFlag:Boolean;
public var faceKey:int;
public var scoreTarget:int;
public var blackMask_mc:MovieClip;
public var rankingLastScore_array:Array;
public var itemMessage4_txt:TextField;
public var rankingMode:int;
public var bgmLoopTime_array:Array;
public var eatGra_mc:MovieClip;
public var testFlag:Boolean;
public var cursor_mc:MovieClip;
public var leftKeyCount:int;
public var hiScore_txt:TextField;
public var score_txt:TextField;
public var keysDownTitle:Array;
public var bgmCh;
public var miniBlock_array:Array;
public var clearPoint:int;
public var circle_mc:MovieClip;
public var itemMessage3_txt:TextField;
public var clearPoint_txt:TextField;
public var menuNo:int;
public var rankingXmlLoader:URLLoader;
public var stageNo_txt:TextField;
public var chalCount:int;
public var MASS_WIDTH_MAX:int;
public var balloon_mc:MovieClip;
public var sndCh;
public var cursorNo:int;
public var clearBm_mc:MovieClip;
public var deleteFlag:Boolean;
public var rateSprite;
public var XML_RANKING;
public var gotItem_array:Array;
public var rankingPage:int;
public var back_mc:MovieClip;
public var itemMessage2_txt:TextField;
public var messageCounter:int;
public var survivalLastScore:int;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
public function createRoot():void{
var j:*;
var hitArray:Array;
var j2:*;
j = 0;
while (j < map_array.length) {
hitArray = [-20, -1, 1, 20];
route[j] = new Array(map_array.length).map(function (... _args):int{
return (0);
});
j2 = 0;
while (j2 < hitArray.length) {
if (((((!((map_array[(j + hitArray[j2])] == null))) && ((map_array[j] == 0)))) && ((map_array[(j + hitArray[j2])] == 0)))){
route[j][(j + hitArray[j2])] = 1;
};
j2 = (j2 + 1);
};
j = (j + 1);
};
}
public function xKeyDown(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
public function getQY(_arg1:int, _arg2:int):int{
return (((_arg1 + _arg2) + MASS_CENTERY));
}
public function removeClearEvent():void{
stage.removeEventListener(KeyboardEvent.KEY_UP, xKeyClear);
}
public function getQX(_arg1:int, _arg2:int):int{
return ((((_arg1 - _arg2) * 2) + MASS_CENTERX));
}
public function xClickInputNameOk(_arg1:MouseEvent):void{
if (inputName_mc.name_txt.length != 0){
inputName_mc.ok_btn.removeEventListener(MouseEvent.CLICK, xClickInputNameOk);
scoreName = inputName_mc.name_txt.text;
so.data.scoreName = inputName_mc.name_txt.text;
playSe(0);
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeInputToTitle);
};
}
public function errorHandler(_arg1:IOErrorEvent):void{
}
public function addMessage(_arg1:String):void{
itemMessage4_txt.text = itemMessage3_txt.text;
itemMessage3_txt.text = itemMessage2_txt.text;
itemMessage2_txt.text = itemMessage1_txt.text;
itemMessage1_txt.text = itemMessage0_txt.text;
itemMessage0_txt.text = _arg1;
}
public function xCompleteSurvival(_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, stageNo:_local2.stage});
};
_local4.sortOn(["score"], [(Array.DESCENDING | Array.NUMERIC)]);
_local5 = [];
_local6 = 0;
while ((((survivalScore_array.length < 100)) && ((_local6 < _local4.length)))) {
if (_local5.indexOf(_local4[_local6].name.toString()) == -1){
survivalScore_array.push(_local4[_local6]);
_local5.push(_local4[_local6].name.toString());
};
_local6++;
};
_local4.sortOn(["score"], [(Array.DESCENDING | Array.NUMERIC)]);
_local4 = null;
_local5 = null;
if (survivalScore_array[99] != null){
survivalLastScore = survivalScore_array[99].score;
} else {
survivalLastScore = 0;
};
_local4 = null;
_local5 = null;
rankingXmlLoader.removeEventListener(Event.COMPLETE, xCompleteSurvival);
if (scoreName.length == 0){
gotoAndStop("inputName");
} else {
gotoAndStop("title");
};
}
public function solve(_arg1:int, _arg2:int, _arg3:int):int{
var visited:Array;
var distance:Array;
var prev:Array;
var pos:int;
var str:String;
var node:int;
var track:Array;
var i:int;
var min:int;
var next:int;
var x:int;
var d:int;
var start = _arg1;
var goal = _arg2;
var remove = _arg3;
visited = new Array(MAX).map(function (... _args):Boolean{
return (false);
});
distance = new Array(MAX).map(function (... _args):int{
return (int.MAX_VALUE);
});
prev = new Array(MAX);
distance[start] = 0;
prev[start] = start;
pos = start;
while (true) {
min = int.MAX_VALUE;
next = -1;
visited[pos] = true;
x = 0;
while (x < MAX) {
if (visited[x] == true){
} else {
if ((((route[pos][x] == 1)) && (!((x == remove))))){
d = (distance[pos] + route[pos][x]);
if (d < distance[x]){
distance[x] = d;
prev[x] = pos;
};
};
if (distance[x] < min){
min = distance[x];
next = x;
};
};
x = (x + 1);
};
pos = next;
if (next == -1){
break;
};
};
str = (((start + "街から") + goal) + "街までの最短距離は");
node = prev[goal];
track = [];
track.unshift(goal);
i = 0;
while (i < MAX) {
track.unshift(node);
if (node == start){
break;
};
node = prev[node];
i = (i + 1);
};
i = 0;
while (i < track.length) {
str = (str + (" -> " + track[i]));
i = (i + 1);
};
return (track[1]);
}
function frame1(){
stop();
testFlag = false;
keyConfig = [];
keyConfig[0] = [37, 39, 38, 40];
keyConfig[1] = [38, 40, 39, 37];
stageNo = 0;
gameMode = 0;
XML_MAP = "xml418501/map.xml";
if (testFlag == false){
XML_MAP = ("xml418501/map.xml?" + new Date().getTime());
};
MASS_WIDTH_MAX = 20;
MASS_HEIGHT_MAX = 15;
MASS_CENTERX = 210;
MASS_CENTERY = 0;
stop();
mapData_array = [];
objData_array = [];
clearPoint_array = [];
hiScore_array = [];
clearStage = 0;
scoreName = "";
bgmVolume = 1;
seVolume = 1;
keyType = 0;
totalScore = 0;
playCount = 0;
eaten_array = [0, 0, 0, 0, 0, 0];
clear_array = [];
noMiss_array = [];
noEat_array = [];
hiSurvivalScore = 0;
survivalClear = 0;
mapMax = -1;
makeStarArray();
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;
bgmLoopTime_array[1] = 0;
bgmLoopTime_array[2] = 0;
seList = new Dictionary();
playSeNo = -1;
sndTr = new SoundTransform();
sndCh = new SoundChannel();
sndTr.volume = (seVolume * 0.2);
sndCh.soundTransform = sndTr;
loadSound();
contextInit();
so = SharedObject.getLocal("chal2");
soInit();
mapXmlLoader = new URLLoader();
mapXmlLoader.addEventListener(Event.COMPLETE, xCompleteMap);
mapXmlLoader.load(new URLRequest(XML_MAP));
}
function frame6(){
stop();
gotoAndStop("game");
}
function frame7(){
stop();
playerSpeed = 1;
waitFlag = true;
gameOverFlag = false;
stageClearFlag = false;
continueFlag = false;
deleteFlag = false;
counter = 0;
messageCounter = 0;
messageStr = "";
clearPoint = 0;
chalMode = 0;
chalCount = 0;
autoFlag = false;
dashNo = -1;
dashCount = 0;
madokaDead = false;
rate = 1;
rateCount = 0;
rateTarget = 0;
rateColor = 1;
rateColor_array = [0, 0x990000, 0xAAAA00, 0x3300, 153, 0x660099, 267650048, 16777024, 4259648, 4210943, 15220991, 0xFFFFFF];
rate_array = [1, 1, 2, 4, 8, 16, 32, 64, 128, 0x0100, 0x0200, 0x0400, 0x0800];
rateSprite = new Sprite();
g = rateSprite.graphics;
rateSprite.x = 53;
rateSprite.y = 220;
rateSprite.rotation = -73;
rateSprite2 = new Sprite();
g2 = rateSprite2.graphics;
rateSprite2.x = 53;
rateSprite2.y = 220;
rateSprite2.rotation = -73;
addChildAt(rateSprite, getChildIndex(rate_mc));
addChildAt(rateSprite2, getChildIndex(rateSprite));
addPie(25, 45, 0, 0.7);
balloonCount = 0;
keysDown = [];
moveKey = 3;
faceKey = 0;
map_array = [];
obj_array = [];
mc_array = [];
block_array = [];
objCount = 0;
massCount = 0;
route = [];
playerX = 8;
playerY = 8;
warp_array = [];
warp_array[0] = [];
warp_array[1] = [];
warp0Flag = false;
map_array = mapData_array[stageNo];
obj_array = objData_array[stageNo];
clearPoint = clearPoint_array[stageNo];
clearPoint_txt.text = ((nowPoint + "/") + clearPoint);
makeMap();
createRoot();
MAX = route.length;
allClearFlag = false;
ready_mc.stage_txt.text = (("Stage " + (stageNo + 1)) + " Ready?");
stageNo_txt.text = ("" + (stageNo + 1));
gameOver_mc.visible = false;
stageClear_mc.visible = false;
stageClear_mc.newRecord_mc.visible = false;
balloon_mc.alpha = 0;
chalGage_mc.visible = false;
score_txt.text = ("" + score);
chara_mc.tail0_mc.visible = false;
chara_mc.tail1_mc.visible = false;
tail_array = [new Point(-10, -10), new Point(-10, -10), new Point(-10, -10), new Point(-10, -10), new Point(-10, -10)];
mc_array.push(chara_mc.tail0_mc);
mc_array.push(chara_mc.tail1_mc);
tail0 = new Point(0, 0);
tail1 = new Point(0, 0);
bgmTr.volume = 0;
bgmCh.soundTransform = bgmTr;
playCount++;
so.data.playCount++;
if (playBgmNo != 0){
stopBgm();
playBgmLoop(0);
};
if (gameMode == 1){
scoreTitle_txt.text = "hi score";
gameOver_mc.suv_mc.visible = false;
gameOver_mc.normalBtns_mc.visible = true;
gameOver_mc.survivalBtns_mc.visible = false;
stageClear_mc.totalScoreTitle_txt.text = "total score";
stageClear_mc.suvBtns_mc.visible = false;
stageClear_mc.normalBtns_mc.visible = true;
hiScore_txt.text = hiScore_array[stageNo];
wait_mc.survivalBtns_mc.visible = false;
} else {
scoreTitle_txt.text = "survival score";
gameOver_mc.suv_mc.visible = true;
gameOver_mc.normalBtns_mc.visible = false;
gameOver_mc.survivalBtns_mc.visible = true;
stageClear_mc.totalScoreTitle_txt.text = "survival score";
stageClear_mc.suvBtns_mc.visible = true;
stageClear_mc.normalBtns_mc.visible = false;
hiScore_txt.text = ("" + survivalScore);
wait_mc.normalBtns_mc.visible = false;
};
wait_mc.visible = false;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeInGame);
}
function frame8(){
stop();
if (allClearFlag == true){
clearBm_mc.visible = false;
};
clear_mc.gotoAndStop(("no" + gameMode));
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeInClear);
}
function frame2(){
stop();
XML_RANKING = "xml418501/ranking.xml";
XML_TOTAL = "xml418501/totalRanking.xml";
XML_SURVIVAL = "xml418501/survivalRanking.xml";
if (testFlag == false){
XML_RANKING = ("xml418501/ranking.xml?" + new Date().getTime());
XML_TOTAL = ("xml418501/totalRanking.xml?" + new Date().getTime());
XML_SURVIVAL = ("xml418501/survivalRanking.xml?" + new Date().getTime());
};
rankingScore_array = [];
rankingLastScore_array = [];
totalScore_array = [];
totalLastScore = 0;
survivalScore_array = [];
survivalLastScore = 0;
rankingXmlLoader = new URLLoader();
rankingXmlLoader.addEventListener(Event.COMPLETE, xCompleteRanking);
rankingXmlLoader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
rankingXmlLoader.load(new URLRequest(XML_RANKING));
}
function frame3(){
stop();
inputName_mc.name_txt.restrict = "a-z0-9_!.";
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeInputName);
}
function frame5(){
stop();
score = 0;
scoreTarget = 0;
gotItem_array = [];
nowPoint = 0;
missFlag = false;
noEatFlag = true;
gotoAndStop("game");
}
public function hitBlockCheck(_arg1:int, _arg2:int):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
_local3 = playerX;
_local4 = (playerX + 8);
_local5 = playerY;
_local6 = (playerY + 8);
_local7 = getXfromTile(_arg1);
_local8 = (getXfromTile(_arg1) + 8);
_local9 = getYfromTile(_arg1);
_local10 = (getYfromTile(_arg1) + 8);
if ((((((((_local3 < _local8)) && ((_local4 > _local7)))) && ((_local5 < _local10)))) && ((_local6 > _local9)))){
_local11 = 0;
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = (_local4 - _local7);
_local16 = (_local8 - _local3);
if (_local15 < _local16){
_local11 = _local15;
_local13 = -1;
} else {
_local11 = _local16;
_local13 = 1;
};
_local17 = (_local6 - _local9);
_local18 = (_local10 - _local5);
if (_local17 < _local18){
_local12 = _local17;
_local14 = -1;
} else {
_local12 = _local18;
_local14 = 1;
};
if (_local11 < _local12){
playerX = (playerX + (_local13 * _local11));
if (_local12 <= 6){
playerY = (playerY + (_local14 * playerSpeed));
};
} else {
if (_local11 <= 6){
playerX = (playerX + (_local13 * playerSpeed));
};
playerY = (playerY + (_local14 * _local12));
};
dashNo = -1;
};
}
function frame4(){
inputName_mc.name_txt.restrict = "a-z0-9_!.";
survivalScore = 0;
stopBgm();
bgmPosition = 0;
bgmPosition = 0;
menuNo = 0;
cursorNo = 0;
rankingPage = 0;
rankingMode = 1;
cursor_array = [];
cursor_array[0] = [170, 190, 210];
cursor_array[2] = [150, 170, 190, 210, 230];
keysDownTitle = [];
rightKeyCount = 0;
leftKeyCount = 0;
upKeyCount = 0;
downKeyCount = 0;
miniBlock_array = [];
option_mc.visible = false;
stageSelect_mc.visible = false;
inputName_mc.visible = false;
keySample_mc.visible = false;
makePreviewMap();
updateVolume();
updateKeyConfig();
getTotalScore();
stageSelect_mc.totalScore_txt.text = totalScore;
stageSelect_mc.star0_mc.visible = false;
stageSelect_mc.star1_mc.visible = false;
stageSelect_mc.star2_mc.visible = false;
if (gameMode == 1){
cursorNo = 0;
menuNo = 1;
title_mc.alpha = 0;
cursor_mc.alpha = 0;
updateStageSelect();
stageSelect_mc.visible = true;
cursor_mc.y = cursor_array[0][0];
} else {
if (clearStage == 0){
stageNo = 0;
} else {
stageNo = -1;
};
};
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeInTitle);
}
public function xFadeGameToClear(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.1);
bgmTr.volume = (bgmTr.volume - (bgmVolume * 0.01));
bgmCh.soundTransform = bgmTr;
if (blackMask_mc.alpha >= 1){
bgmTr.volume = 0;
bgmCh.soundTransform = bgmTr;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeGameToClear);
deleteFlag = true;
addEventListener(Event.ENTER_FRAME, xWaitDeleteObjectClear);
};
}
public function makeMap():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:MovieClip;
var _local5:MovieClip;
var _local6:MovieClip;
var _local7:MovieClip;
var _local8:MovieClip;
_local1 = 0;
while (_local1 < 300) {
_local2 = (_local1 % MASS_WIDTH_MAX);
_local3 = Math.floor((_local1 / MASS_WIDTH_MAX));
if (map_array[_local1] == 0){
createBlock(_local2, _local3, 0);
} else {
if (map_array[_local1] == 1){
createBlock(_local2, _local3, 1);
};
};
if (obj_array[_local1] == 1){
playerX = ((_local1 % MASS_WIDTH_MAX) * 8);
playerY = (Math.floor((_local1 / MASS_WIDTH_MAX)) * 8);
chara_mc.player_mc.anime_mc.gotoAndStop(((("move" + chalMode) + "_") + 3));
mc_array.push(chara_mc.player_mc);
};
if ((((((((((obj_array[_local1] == 2)) || ((obj_array[_local1] == 3)))) || ((obj_array[_local1] == 4)))) || ((obj_array[_local1] == 5)))) || ((obj_array[_local1] == 8)))){
if (obj_array[_local1] == 2){
_local4 = new ENEMY0_MC();
} else {
if (obj_array[_local1] == 3){
_local4 = new ENEMY1_MC();
} else {
if (obj_array[_local1] == 4){
_local4 = new ENEMY2_MC();
} else {
if (obj_array[_local1] == 5){
_local4 = new ENEMY3_MC();
} else {
if (obj_array[_local1] == 8){
_local4 = new ENEMY4_MC();
};
};
};
};
};
_local4.charaX = ((_local1 % MASS_WIDTH_MAX) * 8);
_local4.charaY = (Math.floor((_local1 / MASS_WIDTH_MAX)) * 8);
_local4.startX = ((_local1 % MASS_WIDTH_MAX) * 8);
_local4.startY = (Math.floor((_local1 / MASS_WIDTH_MAX)) * 8);
_local4.x = getQX(_local4.charaX, _local4.charaY);
_local4.y = getQY(_local4.charaX, _local4.charaY);
objCount++;
chara_mc.addChild(_local4);
mc_array.push(_local4);
};
if ((((obj_array[_local1] == 6)) && (!((gotItem_array[_local1] == 1))))){
_local5 = new ITEM0_MC();
_local5.charaX = ((_local1 % MASS_WIDTH_MAX) * 8);
_local5.charaY = (Math.floor((_local1 / MASS_WIDTH_MAX)) * 8);
_local5.x = getQX(_local5.charaX, _local5.charaY);
_local5.y = getQY(_local5.charaX, _local5.charaY);
objCount++;
itemStage_mc.addChild(_local5);
_local5.massNo = _local1;
};
if ((((obj_array[_local1] == 7)) && (!((gotItem_array[_local1] == 1))))){
_local6 = new ITEM1_MC();
_local6.charaX = ((_local1 % MASS_WIDTH_MAX) * 8);
_local6.charaY = (Math.floor((_local1 / MASS_WIDTH_MAX)) * 8);
_local6.x = getQX(_local6.charaX, _local6.charaY);
_local6.y = getQY(_local6.charaX, _local6.charaY);
objCount++;
itemStage_mc.addChild(_local6);
_local6.massNo = _local1;
};
if (obj_array[_local1] == 9){
_local7 = new WARP0_MC();
_local7.charaX = ((_local1 % MASS_WIDTH_MAX) * 8);
_local7.charaY = (Math.floor((_local1 / MASS_WIDTH_MAX)) * 8);
_local7.x = getQX(_local7.charaX, _local7.charaY);
_local7.y = getQY(_local7.charaX, _local7.charaY);
objCount++;
itemStage_mc.addChild(_local7);
_local7.massNo = _local1;
warp_array[0].push(_local1);
};
if ((((((((obj_array[_local1] == 12)) || ((obj_array[_local1] == 13)))) || ((obj_array[_local1] == 14)))) || ((obj_array[_local1] == 15)))){
_local8 = new DASH_MC();
_local8.charaX = ((_local1 % MASS_WIDTH_MAX) * 8);
_local8.charaY = (Math.floor((_local1 / MASS_WIDTH_MAX)) * 8);
_local8.x = getQX(_local8.charaX, _local8.charaY);
_local8.y = getQY(_local8.charaX, _local8.charaY);
objCount++;
itemStage_mc.addChild(_local8);
_local8.massNo = _local1;
_local8.dashNo = (obj_array[_local1] - 12);
};
_local1++;
};
chara_mc.setChildIndex(chara_mc.player_mc, (chara_mc.numChildren - 1));
chara_mc.player_mc.x = getQX(playerX, playerY);
chara_mc.player_mc.y = getQY(playerX, playerY);
}
public function dashCheck():void{
if (keyType == 2){
if ((((keysDown[37] == true)) && ((keysDown[38] == true)))){
if (dashNo != 0){
dashNo = -1;
};
} else {
if ((((keysDown[39] == true)) && ((keysDown[40] == true)))){
if (dashNo != 1){
dashNo = -1;
};
} else {
if ((((keysDown[38] == true)) && ((keysDown[39] == true)))){
if (dashNo != 2){
dashNo = -1;
};
} else {
if ((((keysDown[37] == true)) && ((keysDown[40] == true)))){
if (dashNo != 3){
dashNo = -1;
};
};
};
};
};
} else {
if (((!((dashNo == -1))) && ((dashCount == 0)))){
if (keysDown[keyConfig[keyType][0]] == true){
if (dashNo != 0){
dashNo = -1;
};
} else {
if (keysDown[keyConfig[keyType][1]] == true){
if (dashNo != 1){
dashNo = -1;
};
} else {
if (keysDown[keyConfig[keyType][2]] == true){
if (dashNo != 2){
dashNo = -1;
};
} else {
if (keysDown[keyConfig[keyType][3]] == true){
if (dashNo != 3){
dashNo = -1;
};
};
};
};
};
};
};
if (dashNo == 0){
playerX = (playerX - 4);
} else {
if (dashNo == 1){
playerX = (playerX + 4);
} else {
if (dashNo == 2){
playerY = (playerY - 4);
} else {
if (dashNo == 3){
playerY = (playerY + 4);
};
};
};
};
if (((!((dashNo == -1))) && (!((moveKey == dashNo))))){
moveKey = dashNo;
faceKey = dashNo;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
dashCount--;
if (dashCount <= 0){
dashCount = 0;
};
}
public function xFadeGameToTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.1);
bgmTr.volume = (bgmTr.volume - (bgmVolume * 0.01));
bgmCh.soundTransform = bgmTr;
if (blackMask_mc.alpha >= 1){
bgmTr.volume = 0;
bgmCh.soundTransform = bgmTr;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeGameToTitle);
deleteFlag = true;
addEventListener(Event.ENTER_FRAME, xWaitDeleteObjectTitle);
};
}
public function playSe(_arg1:int){
seList[_arg1].play(0, 1, sndTr);
}
public function xFadeGameClear(_arg1:Event):void{
if (counter >= 30){
stageClear_mc.alpha = (stageClear_mc.alpha + 0.1);
if (stageClear_mc.alpha >= 1){
counter = 0;
stageClear_mc.alpha = 1;
stageClearFlag = true;
stageClear_mc.removeEventListener(Event.ENTER_FRAME, xFadeGameClear);
updateEatenCount();
};
} else {
counter++;
};
}
public function registSurvival(_arg1:String, _arg2:int, _arg3:int):void{
var url:URLRequest;
var playerNo:int;
var variables:URLVariables;
var loader:URLLoader;
var nameStr = _arg1;
var scoreInt = _arg2;
var stageNoInt = _arg3;
url = new URLRequest(PHP_SURVIVAL);
playerNo = 0;
variables = new URLVariables();
variables.name = nameStr;
variables.score = scoreInt;
variables.player = playerNo;
variables.stageNo = stageNoInt;
url.data = variables.toString();
url.method = URLRequestMethod.POST;
loader = new URLLoader();
try {
loader.load(url);
} catch(e:Error) {
};
url = null;
loader = null;
}
public function makeStarArray():void{
var _local1:*;
_local1 = 0;
while (_local1 < 100) {
clear_array[_local1] = 0;
noMiss_array[_local1] = 0;
noEat_array[_local1] = 0;
_local1++;
};
}
public function createMiniBlock(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:MovieClip;
if (_arg3 == 0){
_local4 = new MINIMASS0_MC();
} else {
if (_arg3 == 1){
_local4 = new MINIMASS1_MC();
};
};
_local4.x = ((105 + (_arg1 * 8)) - (_arg2 * 8));
_local4.y = ((0 + (4 * _arg1)) + (4 * _arg2));
miniBlock_array.push(_local4);
stageSelect_mc.previewMap_mc.addChild(_local4);
}
public function createBlock(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:MovieClip;
if (_arg3 == 0){
_local4 = new MASS0_MC();
if ((((((((((((((((((((stageNo == 4)) || ((stageNo == 9)))) || ((stageNo == 14)))) || ((stageNo == 19)))) || ((stageNo == 24)))) || ((stageNo == 29)))) || ((stageNo == 34)))) || ((stageNo == 39)))) || ((stageNo == 44)))) || ((stageNo == 49)))){
_local4.gotoAndStop(("no" + stageNo));
};
_local4.x = ((MASS_CENTERX + (_arg1 * 16)) - (_arg2 * 16));
_local4.y = ((MASS_CENTERY + (8 * _arg1)) + (8 * _arg2));
block_array.push(_local4);
stage_mc.addChild(_local4);
} else {
if (_arg3 == 1){
};
};
}
public function xEnterTitle(_arg1:Event):void{
if (menuNo == 1){
if (keysDownTitle[Keyboard.LEFT] == true){
leftKeyCount++;
if (leftKeyCount >= 10){
if ((leftKeyCount % 2) == 0){
if (stageNo > -1){
rankingPage = 0;
stageNo--;
};
updateStageSelect();
playSe(2);
};
};
} else {
if (keysDownTitle[Keyboard.RIGHT] == true){
rightKeyCount++;
if (rightKeyCount >= 10){
if ((rightKeyCount % 2) == 0){
if (stageNo < clearStage){
rankingPage = 0;
stageNo++;
};
if (stageNo >= mapData_array.length){
stageNo = (mapData_array.length - 1);
};
updateStageSelect();
playSe(2);
};
};
} else {
if (keysDownTitle[Keyboard.UP] == true){
upKeyCount++;
if (upKeyCount >= 5){
if ((upKeyCount % 3) == 0){
rankingPage--;
if (rankingPage < 0){
rankingPage = 0;
};
updateStageSelect();
playSe(2);
};
};
} else {
if (keysDownTitle[Keyboard.DOWN] == true){
downKeyCount++;
if (downKeyCount >= 5){
if ((downKeyCount % 3) == 0){
rankingPage++;
if (rankingPage > 9){
rankingPage = 9;
};
updateStageSelect();
playSe(2);
};
};
};
};
};
};
};
}
public function xFadeInputName(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha - 0.1);
if (blackMask_mc.alpha < 0){
blackMask_mc.alpha = 0;
blackMask_mc.visible = false;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeInputName);
stage.focus = inputName_mc.name_txt;
inputName_mc.ok_btn.addEventListener(MouseEvent.CLICK, xClickInputNameOk);
};
}
public function xFadeGameToRetry(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.1);
bgmTr.volume = (bgmTr.volume - (bgmVolume * 0.01));
bgmCh.soundTransform = bgmTr;
if (blackMask_mc.alpha >= 1){
bgmTr.volume = 0;
bgmCh.soundTransform = bgmTr;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeGameToRetry);
deleteFlag = true;
addEventListener(Event.ENTER_FRAME, xWaitDeleteObjectRetry);
};
}
public function updateHiScore(_arg1:int, _arg2:int):void{
if (hiScore_array[_arg1] < _arg2){
hiScore_array[_arg1] = _arg2;
so.data.hiScore_array[_arg1] = _arg2;
stageClear_mc.newRecord_mc.visible = true;
if (rankingLastScore_array[_arg1] < _arg2){
registHiscore(scoreName, _arg2, _arg1);
};
getTotalScore();
if (totalScore > totalLastScore){
registTotal(scoreName, totalScore);
};
};
}
public function updateStageSelect():void{
var _local1:*;
var _local2:Boolean;
var _local3:Boolean;
var _local4:String;
if (stageNo != -1){
stageSelect_mc.stageNo_txt.text = ("STAGE " + (stageNo + 1));
stageSelect_mc.ranking_mc.rankingTitle_txt.text = "stage ranking";
stageSelect_mc.infoZ_txt.text = "[Z] stage start!";
stageSelect_mc.scoreTitle_txt.text = "hi score";
stageSelect_mc.total_mc.clearStage_txt.textColor = 0xFFFFFF;
stageSelect_mc.next_mc.visible = true;
stageSelect_mc.prev_mc.visible = true;
if (stageNo == clearStage){
stageSelect_mc.next_mc.visible = false;
};
updatePreviewMap();
stageSelect_mc.previewMap_mc.visible = true;
stageSelect_mc.total_mc.visible = false;
stageSelect_mc.hiScore_txt.text = hiScore_array[stageNo];
if (clear_array[stageNo] == 1){
stageSelect_mc.star0_mc.visible = true;
} else {
stageSelect_mc.star0_mc.visible = false;
};
if (noMiss_array[stageNo] == 1){
stageSelect_mc.star1_mc.visible = true;
} else {
stageSelect_mc.star1_mc.visible = false;
};
if (noEat_array[stageNo] == 1){
stageSelect_mc.star2_mc.visible = true;
} else {
stageSelect_mc.star2_mc.visible = false;
};
_local1 = 0;
while (_local1 < 10) {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].rank_txt.text = (((rankingPage * 10) + _local1) + 1);
if (rankingScore_array[stageNo][((rankingPage * 10) + _local1)] != null){
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = rankingScore_array[stageNo][((rankingPage * 10) + _local1)].name;
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = rankingScore_array[stageNo][((rankingPage * 10) + _local1)].score;
if (scoreName == rankingScore_array[stageNo][((rankingPage * 10) + _local1)].name){
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFF0000;
} else {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFFFFFF;
};
} else {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = " -";
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = "-";
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFFFFFF;
};
_local1++;
};
} else {
stageSelect_mc.stageNo_txt.text = "TOTAL";
stageSelect_mc.prev_mc.visible = false;
stageSelect_mc.infoZ_txt.text = "[Z] ranking change";
stageSelect_mc.previewMap_mc.visible = false;
stageSelect_mc.total_mc.visible = true;
_local2 = true;
_local3 = true;
_local1 = 0;
while (_local1 < mapData_array.length) {
if (noMiss_array[_local1] == 0){
_local2 = false;
};
if (noEat_array[_local1] == 0){
_local3 = false;
};
_local1++;
};
if (_local3 == true){
stageSelect_mc.total_mc.clearStage_txt.textColor = 0xFF0000;
} else {
if (_local2 == true){
stageSelect_mc.total_mc.clearStage_txt.textColor = 0xFF;
} else {
stageSelect_mc.total_mc.clearStage_txt.textColor = 0xFFFFFF;
};
};
stageSelect_mc.scoreTitle_txt.text = "survival score";
stageSelect_mc.hiScore_txt.text = ("" + hiSurvivalScore);
stageSelect_mc.total_mc.clearStage_txt.text = ("" + clearStage);
stageSelect_mc.total_mc.survivalClear_txt.text = ("" + survivalClear);
stageSelect_mc.total_mc.playCount_txt.text = ("" + playCount);
stageSelect_mc.total_mc.mami_txt.text = ("×" + eaten_array[0]);
stageSelect_mc.total_mc.homura_txt.text = ("×" + eaten_array[1]);
stageSelect_mc.total_mc.sayaka_txt.text = ("×" + eaten_array[2]);
stageSelect_mc.total_mc.madoka_txt.text = ("×" + eaten_array[3]);
stageSelect_mc.total_mc.kyoko_txt.text = ("×" + eaten_array[4]);
stageSelect_mc.total_mc.sweets_txt.text = ("×" + eaten_array[5]);
stageSelect_mc.star0_mc.visible = false;
stageSelect_mc.star1_mc.visible = false;
stageSelect_mc.star2_mc.visible = false;
if (rankingMode == MODE_NORMAL){
stageSelect_mc.ranking_mc.rankingTitle_txt.text = "total ranking";
_local1 = 0;
while (_local1 < 10) {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].rank_txt.text = (((rankingPage * 10) + _local1) + 1);
if (totalScore_array[((rankingPage * 10) + _local1)] != null){
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = totalScore_array[((rankingPage * 10) + _local1)].name;
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = totalScore_array[((rankingPage * 10) + _local1)].score;
if (scoreName == totalScore_array[((rankingPage * 10) + _local1)].name){
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFF0000;
} else {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFFFFFF;
};
} else {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = " -";
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = "-";
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFFFFFF;
};
_local1++;
};
} else {
stageSelect_mc.ranking_mc.rankingTitle_txt.text = "survival ranking";
_local1 = 0;
while (_local1 < 10) {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].rank_txt.text = (((rankingPage * 10) + _local1) + 1);
if (survivalScore_array[((rankingPage * 10) + _local1)] != null){
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = survivalScore_array[((rankingPage * 10) + _local1)].name;
_local4 = "";
if (survivalScore_array[((rankingPage * 10) + _local1)].stageNo < 10){
_local4 = "0";
};
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = (((survivalScore_array[((rankingPage * 10) + _local1)].score + " / ") + _local4) + survivalScore_array[((rankingPage * 10) + _local1)].stageNo);
if (scoreName == survivalScore_array[((rankingPage * 10) + _local1)].name){
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFF0000;
} else {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFFFFFF;
};
} else {
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.text = " -";
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].score_txt.text = "-";
stageSelect_mc.ranking_mc[(("list" + _local1) + "_mc")].name_txt.textColor = 0xFFFFFF;
};
_local1++;
};
};
};
}
public function xFadeLoadToTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.1);
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:*;
var _local6:Array;
var _local7:*;
_local2 = new XML(rankingXmlLoader.data);
_local3 = _local2.ranking;
_local4 = [];
_local5 = 0;
while (_local5 < mapData_array.length) {
_local4[_local5] = [];
_local5++;
};
for each (_local2 in _local3) {
_local4[int(_local2.stage)].push({name:_local2.name, score:_local2.score});
};
_local5 = 0;
while (_local5 < mapData_array.length) {
_local4[_local5].sortOn(["score"], [(Array.DESCENDING | Array.NUMERIC)]);
rankingScore_array[_local5] = [];
_local6 = [];
_local7 = 0;
while ((((rankingScore_array[_local5].length < 100)) && ((_local7 < _local4[_local5].length)))) {
if (_local6.indexOf(_local4[_local5][_local7].name.toString()) == -1){
rankingScore_array[_local5].push(_local4[_local5][_local7]);
_local6.push(_local4[_local5][_local7].name.toString());
};
_local7++;
};
if (rankingScore_array[_local5][99] != null){
rankingLastScore_array[_local5] = rankingScore_array[_local5][99].score;
} else {
rankingLastScore_array[_local5] = 0;
};
_local5++;
};
_local4 = null;
_local6 = null;
rankingXmlLoader.removeEventListener(Event.COMPLETE, xCompleteRanking);
rankingXmlLoader.addEventListener(Event.COMPLETE, xCompleteTotal);
rankingXmlLoader.load(new URLRequest(XML_TOTAL));
}
public function xWaitDeleteObjectTitle(_arg1:Event):void{
var _local2:MovieClip;
if (objCount == 0){
while (block_array.length > 0) {
_local2 = block_array.pop();
stage_mc.removeChild(_local2);
_local2 = null;
};
removeChild(rateSprite);
removeChild(rateSprite2);
removeEventListener(Event.ENTER_FRAME, xWaitDeleteObjectTitle);
gotoAndStop("title");
};
}
public function xWaitDeleteObjectClear(_arg1:Event):void{
var _local2:MovieClip;
if (objCount == 0){
while (block_array.length > 0) {
_local2 = block_array.pop();
stage_mc.removeChild(_local2);
_local2 = null;
};
removeChild(rateSprite);
removeChild(rateSprite2);
removeEventListener(Event.ENTER_FRAME, xWaitDeleteObjectClear);
gotoAndStop("allClear");
};
}
public function makePreviewMap():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = mapData_array[stageNo];
_local2 = 0;
while (_local2 < 300) {
_local3 = (_local2 % MASS_WIDTH_MAX);
_local4 = Math.floor((_local2 / MASS_WIDTH_MAX));
if (_local1[_local2] == 0){
createMiniBlock(_local3, _local4, 0);
} else {
if (_local1[_local2] == 1){
createMiniBlock(_local3, _local4, 1);
};
};
_local2++;
};
}
public function addPie(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
Pie(_arg1, _arg2, 0, _arg3, 6710988, 1);
}
public function updateEatenCount():void{
so.data.eaten_array = eaten_array.slice();
}
public function updateVolume():void{
option_mc.bgmVolume_txt.text = bgmVolume.toString();
option_mc.seVolume_txt.text = seVolume.toString();
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 xStageSelectFadeIn(_arg1:Event):void{
stageSelect_mc.alpha = (stageSelect_mc.alpha + 0.2);
title_mc.alpha = (title_mc.alpha - 0.2);
cursor_mc.alpha = (cursor_mc.alpha - 0.2);
mitume_btn.alpha = (mitume_btn.alpha - 0.2);
if (stageSelect_mc.alpha >= 1){
stageSelect_mc.alpha = 1;
title_mc.alpha = 0;
cursor_mc.alpha = 0;
removeEventListener(Event.ENTER_FRAME, xStageSelectFadeIn);
addTitleEvent();
};
}
public function stopBgm(){
bgmPosition = (bgmCh.position + 0);
if (89142 <= bgmPosition){
bgmPosition = 0;
};
bgmCh.removeEventListener(Event.SOUND_COMPLETE, gameBgmComplete);
bgmCh.stop();
playBgmNo = -1;
}
public function registTotal(_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_TOTAL);
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 xWaitDeleteObjectRetry(_arg1:Event):void{
var _local2:MovieClip;
if (objCount == 0){
while (block_array.length > 0) {
_local2 = block_array.pop();
stage_mc.removeChild(_local2);
_local2 = null;
};
removeChild(rateSprite);
removeChild(rateSprite2);
removeEventListener(Event.ENTER_FRAME, xWaitDeleteObjectRetry);
if (stageClearFlag == true){
if (continueFlag == true){
gotoAndStop("nextStage");
} else {
gotoAndStop("nextStage");
};
} else {
if (continueFlag == true){
scoreTarget = Math.floor((scoreTarget / 2));
score = scoreTarget;
missFlag = true;
gotoAndStop("retry");
} else {
gotoAndStop("nextStage");
};
};
};
}
public function Pie(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:uint=0, _arg6:Number=1){
g.clear();
g.beginFill(rateColor_array[rateColor], _arg6);
GraphicsLib.drawPie(g, 0, 0, _arg1, _arg3, _arg4, false);
GraphicsLib.drawPie(g, 0, 0, _arg2, _arg4, _arg3, true);
g.endFill();
g2.clear();
g2.beginFill(rateColor_array[(rateColor - 1)], _arg6);
GraphicsLib.drawPie(g2, 0, 0, 25, _arg3, -5, false);
GraphicsLib.drawPie(g2, 0, 0, 45, -5, _arg3, true);
g2.endFill();
}
public function soInit():void{
var _local1:*;
if (so.size == 0){
so.data.scoreName = "";
so.data.hiScore_array = [];
so.data.noMiss_array = [];
so.data.noEat_array = [];
so.data.clear_array = [];
_local1 = 0;
while (_local1 < 100) {
so.data.hiScore_array[_local1] = 0;
so.data.noMiss_array[_local1] = 0;
so.data.noEat_array[_local1] = 0;
so.data.clear_array[_local1] = 0;
_local1++;
};
so.data.bgmVolume = 1;
so.data.seVolume = 1;
so.data.keyType = 0;
so.data.clearStage = 0;
so.data.playCount = 0;
so.data.eaten_array = [0, 0, 0, 0, 0, 0];
so.data.hiSurvivalScore = 0;
so.data.survivalClear = 0;
} else {
if (so.data.scoreName != null){
scoreName = so.data.scoreName;
};
if (so.data.hiScore_array != null){
hiScore_array = so.data.hiScore_array.slice();
};
if (so.data.bgmVolume != null){
bgmVolume = so.data.bgmVolume;
};
if (so.data.seVolume != null){
seVolume = so.data.seVolume;
};
if (so.data.keyType != null){
keyType = so.data.keyType;
};
if (so.data.clearStage != null){
clearStage = so.data.clearStage;
};
if (so.data.playCount != null){
playCount = so.data.playCount;
};
if (so.data.eaten_array != null){
eaten_array = so.data.eaten_array.slice();
};
if (so.data.clear_array != null){
clear_array = so.data.clear_array.slice();
};
if (so.data.noMiss_array != null){
noMiss_array = so.data.noMiss_array.slice();
};
if (so.data.noEat_array != null){
noEat_array = so.data.noEat_array.slice();
};
if (so.data.hiSurvivalScore != null){
hiSurvivalScore = so.data.hiSurvivalScore;
};
if (so.data.survivalClear != null){
survivalClear = so.data.survivalClear;
};
};
}
public function removeGameEvent():void{
removeEventListener(Event.ENTER_FRAME, xEnterMain);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, xKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, xKeyUp);
}
public function getTotalScore():void{
var _local1:int;
var _local2:*;
_local1 = 0;
_local2 = 0;
while (_local2 < mapData_array.length) {
_local1 = (_local1 + hiScore_array[_local2]);
_local2++;
};
totalScore = _local1;
}
public function playBgmLoop(_arg1){
playBgmNo = _arg1;
bgmCh = bgmList[_arg1].play(bgmPosition, 1, bgmTr);
bgmCh.addEventListener(Event.SOUND_COMPLETE, gameBgmComplete);
}
public function xFadeTitleToGame(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.1);
if (blackMask_mc.alpha >= 1){
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeTitleToGame);
removeMiniBlock();
gotoAndStop("nextStage");
};
}
public function xCompleteMap(_arg1:Event):void{
var _local2:XML;
var _local3:XMLList;
var _local4:Array;
var _local5:*;
var _local6:String;
var _local7:String;
_local2 = new XML(mapXmlLoader.data);
_local3 = _local2.map;
_local4 = [];
for each (_local2 in _local3) {
_local6 = _local2.chip;
_local7 = _local2.chara;
mapMax++;
mapData_array[mapMax] = _local6.split(",");
objData_array[mapMax] = _local7.split(",");
clearPoint_array[mapMax] = _local2.clearPoint;
};
_local5 = 0;
while (_local5 < mapData_array.length) {
hiScore_array.push(0);
_local5++;
};
mapXmlLoader.removeEventListener(Event.COMPLETE, xCompleteMap);
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeLoadToTitle);
}
public function registHiscore(_arg1:String, _arg2:int, _arg3:int):void{
var url:URLRequest;
var playerNo:int;
var variables:URLVariables;
var loader:URLLoader;
var nameStr = _arg1;
var scoreInt = _arg2;
var stageNoInt = _arg3;
url = new URLRequest(PHP_RANKING);
playerNo = 0;
variables = new URLVariables();
variables.name = nameStr;
variables.score = scoreInt;
variables.player = playerNo;
variables.stageNo = stageNoInt;
url.data = variables.toString();
url.method = URLRequestMethod.POST;
loader = new URLLoader();
try {
loader.load(url);
} catch(e:Error) {
};
url = null;
loader = null;
}
public function stageClear():void{
var _local1:int;
var _local2:int;
nowPoint++;
clearPoint_txt.text = ((nowPoint + "/") + clearPoint);
if ((((((nowPoint == clearPoint)) && ((gameOverFlag == false)))) && ((stageClearFlag == false)))){
score = scoreTarget;
score_txt.text = ("" + score);
addMessage("stage clear!");
updateHiScore(stageNo, score);
stageClear_mc.score_txt.text = ("" + score);
stageClear_mc.totalScore_txt.text = ("" + totalScore);
if (gameMode == MODE_SURVIVAL){
survivalScore = (survivalScore + score);
stageClear_mc.totalScore_txt.text = ("" + survivalScore);
};
_local1 = (stageNo + 1);
if (_local1 < (mapData_array.length + 1)){
if (clearStage < _local1){
clearStage = _local1;
so.data.clearStage = clearStage;
};
if (gameMode == MODE_SURVIVAL){
if (survivalClear < _local1){
survivalClear = _local1;
so.data.survivalClear = _local1;
};
};
};
if (_local1 >= mapData_array.length){
allClearFlag = true;
if (gameMode == MODE_SURVIVAL){
_local2 = survivalScore;
if (_local2 > hiSurvivalScore){
hiSurvivalScore = _local2;
so.data.hiSurvivalScore = _local2;
registSurvival(scoreName, hiSurvivalScore, 50);
};
};
};
clear_array[stageNo] = 1;
so.data.clear_array[stageNo] = 1;
if (missFlag == false){
noMiss_array[stageNo] = 1;
so.data.noMiss_array[stageNo] = 1;
};
if ((((noEatFlag == true)) && ((missFlag == false)))){
noEat_array[stageNo] = 1;
so.data.noEat_array[stageNo] = 1;
};
waitFlag = true;
stageClear_mc.alpha = 0;
stageClear_mc.visible = true;
stageClear_mc.addEventListener(Event.ENTER_FRAME, xFadeGameClear);
};
}
public function updatePreviewMap():void{
removeMiniBlock();
makePreviewMap();
}
public function addGameEvent():void{
addEventListener(Event.ENTER_FRAME, xEnterMain);
stage.addEventListener(KeyboardEvent.KEY_DOWN, xKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, xKeyUp);
}
public function getYfromTile(_arg1:int):int{
return ((Math.floor((_arg1 / MASS_WIDTH_MAX)) * 8));
}
public function removeMiniBlock():void{
var _local1:MovieClip;
while (miniBlock_array.length > 0) {
_local1 = miniBlock_array.pop();
stageSelect_mc.previewMap_mc.removeChild(_local1);
_local1 = null;
};
}
public function charaIndexChange():void{
var _local1:*;
mc_array.sortOn("y", (Array.NUMERIC | Array.DESCENDING));
_local1 = 0;
while (_local1 < mc_array.length) {
if (mc_array[_local1].deleteFlag == false){
chara_mc.setChildIndex(mc_array[_local1], 0);
};
_local1++;
};
}
public function tweet(_arg1:int):void{
var _local2:String;
var _local3:String;
var _local4:URLRequest;
_local2 = "";
if (_arg1 == 0){
_local2 = escapeMultiByte(((((("STAGE " + (stageNo + 1)) + " クリア! SCORE ") + score) + " [NORMAL] ") + "http://bit.ly/mS4q0e #pac_magi"));
} else {
if (_arg1 == 1){
_local2 = escapeMultiByte(((("STAGE " + (stageNo + 1)) + " でゲームオーバーになりました [SURVIVAL] ") + "http://bit.ly/mS4q0e #pac_magi"));
} else {
if (_arg1 == 2){
_local2 = escapeMultiByte(("ノーマルモード全ステージをクリアしました! " + "http://bit.ly/mS4q0e #pac_magi"));
} else {
if (_arg1 == 3){
_local2 = escapeMultiByte(("サバイバルモード全ステージをクリアしました! " + "http://bit.ly/mS4q0e #pac_magi"));
};
};
};
};
_local3 = ("http://twitter.com/intent/tweet?text=+" + _local2);
_local4 = new URLRequest(_local3);
navigateToURL(_local4, "_blank");
}
public function xFadeInClear(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha - 0.1);
if (blackMask_mc.alpha < 0){
blackMask_mc.alpha = 0;
blackMask_mc.visible = false;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeInClear);
addClearEvent();
};
}
public function xFadeInTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha - 0.1);
if (blackMask_mc.alpha < 0){
blackMask_mc.alpha = 0;
blackMask_mc.visible = false;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeInTitle);
addTitleEvent();
};
}
public function addTitleEvent():void{
stage.addEventListener(KeyboardEvent.KEY_UP, xKeyUpTitle);
stage.addEventListener(KeyboardEvent.KEY_DOWN, xKeyDownTitle);
mitume_btn.addEventListener(MouseEvent.CLICK, xClickMitume);
addEventListener(Event.ENTER_FRAME, xEnterTitle);
}
public function xFadeInputToTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.1);
if (blackMask_mc.alpha >= 1){
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeInputToTitle);
gotoAndStop("title");
};
}
public function xClickInputNameOkTitle(_arg1:MouseEvent):void{
if (inputName_mc.name_txt.length != 0){
inputName_mc.ok_btn.removeEventListener(MouseEvent.CLICK, xClickInputNameOkTitle);
scoreName = inputName_mc.name_txt.text;
so.data.scoreName = inputName_mc.name_txt.text;
addTitleEvent();
option_mc.visible = true;
cursor_mc.visible = true;
inputName_mc.visible = false;
playSe(0);
};
}
public function xFadeClearToTitle(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha + 0.1);
if (blackMask_mc.alpha >= 1){
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeClearToTitle);
gameMode = 0;
gotoAndStop("loadRanking");
};
}
public function removeTitleEvent():void{
stage.removeEventListener(KeyboardEvent.KEY_UP, xKeyUpTitle);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, xKeyDownTitle);
mitume_btn.removeEventListener(MouseEvent.CLICK, xClickMitume);
removeEventListener(Event.ENTER_FRAME, xEnterTitle);
}
public function getMassNo(_arg1:int, _arg2:int):int{
return ((Math.floor((_arg1 / 8)) + (Math.floor((_arg2 / 8)) * MASS_WIDTH_MAX)));
}
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 xStageSelectFadeOut(_arg1:Event):void{
stageSelect_mc.alpha = (stageSelect_mc.alpha - 0.2);
title_mc.alpha = (title_mc.alpha + 0.2);
mitume_btn.alpha = (mitume_btn.alpha + 0.2);
cursor_mc.alpha = (cursor_mc.alpha + 0.2);
if (stageSelect_mc.alpha <= 0){
title_mc.alpha = 1;
mitume_btn.alpha = 1;
stageSelect_mc.visible = false;
removeEventListener(Event.ENTER_FRAME, xStageSelectFadeOut);
addTitleEvent();
};
}
public function xFadeInGame(_arg1:Event):void{
blackMask_mc.alpha = (blackMask_mc.alpha - 0.1);
bgmTr.volume = (bgmTr.volume + (bgmVolume * 0.01));
bgmCh.soundTransform = bgmTr;
if (blackMask_mc.alpha < 0){
bgmTr.volume = (bgmVolume * 0.1);
bgmCh.soundTransform = bgmTr;
blackMask_mc.alpha = 0;
blackMask_mc.visible = false;
blackMask_mc.removeEventListener(Event.ENTER_FRAME, xFadeInGame);
ready_mc.addEventListener(Event.ENTER_FRAME, xFadeReady);
};
}
public function xFadeReady(_arg1:Event):void{
counter++;
if (counter >= 60){
ready_mc.alpha = (ready_mc.alpha - 0.1);
if (ready_mc.alpha < 0){
ready_mc.alpha = 0;
ready_mc.visible = false;
counter = 0;
ready_mc.removeEventListener(Event.ENTER_FRAME, xFadeReady);
addGameEvent();
waitFlag = false;
};
};
}
public function xEnterMain(_arg1:Event):void{
var _local2:int;
var _local3:Array;
var _local4:*;
var _local5:Number;
if (waitFlag == false){
if ((((autoFlag == false)) && ((dashNo == -1)))){
if (keyType == 2){
if ((((keysDown[37] == true)) && ((keysDown[38] == true)))){
playerX = (playerX - playerSpeed);
if (moveKey != 0){
moveKey = 0;
faceKey = 0;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if ((((keysDown[39] == true)) && ((keysDown[40] == true)))){
playerX = (playerX + playerSpeed);
if (moveKey != 1){
moveKey = 1;
faceKey = 1;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if ((((keysDown[38] == true)) && ((keysDown[39] == true)))){
playerY = (playerY - playerSpeed);
if (moveKey != 2){
moveKey = 2;
faceKey = 2;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if ((((keysDown[37] == true)) && ((keysDown[40] == true)))){
playerY = (playerY + playerSpeed);
if (moveKey != 3){
moveKey = 3;
faceKey = 3;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if (moveKey != -1){
chara_mc.player_mc.anime_mc.gotoAndStop(((("move" + chalMode) + "_") + moveKey));
moveKey = -1;
};
};
};
};
};
} else {
if (keysDown[keyConfig[keyType][0]] == true){
playerX = (playerX - playerSpeed);
if (moveKey != 0){
moveKey = 0;
faceKey = 0;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if (keysDown[keyConfig[keyType][1]] == true){
playerX = (playerX + playerSpeed);
if (moveKey != 1){
moveKey = 1;
faceKey = 1;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if (keysDown[keyConfig[keyType][2]] == true){
playerY = (playerY - playerSpeed);
if (moveKey != 2){
moveKey = 2;
faceKey = 2;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if (keysDown[keyConfig[keyType][3]] == true){
playerY = (playerY + playerSpeed);
if (moveKey != 3){
moveKey = 3;
faceKey = 3;
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
};
} else {
if (moveKey != -1){
chara_mc.player_mc.anime_mc.gotoAndStop(((("move" + chalMode) + "_") + moveKey));
moveKey = -1;
};
};
};
};
};
};
};
dashCheck();
_local2 = getMassNo(playerX, playerY);
_local3 = [(_local2 - 21), (_local2 - 20), (_local2 - 19), (_local2 - 1), _local2, (_local2 + 1), (_local2 + 19), (_local2 + 20), (_local2 + 21)];
_local4 = 0;
while (_local4 < 9) {
if (map_array[_local3[_local4]] == 1){
hitBlockCheck(_local3[_local4], _local4);
} else {
if (map_array[_local3[_local4]] == 2){
};
};
_local4++;
};
chara_mc.player_mc.x = getQX(playerX, playerY);
chara_mc.player_mc.y = getQY(playerX, playerY);
if (chalCount > 0){
chalCount--;
if (chalCount == 0){
chara_mc.player_mc.alpha = 1;
chara_mc.tail0_mc.alpha = 1;
chara_mc.tail1_mc.alpha = 1;
chalMode = 0;
chara_mc.player_mc.effect_mc.gotoAndPlay("change");
chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + chalMode) + "_") + moveKey));
chara_mc.tail0_mc.visible = false;
chara_mc.tail1_mc.visible = false;
playerSpeed = 1;
eatGra_mc.gotoAndStop("chara0");
back_mc.mask_mc.gotoAndPlay("back");
chalGage_mc.visible = false;
playSe(5);
stopBgm();
playBgmLoop(0);
} else {
if (chalCount < 60){
chara_mc.player_mc.alpha = 0.5;
if (chara_mc.tail0_mc.alpha == 1){
chara_mc.tail0_mc.alpha = 0.5;
chara_mc.tail1_mc.alpha = 0.5;
};
};
};
chalGage_mc.x = chara_mc.player_mc.x;
chalGage_mc.y = (chara_mc.player_mc.y + 15);
chalGage_mc.gage_mc.width = (chalCount / 5);
};
if (balloonCount > 0){
balloonCount--;
} else {
if (balloon_mc.alpha > 0){
balloon_mc.alpha = (balloon_mc.alpha - 0.1);
};
};
if (rateTarget >= 899){
rateTarget = 898;
};
if (rateTarget > rateCount){
rateCount = (rateCount + 3);
if (rateCount >= rateTarget){
rateCount = rateTarget;
};
} else {
rateTarget = (rateTarget - 2);
rateCount = rateTarget;
if (rateTarget <= 0){
rateTarget = 0;
rateCount = 0;
};
};
rate = (Math.floor((rateTarget / 100)) + 1);
rateColor = (Math.floor((rateCount / 100)) + 1);
rate_txt.text = ("×" + rate_array[rate]);
if (scoreTarget > score){
score = (score + (4 * rate_array[rate]));
if (score >= scoreTarget){
score = scoreTarget;
};
score_txt.text = ("" + score);
};
_local5 = ((rateCount % 100) / 20);
addPie(25, 45, -(_local5), 0.7);
charaIndexChange();
if (((!((tail_array[0].x == playerX))) || (!((tail_array[0].y == playerY))))){
tail_array.unshift(new Point(playerX, playerY));
chara_mc.tail0_mc.x = getQX(tail_array[2].x, tail_array[2].y);
chara_mc.tail0_mc.y = getQY(tail_array[2].x, tail_array[2].y);
chara_mc.tail1_mc.x = getQX(tail_array[4].x, tail_array[4].y);
chara_mc.tail1_mc.y = getQY(tail_array[4].x, tail_array[4].y);
if (tail_array.length > 5){
tail_array.pop();
};
};
};
}
public function xFadeGameOver(_arg1:Event):void{
if (counter >= 20){
gameOver_mc.alpha = (gameOver_mc.alpha + 0.1);
if (gameOver_mc.alpha >= 1){
gameOver_mc.alpha = 1;
counter = 0;
gameOver_mc.removeEventListener(Event.ENTER_FRAME, xFadeGameOver);
updateEatenCount();
};
} else {
counter++;
};
}
public function getXfromTile(_arg1:int):int{
return (((_arg1 % MASS_WIDTH_MAX) * 8));
}
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 xClickMitume(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://3-me.net/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function updateKeyConfig():void{
var _local1:Array;
_local1 = ["A", "B", "C"];
option_mc.keyType_txt.text = ("TYPE " + _local1[keyType]);
so.data.keyType = keyType;
}
public function xKeyUpTitle(_arg1:KeyboardEvent):void{
if (menuNo == 0){
if (_arg1.keyCode == 90){
if (cursorNo == 0){
menuNo = 1;
updateStageSelect();
stageSelect_mc.visible = true;
stageSelect_mc.alpha = 0;
removeTitleEvent();
addEventListener(Event.ENTER_FRAME, xStageSelectFadeIn);
playSe(0);
} else {
if (cursorNo == 1){
removeTitleEvent();
stageNo = 0;
gameMode = 0;
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeTitleToGame);
playSe(0);
} else {
if (cursorNo == 2){
title_mc.visible = false;
option_mc.visible = true;
menuNo = 2;
cursorNo = 0;
cursor_mc.y = cursor_array[menuNo][cursorNo];
playSe(0);
};
};
};
} else {
if (_arg1.keyCode == Keyboard.UP){
cursorNo--;
if (cursorNo < 0){
cursorNo = 2;
};
cursor_mc.y = cursor_array[menuNo][cursorNo];
playSe(2);
} else {
if (_arg1.keyCode == Keyboard.DOWN){
cursorNo++;
if (cursorNo > 2){
cursorNo = 0;
};
cursor_mc.y = cursor_array[menuNo][cursorNo];
playSe(2);
};
};
};
} else {
if (menuNo == 1){
if (_arg1.keyCode == 90){
if (stageNo != -1){
removeTitleEvent();
gameMode = 1;
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeTitleToGame);
} else {
rankingMode++;
if (rankingMode > 1){
rankingMode = 0;
};
updateStageSelect();
};
playSe(0);
} else {
if (_arg1.keyCode == 88){
menuNo = 0;
rankingMode = 1;
removeTitleEvent();
addEventListener(Event.ENTER_FRAME, xStageSelectFadeOut);
playSe(1);
} else {
if (_arg1.keyCode == Keyboard.LEFT){
if (stageNo > -1){
rankingPage = 0;
stageNo--;
};
rankingMode = 1;
updateStageSelect();
keysDownTitle[Keyboard.LEFT] = false;
leftKeyCount = 0;
playSe(2);
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
if (stageNo < clearStage){
rankingPage = 0;
stageNo++;
if (stageNo >= mapData_array.length){
stageNo = (mapData_array.length - 1);
};
};
rankingMode = 1;
updateStageSelect();
keysDownTitle[Keyboard.RIGHT] = false;
rightKeyCount = 0;
playSe(2);
} else {
if (_arg1.keyCode == Keyboard.UP){
rankingPage--;
if (rankingPage < 0){
rankingPage = 0;
};
updateStageSelect();
keysDownTitle[Keyboard.UP] = false;
upKeyCount = 0;
playSe(2);
} else {
if (_arg1.keyCode == Keyboard.DOWN){
rankingPage++;
if (rankingPage > 9){
rankingPage = 9;
};
updateStageSelect();
keysDownTitle[Keyboard.DOWN] = false;
downKeyCount = 0;
playSe(2);
};
};
};
};
};
};
} else {
if (menuNo == 2){
if (_arg1.keyCode == 90){
if (cursorNo == 0){
bgmVolume++;
if (bgmVolume > 5){
bgmVolume = 0;
};
updateVolume();
playSe(0);
} else {
if (cursorNo == 1){
seVolume++;
if (seVolume > 5){
seVolume = 0;
};
updateVolume();
playSe(0);
} else {
if (cursorNo == 2){
option_mc.visible = false;
cursor_mc.visible = false;
inputName_mc.visible = true;
inputName_mc.name_txt.text = scoreName;
removeTitleEvent();
inputName_mc.ok_btn.addEventListener(MouseEvent.CLICK, xClickInputNameOkTitle);
playSe(0);
} else {
if (cursorNo == 3){
keyType++;
if (keyType > 2){
keyType = 0;
};
updateKeyConfig();
playSe(0);
} else {
if (cursorNo == 4){
title_mc.visible = true;
option_mc.visible = false;
menuNo = 0;
cursorNo = 2;
cursor_mc.y = cursor_array[menuNo][cursorNo];
playSe(1);
};
};
};
};
};
} else {
if (_arg1.keyCode == 88){
title_mc.visible = true;
option_mc.visible = false;
menuNo = 0;
cursorNo = 2;
cursor_mc.y = cursor_array[menuNo][cursorNo];
keySample_mc.visible = false;
playSe(1);
} else {
if (_arg1.keyCode == Keyboard.UP){
cursorNo--;
if (cursorNo < 0){
cursorNo = 4;
};
if (cursorNo == 3){
keySample_mc.visible = true;
} else {
keySample_mc.visible = false;
};
cursor_mc.y = cursor_array[menuNo][cursorNo];
playSe(2);
} else {
if (_arg1.keyCode == Keyboard.DOWN){
cursorNo++;
if (cursorNo > 4){
cursorNo = 0;
};
if (cursorNo == 3){
keySample_mc.visible = true;
} else {
keySample_mc.visible = false;
};
cursor_mc.y = cursor_array[menuNo][cursorNo];
playSe(2);
};
};
};
};
};
};
};
}
public function loadSound():void{
bgmList[0] = new bgm0();
bgmList[1] = new bgm1();
bgmList[2] = new bgm2();
seList[0] = new CURSOR0();
seList[1] = new CURSOR1();
seList[2] = new CURSOR2();
seList[3] = new CURSOR0();
seList[4] = new power0();
seList[5] = new power1();
seList[6] = new dead0();
seList[7] = new dead0();
seList[8] = new tiro0();
seList[9] = new tiro1();
seList[10] = new reverce2();
seList[11] = new reverce1();
seList[12] = new bom0();
seList[13] = new warp1();
seList[14] = new dash0();
seList[15] = new warp0();
seList[16] = new dead1();
}
public function xKeyClear(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.SPACE){
removeClearEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeClearToTitle);
} else {
if (_arg1.keyCode == Keyboard.SHIFT){
if (gameMode == MODE_NORMAL){
tweet(2);
} else {
if (gameMode == MODE_SURVIVAL){
tweet(3);
};
};
};
};
}
public function xKeyDownTitle(_arg1:KeyboardEvent):void{
if (menuNo == 1){
if (_arg1.keyCode == Keyboard.LEFT){
keysDownTitle[Keyboard.LEFT] = true;
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
keysDownTitle[Keyboard.RIGHT] = true;
} else {
if (_arg1.keyCode == Keyboard.UP){
keysDownTitle[Keyboard.UP] = true;
} else {
if (_arg1.keyCode == Keyboard.DOWN){
keysDownTitle[Keyboard.DOWN] = true;
};
};
};
};
};
}
public function xKeyUp(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = false;
if ((((((gameOverFlag == true)) && ((gameOver_mc.alpha >= 1)))) || ((((stageClear_mc.alpha >= 1)) && ((stageClearFlag == true)))))){
if (_arg1.keyCode == 90){
if (allClearFlag == true){
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToClear);
} else {
if (gameOverFlag == true){
if (gameMode == 1){
continueFlag = true;
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToRetry);
};
} else {
stageNo++;
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToRetry);
};
};
} else {
if (_arg1.keyCode == 88){
if (gameMode == 1){
continueFlag = false;
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToRetry);
};
} else {
if (_arg1.keyCode == Keyboard.SPACE){
if ((((gameMode == 1)) || ((gameOverFlag == true)))){
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToTitle);
};
} else {
if (_arg1.keyCode == Keyboard.SHIFT){
if ((((gameMode == MODE_NORMAL)) && ((gameOverFlag == false)))){
tweet(0);
} else {
if ((((gameMode == MODE_SURVIVAL)) && ((gameOverFlag == true)))){
tweet(1);
};
};
};
};
};
};
};
if ((((gameOverFlag == false)) && ((stageClear_mc.visible == false)))){
if (_arg1.keyCode == 90){
if (waitFlag == false){
waitFlag = true;
wait_mc.visible = true;
} else {
waitFlag = false;
wait_mc.visible = false;
};
} else {
if (_arg1.keyCode == 88){
if (wait_mc.visible == true){
if (gameMode == 1){
continueFlag = false;
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToRetry);
};
};
} else {
if (_arg1.keyCode == Keyboard.SPACE){
if (wait_mc.visible == true){
removeGameEvent();
blackMask_mc.visible = true;
blackMask_mc.addEventListener(Event.ENTER_FRAME, xFadeGameToTitle);
};
};
};
};
};
}
public function addClearEvent():void{
stage.addEventListener(KeyboardEvent.KEY_UP, xKeyClear);
}
public function gameOver():void{
var _local1:int;
if ((((((((gameOverFlag == false)) && ((stageClearFlag == false)))) && ((gameOver_mc.visible == false)))) && ((autoFlag == false)))){
waitFlag = true;
counter = 0;
gameOver_mc.alpha = 0;
gameOver_mc.visible = true;
gameOverFlag = true;
addMessage("game over!");
if (gameMode == MODE_SURVIVAL){
_local1 = (survivalScore + score);
gameOver_mc.suv_mc.score_txt.text = _local1;
if (_local1 > hiSurvivalScore){
hiSurvivalScore = _local1;
so.data.hiSurvivalScore = _local1;
registSurvival(scoreName, hiSurvivalScore, stageNo);
};
};
chara_mc.player_mc.anime_mc.gotoAndPlay("dead");
playSe(6);
gameOver_mc.addEventListener(Event.ENTER_FRAME, xFadeGameOver);
};
}
public function xCompleteTotal(_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 ((((totalScore_array.length < 100)) && ((_local6 < _local4.length)))) {
if (_local5.indexOf(_local4[_local6].name.toString()) == -1){
totalScore_array.push(_local4[_local6]);
_local5.push(_local4[_local6].name.toString());
};
_local6++;
};
_local4.sortOn(["score"], [(Array.DESCENDING | Array.NUMERIC)]);
_local4 = null;
_local5 = null;
if (totalScore_array[99] != null){
totalLastScore = totalScore_array[99].score;
} else {
totalLastScore = 0;
};
_local4 = null;
_local5 = null;
rankingXmlLoader.removeEventListener(Event.COMPLETE, xCompleteTotal);
rankingXmlLoader.addEventListener(Event.COMPLETE, xCompleteSurvival);
rankingXmlLoader.load(new URLRequest(XML_SURVIVAL));
}
}
}//package chal_fla
Section 19
//MASKTEST_MC_25 (chal_fla.MASKTEST_MC_25)
package chal_fla {
import flash.display.*;
public dynamic class MASKTEST_MC_25 extends MovieClip {
public function MASKTEST_MC_25(){
addFrameScript(0, frame1, 29, frame30, 39, frame40);
}
function frame1(){
stop();
}
function frame30(){
stop();
}
function frame40(){
gotoAndStop("first");
}
}
}//package chal_fla
Section 20
//MINIGAGE_MC_38 (chal_fla.MINIGAGE_MC_38)
package chal_fla {
import flash.display.*;
public dynamic class MINIGAGE_MC_38 extends MovieClip {
public var gage_mc:MovieClip;
}
}//package chal_fla
Section 21
//OKASI_MC_32 (chal_fla.OKASI_MC_32)
package chal_fla {
import flash.display.*;
public dynamic class OKASI_MC_32 extends MovieClip {
public function OKASI_MC_32(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 10, frame11, 14, frame15, 19, frame20, 23, frame24, 27, frame28, 31, frame32, 35, frame36, 40, frame41, 43, frame44, 44, frame45);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame20(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame36(){
stop();
}
function frame24(){
stop();
}
function frame28(){
stop();
}
function frame11(){
stop();
}
function frame44(){
stop();
}
function frame41(){
stop();
}
function frame45(){
stop();
}
function frame32(){
stop();
}
}
}//package chal_fla
Section 22
//OPTION_MC_13 (chal_fla.OPTION_MC_13)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class OPTION_MC_13 extends MovieClip {
public var keyType_txt:TextField;
public var bgmVolume_txt:TextField;
public var seVolume_txt:TextField;
}
}//package chal_fla
Section 23
//PLAYEREFFECT_MC_36 (chal_fla.PLAYEREFFECT_MC_36)
package chal_fla {
import flash.display.*;
public dynamic class PLAYEREFFECT_MC_36 extends MovieClip {
public var animationFlag:Boolean;
public function PLAYEREFFECT_MC_36(){
addFrameScript(0, frame1, 1, frame2, 36, frame37);
}
function frame1(){
stop();
animationFlag = false;
}
function frame2(){
animationFlag = true;
}
function frame37(){
animationFlag = false;
stop();
}
}
}//package chal_fla
Section 24
//RANKING_LIST_20 (chal_fla.RANKING_LIST_20)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class RANKING_LIST_20 extends MovieClip {
public var score_txt:TextField;
public var name_txt:TextField;
public var rank_txt:TextField;
}
}//package chal_fla
Section 25
//RANKING_MC_19 (chal_fla.RANKING_MC_19)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class RANKING_MC_19 extends MovieClip {
public var list9_mc:MovieClip;
public var list1_mc:MovieClip;
public var list4_mc:MovieClip;
public var list7_mc:MovieClip;
public var list2_mc:MovieClip;
public var rankingTitle_txt:TextField;
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 chal_fla
Section 26
//READY_MC_43 (chal_fla.READY_MC_43)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class READY_MC_43 extends MovieClip {
public var stage_txt:TextField;
}
}//package chal_fla
Section 27
//STAGECLEAR_MC_48 (chal_fla.STAGECLEAR_MC_48)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class STAGECLEAR_MC_48 extends MovieClip {
public var score_txt:TextField;
public var normalBtns_mc:MovieClip;
public var totalScore_txt:TextField;
public var suvBtns_mc:MovieClip;
public var totalScoreTitle_txt:TextField;
public var newRecord_mc:MovieClip;
}
}//package chal_fla
Section 28
//STAGESELECT_MC_16 (chal_fla.STAGESELECT_MC_16)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class STAGESELECT_MC_16 extends MovieClip {
public var star2_mc:MovieClip;
public var prev_mc:MovieClip;
public var infoZ_txt:TextField;
public var ranking_mc:MovieClip;
public var previewMap_mc:MovieClip;
public var star0_mc:MovieClip;
public var totalScore_txt:TextField;
public var next_mc:MovieClip;
public var total_mc:MovieClip;
public var stageNo_txt:TextField;
public var scoreTitle_txt:TextField;
public var star1_mc:MovieClip;
public var hiScore_txt:TextField;
}
}//package chal_fla
Section 29
//SUV_SCORE_MC_45 (chal_fla.SUV_SCORE_MC_45)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SUV_SCORE_MC_45 extends MovieClip {
public var score_txt:TextField;
}
}//package chal_fla
Section 30
//TAIL_MC_37 (chal_fla.TAIL_MC_37)
package chal_fla {
import flash.display.*;
public dynamic class TAIL_MC_37 extends MovieClip {
public var deleteFlag:Boolean;
public function TAIL_MC_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
deleteFlag = false;
}
}
}//package chal_fla
Section 31
//TESTESTE_4 (chal_fla.TESTESTE_4)
package chal_fla {
import flash.display.*;
public dynamic class TESTESTE_4 extends MovieClip {
public var mami_mc:MovieClip;
public var sayaka_mc:MovieClip;
public var homura_mc:MovieClip;
public var madoka_mc:MovieClip;
public var chal_mc:MovieClip;
public var kyouko_mc:MovieClip;
public function TESTESTE_4(){
addFrameScript(38, frame39, 221, frame222, 402, frame403, 547, frame548, 743, frame744, 934, frame935, 1107, frame1108);
}
function frame548(){
chal_mc.gotoAndPlay("move1_3");
mami_mc.gotoAndPlay("move0_3");
}
function frame1108(){
chal_mc.gotoAndPlay("move0_1");
mami_mc.gotoAndPlay("move0_1");
}
function frame744(){
homura_mc.gotoAndPlay("move0_1");
madoka_mc.gotoAndPlay("move0_1");
}
function frame222(){
chal_mc.gotoAndPlay("move0_0");
}
function frame39(){
chal_mc.gotoAndPlay("move0_3");
}
function frame403(){
chal_mc.gotoAndPlay("move0_2");
mami_mc.gotoAndPlay("move0_2");
}
function frame935(){
kyouko_mc.gotoAndPlay("move0_3");
sayaka_mc.gotoAndPlay("move0_3");
}
}
}//package chal_fla
Section 32
//Timeline_10 (chal_fla.Timeline_10)
package chal_fla {
import flash.display.*;
public dynamic class Timeline_10 extends MovieClip {
public function Timeline_10(){
addFrameScript(24, frame25, 49, frame50, 74, frame75, 99, frame100, 143, frame144);
}
function frame144(){
gotoAndPlay("gem");
}
function frame75(){
gotoAndPlay("move0_2");
}
function frame100(){
gotoAndPlay("move0_3");
}
function frame25(){
gotoAndPlay("move0_0");
}
function frame50(){
gotoAndPlay("move0_1");
}
}
}//package chal_fla
Section 33
//Timeline_11 (chal_fla.Timeline_11)
package chal_fla {
import flash.display.*;
public dynamic class Timeline_11 extends MovieClip {
public function Timeline_11(){
addFrameScript(24, frame25, 49, frame50, 74, frame75, 99, frame100, 143, frame144);
}
function frame144(){
gotoAndPlay("gem");
}
function frame75(){
gotoAndPlay("move0_2");
}
function frame100(){
gotoAndPlay("move0_3");
}
function frame25(){
gotoAndPlay("move0_0");
}
function frame50(){
gotoAndPlay("move0_1");
}
}
}//package chal_fla
Section 34
//Timeline_5 (chal_fla.Timeline_5)
package chal_fla {
import flash.display.*;
public dynamic class Timeline_5 extends MovieClip {
public function Timeline_5(){
addFrameScript(20, frame21, 41, frame42, 62, frame63, 83, frame84, 94, frame95, 105, frame106, 116, frame117, 127, frame128, 140, frame141);
}
function frame84(){
gotoAndPlay("move0_3");
}
function frame95(){
gotoAndPlay("move1_0");
}
function frame106(){
gotoAndPlay("move1_1");
}
function frame21(){
gotoAndPlay("move0_0");
}
function frame117(){
gotoAndPlay("move1_2");
}
function frame128(){
gotoAndPlay("move1_3");
}
function frame42(){
gotoAndPlay("move0_1");
}
function frame141(){
stop();
}
function frame63(){
gotoAndPlay("move0_2");
}
}
}//package chal_fla
Section 35
//Timeline_7 (chal_fla.Timeline_7)
package chal_fla {
import flash.display.*;
public dynamic class Timeline_7 extends MovieClip {
public function Timeline_7(){
addFrameScript(24, frame25, 49, frame50, 74, frame75, 99, frame100, 143, frame144, 144, frame145, 145, frame146, 146, frame147, 147, frame148);
}
function frame144(){
gotoAndPlay("gem");
}
function frame75(){
gotoAndPlay("move0_2");
}
function frame100(){
gotoAndPlay("move0_3");
}
function frame25(){
gotoAndPlay("move0_0");
}
function frame50(){
gotoAndPlay("move0_1");
}
function frame145(){
stop();
}
function frame146(){
stop();
}
function frame148(){
stop();
}
function frame147(){
stop();
}
}
}//package chal_fla
Section 36
//Timeline_8 (chal_fla.Timeline_8)
package chal_fla {
import flash.display.*;
public dynamic class Timeline_8 extends MovieClip {
public function Timeline_8(){
addFrameScript(24, frame25, 49, frame50, 74, frame75, 99, frame100, 143, frame144);
}
function frame144(){
gotoAndPlay("gem");
}
function frame75(){
gotoAndPlay("move0_2");
}
function frame100(){
gotoAndPlay("move0_3");
}
function frame25(){
gotoAndPlay("move0_0");
}
function frame50(){
gotoAndPlay("move0_1");
}
}
}//package chal_fla
Section 37
//Timeline_9 (chal_fla.Timeline_9)
package chal_fla {
import flash.display.*;
public dynamic class Timeline_9 extends MovieClip {
public function Timeline_9(){
addFrameScript(24, frame25, 49, frame50, 74, frame75, 99, frame100, 124, frame125, 149, frame150, 174, frame175, 199, frame200, 224, frame225, 249, frame250, 274, frame275, 299, frame300, 343, frame344);
}
function frame75(){
gotoAndPlay("move0_2");
}
function frame275(){
gotoAndPlay("move2_2");
}
function frame200(){
gotoAndPlay("move1_3");
}
function frame344(){
gotoAndPlay("gem");
}
function frame100(){
gotoAndPlay("move0_3");
}
function frame25(){
gotoAndPlay("move0_0");
}
function frame225(){
gotoAndPlay("move2_0");
}
function frame175(){
gotoAndPlay("move1_2");
}
function frame125(){
gotoAndPlay("move1_0");
}
function frame50(){
gotoAndPlay("move0_1");
}
function frame300(){
gotoAndPlay("move2_3");
}
function frame250(){
gotoAndPlay("move2_1");
}
function frame150(){
gotoAndPlay("move1_1");
}
}
}//package chal_fla
Section 38
//TOTAL_MC_21 (chal_fla.TOTAL_MC_21)
package chal_fla {
import flash.display.*;
import flash.text.*;
public dynamic class TOTAL_MC_21 extends MovieClip {
public var homura_txt:TextField;
public var kyoko_txt:TextField;
public var sayaka_txt:TextField;
public var playCount_txt:TextField;
public var sweets_txt:TextField;
public var survivalClear_txt:TextField;
public var mami_txt:TextField;
public var madoka_txt:TextField;
public var clearStage_txt:TextField;
}
}//package chal_fla
Section 39
//WAIT_MC_40 (chal_fla.WAIT_MC_40)
package chal_fla {
import flash.display.*;
public dynamic class WAIT_MC_40 extends MovieClip {
public var survivalBtns_mc:MovieClip;
public var normalBtns_mc:MovieClip;
}
}//package chal_fla
Section 40
//bgm0 (bgm0)
package {
import flash.media.*;
public dynamic class bgm0 extends Sound {
}
}//package
Section 41
//bgm1 (bgm1)
package {
import flash.media.*;
public dynamic class bgm1 extends Sound {
}
}//package
Section 42
//bgm2 (bgm2)
package {
import flash.media.*;
public dynamic class bgm2 extends Sound {
}
}//package
Section 43
//BOM_MC (BOM_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BOM_MC extends MovieClip {
public var effect_mc:MovieClip;
public var count:int;
public var bomCount:int;
public var anime_mc:MovieClip;
public var bomFlag:Boolean;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var charaX:int;
public var charaY:int;
public function BOM_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 24);
_local6 = (this.x + 24);
_local7 = (this.y - 4);
_local8 = (this.y + 20);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
rootObj.gameOver();
};
}
public function xEnterChara(_arg1:Event):void{
if (rootObj.waitFlag == false){
if (bomFlag == false){
count--;
if (count == 30){
anime_mc.gotoAndPlay("start");
};
if (count <= 0){
anime_mc.gotoAndPlay("bom");
bomFlag = true;
rootObj.playSe(12);
};
} else {
if (bomFlag == true){
if (bomCount >= 15){
hitCheck();
};
bomCount--;
if (bomCount <= 0){
deleteFlag = true;
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
deleteFlag = false;
count = 90;
bomFlag = false;
bomCount = 25;
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 44
//bom0 (bom0)
package {
import flash.media.*;
public dynamic class bom0 extends Sound {
}
}//package
Section 45
//BOM2_MC (BOM2_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BOM2_MC extends MovieClip {
public var effect_mc:MovieClip;
public var count:int;
public var bomCount:int;
public var anime_mc:MovieClip;
public var bomFlag:Boolean;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var charaX:int;
public var charaY:int;
public function BOM2_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 24);
_local6 = (this.x + 24);
_local7 = (this.y - 4);
_local8 = (this.y + 20);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
rootObj.gameOver();
};
}
public function xEnterChara(_arg1:Event):void{
if (rootObj.waitFlag == false){
if (bomFlag == false){
count--;
if (count == 80){
anime_mc.gotoAndStop("noPin");
};
if (count == 30){
anime_mc.gotoAndPlay("start");
};
if (count <= 0){
anime_mc.gotoAndPlay("bom");
bomFlag = true;
rootObj.playSe(12);
};
} else {
if (bomFlag == true){
if (bomCount >= 15){
hitCheck();
};
bomCount--;
if (bomCount <= 0){
deleteFlag = true;
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
deleteFlag = false;
count = 90;
bomFlag = false;
bomCount = 25;
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 46
//CURSOR0 (CURSOR0)
package {
import flash.media.*;
public dynamic class CURSOR0 extends Sound {
}
}//package
Section 47
//CURSOR1 (CURSOR1)
package {
import flash.media.*;
public dynamic class CURSOR1 extends Sound {
}
}//package
Section 48
//CURSOR2 (CURSOR2)
package {
import flash.media.*;
public dynamic class CURSOR2 extends Sound {
}
}//package
Section 49
//DASH_MC (DASH_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class DASH_MC extends MovieClip {
public var dashNo:int;
public var upRate:int;
public var scorePoint:int;
public var moveSpeedX:Number;
public var moveSpeedY:Number;
public var mark_mc:MovieClip;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var massNo:int;
public var getFlag:Boolean;
public var charaX:int;
public var charaY:int;
public function DASH_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
rootObj = null;
this.parent.removeChild(this);
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 1);
_local2 = (rootObj.chara_mc.player_mc.x + 1);
_local3 = (rootObj.chara_mc.player_mc.y + 8);
_local4 = (rootObj.chara_mc.player_mc.y + 9);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
if (rootObj.faceKey == dashNo){
rootObj.dashCount = 4;
rootObj.dashNo = dashNo;
rootObj.playSe(14);
};
};
}
public function xEnterChara(_arg1:Event):void{
if (rootObj.waitFlag == false){
hitCheck();
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
getFlag = false;
moveSpeedX = ((52 - this.x) / 10);
moveSpeedY = ((215 - this.y) / 10);
scorePoint = 30;
upRate = 15;
deleteFlag = false;
mark_mc.gotoAndStop(("no" + dashNo));
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 50
//dash0 (dash0)
package {
import flash.media.*;
public dynamic class dash0 extends Sound {
}
}//package
Section 51
//dead0 (dead0)
package {
import flash.media.*;
public dynamic class dead0 extends Sound {
}
}//package
Section 52
//dead1 (dead1)
package {
import flash.media.*;
public dynamic class dead1 extends Sound {
}
}//package
Section 53
//eat6 (eat6)
package {
import flash.media.*;
public dynamic class eat6 extends Sound {
}
}//package
Section 54
//eat7 (eat7)
package {
import flash.media.*;
public dynamic class eat7 extends Sound {
}
}//package
Section 55
//ENEMY0_MC (ENEMY0_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ENEMY0_MC extends MovieClip {
public var tiroStatus:int;
public var scorePoint:int;
public var shotCount:int;
public var startX:int;
public var startY:int;
public var MODE_DEFENCE_TIME:int;
public var moveX:int;
public var moveY:int;
public var rootObj:MovieClip;
public var chargeCount:int;
public var tiroCount:int;
public var moveKey:int;
public var tiroNo:int;
public var shot_array:Array;
public var targetX:int;
public var targetY:int;
public var nowMass:int;
public var moveCounter:int;
public var animeCount:int;
public var effect_mc:MovieClip;
public var deadCount:int;
public var beforeMass:int;
public var moveMode:int;
public var defencePoint:int;
public var mutekiFlag:Boolean;
public var anime_mc:MovieClip;
public var deadStatus:int;
public var defence_array:Array;
public var defenceType:int;
public var deleteFlag:Boolean;
public var MODE_ATTACK_TIME:int;
public var charaX:int;
public var charaY:int;
public var deadFlag:Boolean;
public function ENEMY0_MC(){
addFrameScript(0, frame1);
}
public function shotCheck():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:MovieClip;
var _local5:int;
_local1 = rootObj.getMassNo(rootObj.playerX, rootObj.playerY);
_local2 = rootObj.getMassNo(charaX, charaY);
_local3 = -1;
if (tiroStatus == 0){
if (Math.abs((rootObj.playerX - charaX)) > 50){
if (Math.floor((_local1 / 20)) == Math.floor((_local2 / 20))){
if (_local1 > _local2){
_local3 = 1;
} else {
_local3 = 0;
};
};
};
if (Math.abs((rootObj.playerY - charaY)) > 50){
if ((_local1 % 20) == (_local2 % 20)){
if (_local1 > _local2){
_local3 = 3;
} else {
_local3 = 2;
};
};
};
if (_local3 >= 0){
tiroStatus = 1;
tiroNo = _local3;
moveKey = -1;
effect_mc.gotoAndPlay("tiro");
anime_mc.gotoAndPlay(("tiro" + tiroNo));
chargeCount = 30;
rootObj.playSe(8);
};
} else {
if (tiroStatus == 1){
if (chargeCount <= 0){
_local4 = new SHOT_MC();
_local5 = rootObj.getMassNo(charaX, charaY);
_local4.charaX = (charaX + shot_array[tiroNo].x);
_local4.charaY = (charaY + shot_array[tiroNo].y);
_local4.x = rootObj.getQX((charaX + shot_array[tiroNo].x), (charaY + shot_array[tiroNo].y));
_local4.y = rootObj.getQY((charaX + shot_array[tiroNo].x), (charaY + shot_array[tiroNo].y));
_local4.moveTurn = tiroNo;
rootObj.objCount++;
rootObj.chara_mc.addChild(_local4);
rootObj.playSe(9);
tiroStatus = 2;
tiroCount = 30;
} else {
chargeCount--;
};
} else {
if (tiroStatus == 2){
tiroCount--;
if (tiroCount <= 0){
tiroStatus = 0;
tiroNo = -1;
shotCount = 200;
};
};
};
};
}
public function createDefencePoint():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[0].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[1].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
_local1 = 8;
while (_local1 < 15) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[2].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[3].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
}
public function xEnterChara(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:*;
if (rootObj.waitFlag == false){
if (deadFlag == false){
if (tiroStatus == 0){
moveCounter--;
if ((((rootObj.chalMode == 1)) && ((mutekiFlag == false)))){
mutekiFlag = true;
moveMode = 4;
beforeMass = -1;
nowMass = -1;
} else {
if ((((rootObj.chalMode == 0)) && ((mutekiFlag == true)))){
mutekiFlag = false;
moveMode = 0;
moveCounter = MODE_ATTACK_TIME;
} else {
if (moveCounter <= 0){
if (moveMode == 0){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
} else {
if (moveMode == 1){
moveMode = 0;
moveCounter = MODE_ATTACK_TIME;
};
};
};
};
};
targetX = 0;
targetY = 0;
if (moveMode == 0){
searchSymmetric();
if ((((targetX == charaX)) && ((targetY == charaY)))){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
};
} else {
if (moveMode == 1){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
} else {
if (moveMode == 2){
searchSymmetric();
if ((((targetX == charaX)) && ((targetY == charaY)))){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
moveMode = 4;
};
} else {
if (moveMode == 4){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
};
};
};
if (((((charaX % 8) == 0)) && (((charaY % 8) == 0)))){
_local2 = rootObj.getMassNo(charaX, charaY);
if (nowMass != _local2){
beforeMass = nowMass;
nowMass = _local2;
};
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
if (_local3 == 0){
_local5 = [(rootObj.getMassNo(charaX, charaY) - 20), (rootObj.getMassNo(charaX, charaY) - 1), (rootObj.getMassNo(charaX, charaY) + 1), (rootObj.getMassNo(charaX, charaY) + 20)];
_local6 = [];
_local7 = 0;
while (_local7 < 4) {
if (_local5[_local7] != beforeMass){
if (rootObj.map_array[_local5[_local7]] == 0){
_local6.push(_local5[_local7]);
};
};
_local7++;
};
if (_local6.length != 0){
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
} else {
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), -1);
};
};
_local4 = (_local3 - _local2);
moveX = (_local4 % 20);
moveY = (_local4 / 20);
};
charaX = (charaX + moveX);
charaY = (charaY + moveY);
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
if ((((moveX == -1)) && ((moveY == 0)))){
if (moveKey != 0){
moveKey = 0;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 1)) && ((moveY == 0)))){
if (moveKey != 1){
moveKey = 1;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == -1)))){
if (moveKey != 2){
moveKey = 2;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == 1)))){
if (moveKey != 3){
moveKey = 3;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
};
};
};
};
};
hitCheck();
if (shotCount <= 0){
shotCheck();
} else {
shotCount--;
};
} else {
if (deadStatus == 1){
if (animeCount <= 0){
deadStatus = 2;
deadCount = 200;
charaX = startX;
charaY = startY;
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
anime_mc.visible = true;
} else {
animeCount--;
};
} else {
if (deadStatus == 2){
if (deadCount == 0){
deadStatus = 3;
animeCount = 33;
effect_mc.gotoAndPlay("revival");
rootObj.playSe(10);
} else {
deadCount--;
};
} else {
if (deadStatus == 3){
if (animeCount <= 0){
deadFlag = false;
anime_mc.visible = true;
rootObj.addMessage("mami was revived!");
effect_mc.gotoAndPlay("revival2");
rootObj.playSe(11);
} else {
animeCount--;
};
};
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
public function searchSymmetric():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Array;
var _local7:Array;
var _local8:*;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = [];
_local7 = [(_local5 - 21), (_local5 - 20), (_local5 - 19), (_local5 - 1), _local5, (_local5 + 1), (_local5 + 19), (_local5 + 20), (_local5 + 21)];
_local8 = 0;
while (_local8 < 9) {
if (rootObj.map_array[_local7[_local8]] == 0){
_local6.push(_local7[_local8]);
};
_local8++;
};
if (_local6.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
MODE_DEFENCE_TIME = 150;
MODE_ATTACK_TIME = (300 + (rootObj.stageNo * 30));
deleteFlag = false;
deadFlag = false;
deadCount = 0;
deadStatus = 0;
moveX = 0;
moveY = 0;
moveKey = -1;
tiroNo = -1;
tiroStatus = 0;
tiroCount = 0;
chargeCount = 30;
animeCount = 14;
targetX = 0;
targetY = 0;
moveCounter = 300;
moveMode = 0;
mutekiFlag = false;
scorePoint = 300;
shotCount = 0;
shot_array = [new Point(-16, 0), new Point(16, 0), new Point(0, -16), new Point(0, 16)];
nowMass = 0;
beforeMass = 0;
defence_array = [];
defence_array[0] = [];
defence_array[1] = [];
defence_array[2] = [];
defence_array[3] = [];
defenceType = 0;
defencePoint = 0;
createDefencePoint();
defencePoint = defence_array[0][Math.floor((Math.random() * defence_array.length))];
anime_mc.gotoAndPlay("move0_3");
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
public function reverceDefence():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = Math.floor((_local5 / 20));
_local7 = (_local5 % 20);
if (_local6 < 8){
if (_local7 < 10){
defenceType = 0;
} else {
defenceType = 1;
};
} else {
if (_local7 < 10){
defenceType = 2;
} else {
defenceType = 3;
};
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
if (rootObj.chalMode == 1){
deadFlag = true;
deadStatus = 1;
animeCount = 14;
anime_mc.visible = false;
effect_mc.gotoAndPlay("dead");
anime_mc.gotoAndPlay("gem");
moveKey = -1;
rootObj.scoreTarget = (rootObj.scoreTarget + (rootObj.rate_array[rootObj.rate] * scorePoint));
var _local9 = rootObj.eaten_array;
var _local10:int;
var _local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
addKubi(0);
rootObj.playSe(7);
rootObj.playSe(16);
rootObj.noEatFlag = false;
} else {
rootObj.gameOver();
};
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function searchTarget():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = [];
_local1[0] = {x:-8, y:0};
_local1[1] = {x:8, y:0};
_local1[2] = {x:0, y:-8};
_local1[3] = {x:0, y:8};
_local2 = [];
_local3 = [];
_local2.push(rootObj.playerX);
_local3.push(rootObj.playerY);
_local4 = 1;
while (_local4 < 4) {
_local5 = (rootObj.playerX + (_local1[rootObj.faceKey].x * _local4));
_local6 = (rootObj.playerY + (_local1[rootObj.faceKey].y * _local4));
_local7 = rootObj.getMassNo(_local5, _local6);
_local7 = rootObj.getMassNo(rootObj.getXfromTile(_local7), rootObj.getYfromTile(_local7));
if (rootObj.map_array[_local7] == 0){
_local2.push(_local5);
_local3.push(_local6);
};
_local4++;
};
if (_local2.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = _local2.pop();
targetY = _local3.pop();
};
}
public function addKubi(_arg1:int):void{
var _local2:MovieClip;
var _local3:int;
_local2 = new KUBI_MC();
_local3 = rootObj.getMassNo(charaX, charaY);
_local2.charaX = charaX;
_local2.charaY = charaY;
_local2.charaType = _arg1;
_local2.x = rootObj.getQX(charaX, charaY);
_local2.y = rootObj.getQY(charaX, charaY);
rootObj.objCount++;
rootObj.itemStage_mc.addChild(_local2);
}
}
}//package
Section 56
//ENEMY1_MC (ENEMY1_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ENEMY1_MC extends MovieClip {
public var effect_mc:MovieClip;
public var deadCount:int;
public var moveCounter:int;
public var beforeMass:int;
public var moveMode:int;
public var bomCounter:int;
public var scorePoint:int;
public var targetX:int;
public var startX:int;
public var startY:int;
public var mutekiFlag:Boolean;
public var anime_mc:MovieClip;
public var powerStatus:int;
public var defencePoint:int;
public var deadStatus:int;
public var animeCount:int;
public var MODE_DEFENCE_TIME:int;
public var charaStatus:int;
public var moveY:int;
public var defence_array:Array;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var defenceType:int;
public var moveX:int;
public var moveKey:int;
public var MODE_ATTACK_TIME:int;
public var targetY:int;
public var charaX:int;
public var charaY:int;
public var nowMass:int;
public var deadFlag:Boolean;
public function ENEMY1_MC(){
addFrameScript(0, frame1);
}
public function reverceDefence():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = Math.floor((_local5 / 20));
_local7 = (_local5 % 20);
if (_local6 < 8){
if (_local7 < 10){
defenceType = 0;
} else {
defenceType = 1;
};
} else {
if (_local7 < 10){
defenceType = 2;
} else {
defenceType = 3;
};
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
if (rootObj.chalMode == 1){
deadFlag = true;
deadStatus = 1;
animeCount = 14;
anime_mc.visible = false;
effect_mc.gotoAndPlay("dead");
anime_mc.gotoAndPlay("gem");
moveKey = -1;
rootObj.scoreTarget = (rootObj.scoreTarget + (rootObj.rate_array[rootObj.rate] * scorePoint));
var _local9 = rootObj.eaten_array;
var _local10 = 1;
var _local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
addKubi(1);
rootObj.playSe(7);
rootObj.playSe(16);
rootObj.noEatFlag = false;
} else {
rootObj.gameOver();
};
};
}
public function createDefencePoint():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[0].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[1].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
_local1 = 8;
while (_local1 < 15) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[2].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[3].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
}
public function xEnterChara(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:*;
var _local8:MovieClip;
var _local9:int;
var _local10:int;
if (rootObj.waitFlag == false){
if (deadFlag == false){
moveCounter--;
if ((((rootObj.chalMode == 1)) && ((mutekiFlag == false)))){
mutekiFlag = true;
moveMode = 4;
beforeMass = -1;
nowMass = -1;
} else {
if ((((rootObj.chalMode == 0)) && ((mutekiFlag == true)))){
mutekiFlag = false;
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
} else {
if (moveCounter <= 0){
if (charaStatus == 0){
if (moveMode == 0){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
} else {
if (moveMode == 1){
moveMode = 0;
moveCounter = MODE_ATTACK_TIME;
};
};
} else {
if (moveMode == 1){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
};
};
};
};
};
targetX = 0;
targetY = 0;
if (moveMode == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
if (moveMode == 1){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
defenceType++;
if (defenceType >= 4){
defenceType = 0;
};
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
} else {
if (moveMode == 2){
searchSymmetric();
if ((((targetX == charaX)) && ((targetY == charaY)))){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
moveMode = 4;
};
} else {
if (moveMode == 4){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
};
};
};
if (((((charaX % 8) == 0)) && (((charaY % 8) == 0)))){
_local2 = rootObj.getMassNo(charaX, charaY);
if (nowMass != _local2){
beforeMass = nowMass;
nowMass = _local2;
};
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
if (_local3 == 0){
_local5 = [(rootObj.getMassNo(charaX, charaY) - 20), (rootObj.getMassNo(charaX, charaY) - 1), (rootObj.getMassNo(charaX, charaY) + 1), (rootObj.getMassNo(charaX, charaY) + 20)];
_local6 = [];
_local7 = 0;
while (_local7 < 4) {
if (_local5[_local7] != beforeMass){
if (rootObj.map_array[_local5[_local7]] == 0){
_local6.push(_local5[_local7]);
};
};
_local7++;
};
if (_local6.length != 0){
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
} else {
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), -1);
};
};
_local4 = (_local3 - _local2);
moveX = (_local4 % 20);
moveY = (_local4 / 20);
if (bomCounter <= 0){
if (charaStatus == 2){
_local8 = new BOM_MC();
} else {
_local8 = new BOM2_MC();
};
_local9 = rootObj.getMassNo(charaX, charaY);
_local8.charaX = charaX;
_local8.charaY = charaY;
_local8.x = rootObj.getQX(charaX, charaY);
_local8.y = rootObj.getQY(charaX, charaY);
rootObj.objCount++;
rootObj.itemStage_mc.addChild(_local8);
_local10 = 0;
if (charaStatus == 0){
_local10 = 150;
};
bomCounter = (200 - _local10);
};
};
bomCounter--;
charaX = (charaX + moveX);
charaY = (charaY + moveY);
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
if ((((moveX == -1)) && ((moveY == 0)))){
if (moveKey != 0){
moveKey = 0;
anime_mc.gotoAndPlay(((("move" + charaStatus) + "_") + moveKey));
};
} else {
if ((((moveX == 1)) && ((moveY == 0)))){
if (moveKey != 1){
moveKey = 1;
anime_mc.gotoAndPlay(((("move" + charaStatus) + "_") + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == -1)))){
if (moveKey != 2){
moveKey = 2;
anime_mc.gotoAndPlay(((("move" + charaStatus) + "_") + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == 1)))){
if (moveKey != 3){
moveKey = 3;
anime_mc.gotoAndPlay(((("move" + charaStatus) + "_") + moveKey));
};
};
};
};
};
hitCheck();
if (rootObj.madokaDead == true){
if (powerStatus == 0){
effect_mc.gotoAndPlay("dead");
moveKey = -1;
charaStatus = 0;
powerStatus = 1;
} else {
if (powerStatus == 1){
if (effect_mc.animationFlag == false){
rootObj.addMessage("homura power up!");
bomCounter = 10;
powerStatus = 2;
};
} else {
if (powerStatus == 2){
};
};
};
};
} else {
if (deadStatus == 1){
if (animeCount <= 0){
deadStatus = 2;
deadCount = 200;
charaX = startX;
charaY = startY;
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
anime_mc.visible = true;
} else {
animeCount--;
};
} else {
if (deadStatus == 2){
if (deadCount == 0){
deadStatus = 3;
animeCount = 33;
effect_mc.gotoAndPlay("revival");
rootObj.playSe(10);
} else {
deadCount--;
};
} else {
if (deadStatus == 3){
if (animeCount <= 0){
deadFlag = false;
anime_mc.visible = true;
rootObj.addMessage("homura was revived!");
effect_mc.gotoAndPlay("revival2");
rootObj.playSe(11);
} else {
animeCount--;
};
};
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
public function searchTarget():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = [];
_local1[0] = {x:-8, y:0};
_local1[1] = {x:8, y:0};
_local1[2] = {x:0, y:-8};
_local1[3] = {x:0, y:8};
_local2 = [];
_local3 = [];
_local2.push(rootObj.playerX);
_local3.push(rootObj.playerY);
_local4 = 1;
while (_local4 < 4) {
_local5 = (rootObj.playerX + (_local1[rootObj.faceKey].x * _local4));
_local6 = (rootObj.playerY + (_local1[rootObj.faceKey].y * _local4));
_local7 = rootObj.getMassNo(_local5, _local6);
_local7 = rootObj.getMassNo(rootObj.getXfromTile(_local7), rootObj.getYfromTile(_local7));
if (rootObj.map_array[_local7] == 0){
_local2.push(_local5);
_local3.push(_local6);
};
_local4++;
};
if (_local2.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = _local2.pop();
targetY = _local3.pop();
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function searchSymmetric():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Array;
var _local7:Array;
var _local8:*;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = [];
_local7 = [(_local5 - 21), (_local5 - 20), (_local5 - 19), (_local5 - 1), _local5, (_local5 + 1), (_local5 + 19), (_local5 + 20), (_local5 + 21)];
_local8 = 0;
while (_local8 < 9) {
if (rootObj.map_array[_local7[_local8]] == 0){
_local6.push(_local7[_local8]);
};
_local8++;
};
if (_local6.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
};
}
public function addKubi(_arg1:int):void{
var _local2:MovieClip;
var _local3:int;
_local2 = new KUBI_MC();
_local3 = rootObj.getMassNo(charaX, charaY);
_local2.charaX = charaX;
_local2.charaY = charaY;
_local2.charaType = _arg1;
_local2.x = rootObj.getQX(charaX, charaY);
_local2.y = rootObj.getQY(charaX, charaY);
rootObj.objCount++;
rootObj.itemStage_mc.addChild(_local2);
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
MODE_DEFENCE_TIME = 150;
MODE_ATTACK_TIME = (300 + (rootObj.stageNo * 35));
deleteFlag = false;
deadFlag = false;
deadCount = 0;
deadStatus = 0;
moveX = 0;
moveY = 0;
moveKey = -1;
charaStatus = 2;
powerStatus = 0;
targetX = 0;
targetY = 0;
moveCounter = 300;
moveMode = 1;
mutekiFlag = false;
scorePoint = 300;
bomCounter = 200;
animeCount = 14;
nowMass = 0;
beforeMass = 0;
defence_array = [];
defence_array[0] = [];
defence_array[1] = [];
defence_array[2] = [];
defence_array[3] = [];
defenceType = 1;
defencePoint = 0;
createDefencePoint();
defencePoint = defence_array[0][Math.floor((Math.random() * defence_array.length))];
anime_mc.gotoAndPlay("move2_3");
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 57
//ENEMY2_MC (ENEMY2_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ENEMY2_MC extends MovieClip {
public var effect_mc:MovieClip;
public var deadCount:int;
public var moveCounter:int;
public var beforeMass:int;
public var moveMode:int;
public var scorePoint:int;
public var targetX:int;
public var startX:int;
public var defencePoint:int;
public var startY:int;
public var mutekiFlag:Boolean;
public var anime_mc:MovieClip;
public var deadStatus:int;
public var animeCount:int;
public var MODE_DEFENCE_TIME:int;
public var moveY:int;
public var defence_array:Array;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var defenceType:int;
public var moveX:int;
public var moveKey:int;
public var MODE_ATTACK_TIME:int;
public var targetY:int;
public var charaX:int;
public var charaY:int;
public var nowMass:int;
public var deadFlag:Boolean;
public function ENEMY2_MC(){
addFrameScript(0, frame1);
}
public function reverceDefence():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = Math.floor((_local5 / 20));
_local7 = (_local5 % 20);
if (_local6 < 8){
if (_local7 < 10){
defenceType = 0;
} else {
defenceType = 1;
};
} else {
if (_local7 < 10){
defenceType = 2;
} else {
defenceType = 3;
};
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
if (rootObj.chalMode == 1){
deadFlag = true;
deadStatus = 1;
animeCount = 14;
anime_mc.visible = false;
effect_mc.gotoAndPlay("dead");
anime_mc.gotoAndPlay("gem");
moveKey = -1;
rootObj.scoreTarget = (rootObj.scoreTarget + (rootObj.rate_array[rootObj.rate] * scorePoint));
var _local9 = rootObj.eaten_array;
var _local10 = 2;
var _local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
addKubi(2);
rootObj.playSe(7);
rootObj.playSe(16);
rootObj.noEatFlag = false;
} else {
rootObj.gameOver();
};
};
}
public function createDefencePoint():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[0].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[1].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
_local1 = 8;
while (_local1 < 15) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[2].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[3].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
}
public function xEnterChara(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:*;
if (rootObj.waitFlag == false){
if (deadFlag == false){
moveCounter--;
if ((((rootObj.chalMode == 1)) && ((mutekiFlag == false)))){
mutekiFlag = true;
moveMode = 4;
beforeMass = -1;
nowMass = -1;
} else {
if ((((rootObj.chalMode == 0)) && ((mutekiFlag == true)))){
mutekiFlag = false;
moveMode = 0;
moveCounter = MODE_ATTACK_TIME;
} else {
if (moveCounter <= 0){
if (moveMode == 0){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
} else {
if (moveMode == 1){
moveMode = 0;
moveCounter = MODE_ATTACK_TIME;
};
};
};
};
};
targetX = 0;
targetY = 0;
if (moveMode == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
if (moveMode == 1){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
} else {
if (moveMode == 2){
searchSymmetric();
if ((((targetX == charaX)) && ((targetY == charaY)))){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
moveMode = 4;
};
} else {
if (moveMode == 4){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
};
};
};
if (((((charaX % 8) == 0)) && (((charaY % 8) == 0)))){
_local2 = rootObj.getMassNo(charaX, charaY);
if (nowMass != _local2){
beforeMass = nowMass;
nowMass = _local2;
};
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
if (_local3 == 0){
_local5 = [(rootObj.getMassNo(charaX, charaY) - 20), (rootObj.getMassNo(charaX, charaY) - 1), (rootObj.getMassNo(charaX, charaY) + 1), (rootObj.getMassNo(charaX, charaY) + 20)];
_local6 = [];
_local7 = 0;
while (_local7 < 4) {
if (_local5[_local7] != beforeMass){
if (rootObj.map_array[_local5[_local7]] == 0){
_local6.push(_local5[_local7]);
};
};
_local7++;
};
if (_local6.length != 0){
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
} else {
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), -1);
};
};
_local4 = (_local3 - _local2);
moveX = (_local4 % 20);
moveY = (_local4 / 20);
};
charaX = (charaX + moveX);
charaY = (charaY + moveY);
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
if ((((moveX == -1)) && ((moveY == 0)))){
if (moveKey != 0){
moveKey = 0;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 1)) && ((moveY == 0)))){
if (moveKey != 1){
moveKey = 1;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == -1)))){
if (moveKey != 2){
moveKey = 2;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == 1)))){
if (moveKey != 3){
moveKey = 3;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
};
};
};
};
hitCheck();
} else {
if (deadStatus == 1){
if (animeCount <= 0){
deadStatus = 2;
deadCount = 100;
charaX = startX;
charaY = startY;
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
anime_mc.visible = true;
} else {
animeCount--;
};
} else {
if (deadStatus == 2){
if (deadCount == 0){
deadStatus = 3;
animeCount = 33;
effect_mc.gotoAndPlay("revival");
rootObj.playSe(10);
} else {
deadCount--;
};
} else {
if (deadStatus == 3){
if (animeCount <= 0){
deadFlag = false;
anime_mc.visible = true;
rootObj.addMessage("sayaka was revived!");
effect_mc.gotoAndPlay("revival2");
rootObj.playSe(11);
} else {
animeCount--;
};
};
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
public function searchTarget():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = [];
_local1[0] = {x:-8, y:0};
_local1[1] = {x:8, y:0};
_local1[2] = {x:0, y:-8};
_local1[3] = {x:0, y:8};
_local2 = [];
_local3 = [];
_local2.push(rootObj.playerX);
_local3.push(rootObj.playerY);
_local4 = 1;
while (_local4 < 4) {
_local5 = (rootObj.playerX + (_local1[rootObj.faceKey].x * _local4));
_local6 = (rootObj.playerY + (_local1[rootObj.faceKey].y * _local4));
_local7 = rootObj.getMassNo(_local5, _local6);
_local7 = rootObj.getMassNo(rootObj.getXfromTile(_local7), rootObj.getYfromTile(_local7));
if (rootObj.map_array[_local7] == 0){
_local2.push(_local5);
_local3.push(_local6);
};
_local4++;
};
if (_local2.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = _local2.pop();
targetY = _local3.pop();
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function searchSymmetric():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Array;
var _local7:Array;
var _local8:*;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = [];
_local7 = [(_local5 - 21), (_local5 - 20), (_local5 - 19), (_local5 - 1), _local5, (_local5 + 1), (_local5 + 19), (_local5 + 20), (_local5 + 21)];
_local8 = 0;
for (;_local8 < 9;_local8++) {
if (rootObj.map_array[_local7[_local8]] == 0){
if (_local7[_local8] != beforeMass){
_local6.push(_local7[_local8]);
continue;
};
};
};
if (_local6.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
};
}
public function addKubi(_arg1:int):void{
var _local2:MovieClip;
var _local3:int;
_local2 = new KUBI_MC();
_local3 = rootObj.getMassNo(charaX, charaY);
_local2.charaX = charaX;
_local2.charaY = charaY;
_local2.charaType = _arg1;
_local2.x = rootObj.getQX(charaX, charaY);
_local2.y = rootObj.getQY(charaX, charaY);
rootObj.objCount++;
rootObj.itemStage_mc.addChild(_local2);
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
MODE_DEFENCE_TIME = 150;
MODE_ATTACK_TIME = (300 + (rootObj.stageNo * 40));
deleteFlag = false;
deadFlag = false;
deadCount = 0;
deadStatus = 0;
moveX = 0;
moveY = 0;
moveKey = -1;
targetX = 0;
targetY = 0;
moveCounter = 300;
moveMode = 0;
animeCount = 14;
mutekiFlag = false;
scorePoint = 300;
nowMass = 0;
beforeMass = 0;
defence_array = [];
defence_array[0] = [];
defence_array[1] = [];
defence_array[2] = [];
defence_array[3] = [];
defenceType = 2;
defencePoint = 0;
createDefencePoint();
defencePoint = defence_array[0][Math.floor((Math.random() * defence_array.length))];
anime_mc.gotoAndPlay("move0_3");
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 58
//ENEMY3_MC (ENEMY3_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ENEMY3_MC extends MovieClip {
public var effect_mc:MovieClip;
public var deadCount:int;
public var moveCounter:int;
public var beforeMass:int;
public var moveMode:int;
public var scorePoint:int;
public var targetX:int;
public var startX:int;
public var defencePoint:int;
public var startY:int;
public var mutekiFlag:Boolean;
public var anime_mc:MovieClip;
public var deadStatus:int;
public var animeCount:int;
public var MODE_DEFENCE_TIME:int;
public var moveY:int;
public var defence_array:Array;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var defenceType:int;
public var moveX:int;
public var moveKey:int;
public var MODE_ATTACK_TIME:int;
public var targetY:int;
public var charaX:int;
public var charaY:int;
public var nowMass:int;
public var deadFlag:Boolean;
public function ENEMY3_MC(){
addFrameScript(0, frame1);
}
public function reverceDefence():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = Math.floor((_local5 / 20));
_local7 = (_local5 % 20);
if (_local6 < 8){
if (_local7 < 10){
defenceType = 0;
} else {
defenceType = 1;
};
} else {
if (_local7 < 10){
defenceType = 2;
} else {
defenceType = 3;
};
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
if (rootObj.chalMode == 1){
deadFlag = true;
deadStatus = 1;
animeCount = 14;
anime_mc.visible = false;
effect_mc.gotoAndPlay("dead");
anime_mc.gotoAndPlay("gem");
moveKey = -1;
rootObj.madokaDead = true;
rootObj.scoreTarget = (rootObj.scoreTarget + (rootObj.rate_array[rootObj.rate] * scorePoint));
var _local9 = rootObj.eaten_array;
var _local10 = 3;
var _local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
addKubi(3);
rootObj.playSe(7);
rootObj.playSe(16);
rootObj.noEatFlag = false;
} else {
rootObj.gameOver();
};
};
}
public function createDefencePoint():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[0].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[1].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
_local1 = 8;
while (_local1 < 15) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[2].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[3].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
}
public function xEnterChara(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:*;
if (rootObj.waitFlag == false){
if (deadFlag == false){
moveCounter--;
if ((((rootObj.chalMode == 1)) && ((mutekiFlag == false)))){
mutekiFlag = true;
moveMode = 4;
beforeMass = -1;
nowMass = -1;
} else {
if ((((rootObj.chalMode == 0)) && ((mutekiFlag == true)))){
mutekiFlag = false;
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
} else {
if (moveCounter <= 0){
if (moveMode == 0){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
} else {
if (moveMode == 1){
moveMode = 1;
moveCounter = MODE_ATTACK_TIME;
};
};
};
};
};
targetX = 0;
targetY = 0;
if (moveMode == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
if ((((targetX == charaX)) && ((targetY == charaY)))){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
};
} else {
if (moveMode == 1){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
defenceType--;
if (defenceType < 0){
defenceType = 3;
};
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
} else {
if (moveMode == 2){
searchSymmetric();
if ((((targetX == charaX)) && ((targetY == charaY)))){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
moveMode = 4;
};
} else {
if (moveMode == 4){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
};
};
};
if (((((charaX % 8) == 0)) && (((charaY % 8) == 0)))){
_local2 = rootObj.getMassNo(charaX, charaY);
if (nowMass != _local2){
beforeMass = nowMass;
nowMass = _local2;
};
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
if (_local3 == 0){
_local5 = [(rootObj.getMassNo(charaX, charaY) - 20), (rootObj.getMassNo(charaX, charaY) - 1), (rootObj.getMassNo(charaX, charaY) + 1), (rootObj.getMassNo(charaX, charaY) + 20)];
_local6 = [];
_local7 = 0;
while (_local7 < 4) {
if (_local5[_local7] != beforeMass){
if (rootObj.map_array[_local5[_local7]] == 0){
_local6.push(_local5[_local7]);
};
};
_local7++;
};
if (_local6.length != 0){
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
} else {
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), -1);
};
};
_local4 = (_local3 - _local2);
moveX = (_local4 % 20);
moveY = (_local4 / 20);
};
charaX = (charaX + moveX);
charaY = (charaY + moveY);
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
if ((((moveX == -1)) && ((moveY == 0)))){
if (moveKey != 0){
moveKey = 0;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 1)) && ((moveY == 0)))){
if (moveKey != 1){
moveKey = 1;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == -1)))){
if (moveKey != 2){
moveKey = 2;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == 1)))){
if (moveKey != 3){
moveKey = 3;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
};
};
};
};
hitCheck();
} else {
if (deadStatus == 1){
if (animeCount <= 0){
deadStatus = 2;
deadCount = 200;
charaX = startX;
charaY = startY;
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
anime_mc.visible = true;
} else {
animeCount--;
};
} else {
if (deadStatus == 2){
if (deadCount == 0){
deadStatus = 3;
animeCount = 33;
effect_mc.gotoAndPlay("revival");
rootObj.playSe(10);
} else {
deadCount--;
};
} else {
if (deadStatus == 3){
if (animeCount <= 0){
deadFlag = false;
anime_mc.visible = true;
rootObj.addMessage("madoka was revived!");
effect_mc.gotoAndPlay("revival2");
rootObj.playSe(11);
} else {
animeCount--;
};
};
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
public function searchTarget():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = [];
_local1[0] = {x:-8, y:0};
_local1[1] = {x:8, y:0};
_local1[2] = {x:0, y:-8};
_local1[3] = {x:0, y:8};
_local2 = [];
_local3 = [];
_local2.push(rootObj.playerX);
_local3.push(rootObj.playerY);
_local4 = 1;
while (_local4 < 4) {
_local5 = (rootObj.playerX + (_local1[rootObj.faceKey].x * _local4));
_local6 = (rootObj.playerY + (_local1[rootObj.faceKey].y * _local4));
_local7 = rootObj.getMassNo(_local5, _local6);
_local7 = rootObj.getMassNo(rootObj.getXfromTile(_local7), rootObj.getYfromTile(_local7));
if (rootObj.map_array[_local7] == 0){
_local2.push(_local5);
_local3.push(_local6);
};
_local4++;
};
if (_local2.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = _local2.pop();
targetY = _local3.pop();
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function searchSymmetric():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Array;
var _local7:Array;
var _local8:*;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = [];
_local7 = [(_local5 - 21), (_local5 - 20), (_local5 - 19), (_local5 - 1), _local5, (_local5 + 1), (_local5 + 19), (_local5 + 20), (_local5 + 21)];
_local8 = 0;
while (_local8 < 9) {
if (rootObj.map_array[_local7[_local8]] == 0){
_local6.push(_local7[_local8]);
};
_local8++;
};
if (_local6.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
};
}
public function addKubi(_arg1:int):void{
var _local2:MovieClip;
var _local3:int;
_local2 = new KUBI_MC();
_local3 = rootObj.getMassNo(charaX, charaY);
_local2.charaX = charaX;
_local2.charaY = charaY;
_local2.charaType = _arg1;
_local2.x = rootObj.getQX(charaX, charaY);
_local2.y = rootObj.getQY(charaX, charaY);
rootObj.objCount++;
rootObj.itemStage_mc.addChild(_local2);
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
MODE_DEFENCE_TIME = 150;
MODE_ATTACK_TIME = (300 + (rootObj.stageNo * 45));
deleteFlag = false;
deadFlag = false;
deadCount = 0;
deadStatus = 0;
moveX = 0;
moveY = 0;
moveKey = -1;
targetX = 0;
targetY = 0;
moveCounter = 300;
moveMode = 1;
animeCount = 14;
mutekiFlag = false;
scorePoint = 300;
nowMass = 0;
beforeMass = 0;
defence_array = [];
defence_array[0] = [];
defence_array[1] = [];
defence_array[2] = [];
defence_array[3] = [];
defenceType = 3;
defencePoint = 0;
createDefencePoint();
defencePoint = defence_array[0][Math.floor((Math.random() * defence_array.length))];
anime_mc.gotoAndPlay("move0_3");
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 59
//ENEMY4_MC (ENEMY4_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ENEMY4_MC extends MovieClip {
public var effect_mc:MovieClip;
public var deadCount:int;
public var moveCounter:int;
public var beforeMass:int;
public var moveMode:int;
public var scorePoint:int;
public var targetX:int;
public var startX:int;
public var defencePoint:int;
public var startY:int;
public var mutekiFlag:Boolean;
public var anime_mc:MovieClip;
public var deadStatus:int;
public var animeCount:int;
public var MODE_DEFENCE_TIME:int;
public var moveY:int;
public var defence_array:Array;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var defenceType:int;
public var moveX:int;
public var moveKey:int;
public var MODE_ATTACK_TIME:int;
public var targetY:int;
public var charaX:int;
public var charaY:int;
public var nowMass:int;
public var deadFlag:Boolean;
public function ENEMY4_MC(){
addFrameScript(0, frame1);
}
public function reverceDefence():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = Math.floor((_local5 / 20));
_local7 = (_local5 % 20);
if (_local6 < 8){
if (_local7 < 10){
defenceType = 0;
} else {
defenceType = 1;
};
} else {
if (_local7 < 10){
defenceType = 2;
} else {
defenceType = 3;
};
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
if (rootObj.chalMode == 1){
deadFlag = true;
deadStatus = 1;
animeCount = 14;
anime_mc.visible = false;
effect_mc.gotoAndPlay("dead");
anime_mc.gotoAndPlay("gem");
moveKey = -1;
rootObj.scoreTarget = (rootObj.scoreTarget + (rootObj.rate_array[rootObj.rate] * scorePoint));
var _local9 = rootObj.eaten_array;
var _local10 = 4;
var _local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
addKubi(4);
rootObj.playSe(7);
rootObj.playSe(16);
rootObj.noEatFlag = false;
} else {
rootObj.gameOver();
};
};
}
public function createDefencePoint():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 8) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[0].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[1].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
_local1 = 8;
while (_local1 < 15) {
_local2 = 0;
while (_local2 < 10) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[2].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local2 = 10;
while (_local2 < rootObj.MASS_WIDTH_MAX) {
if (rootObj.map_array[((_local1 * 20) + _local2)] == 0){
defence_array[3].push(((_local1 * 20) + _local2));
};
_local2++;
};
_local1++;
};
}
public function xEnterChara(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:*;
if (rootObj.waitFlag == false){
if (deadFlag == false){
moveCounter--;
if ((((rootObj.chalMode == 1)) && ((mutekiFlag == false)))){
mutekiFlag = true;
moveMode = 4;
beforeMass = -1;
nowMass = -1;
} else {
if ((((rootObj.chalMode == 0)) && ((mutekiFlag == true)))){
mutekiFlag = false;
moveMode = 0;
moveCounter = MODE_ATTACK_TIME;
} else {
if (moveCounter <= 0){
if (moveMode == 0){
moveMode = 1;
moveCounter = MODE_DEFENCE_TIME;
} else {
if (mutekiFlag == false){
moveMode = 0;
moveCounter = MODE_ATTACK_TIME;
};
};
};
};
};
targetX = 0;
targetY = 0;
if (moveMode == 0){
searchTarget();
if ((((targetX == charaX)) && ((targetY == charaY)))){
effect_mc.visible = true;
moveMode = 3;
moveCounter = MODE_DEFENCE_TIME;
};
} else {
if (moveMode == 1){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
} else {
if (moveMode == 2){
searchSymmetric();
if ((((targetX == charaX)) && ((targetY == charaY)))){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
moveMode = 4;
};
} else {
if (moveMode == 3){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
if (moveMode == 4){
if (rootObj.getMassNo(charaX, charaY) == defencePoint){
reverceDefence();
defencePoint = defence_array[defenceType][Math.floor((Math.random() * defence_array[defenceType].length))];
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
targetX = rootObj.getXfromTile(defencePoint);
targetY = rootObj.getYfromTile(defencePoint);
};
};
};
};
};
if (((((charaX % 8) == 0)) && (((charaY % 8) == 0)))){
_local2 = rootObj.getMassNo(charaX, charaY);
if (nowMass != _local2){
beforeMass = nowMass;
nowMass = _local2;
};
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
if (_local3 == 0){
_local5 = [(rootObj.getMassNo(charaX, charaY) - 20), (rootObj.getMassNo(charaX, charaY) - 1), (rootObj.getMassNo(charaX, charaY) + 1), (rootObj.getMassNo(charaX, charaY) + 20)];
_local6 = [];
_local7 = 0;
while (_local7 < 4) {
if (_local5[_local7] != beforeMass){
if (rootObj.map_array[_local5[_local7]] == 0){
_local6.push(_local5[_local7]);
};
};
_local7++;
};
if (_local6.length != 0){
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), beforeMass);
} else {
_local3 = rootObj.solve(rootObj.getMassNo(charaX, charaY), rootObj.getMassNo(targetX, targetY), -1);
};
};
_local4 = (_local3 - _local2);
moveX = (_local4 % 20);
moveY = (_local4 / 20);
};
charaX = (charaX + moveX);
charaY = (charaY + moveY);
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
if ((((moveX == -1)) && ((moveY == 0)))){
if (moveKey != 0){
moveKey = 0;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 1)) && ((moveY == 0)))){
if (moveKey != 1){
moveKey = 1;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == -1)))){
if (moveKey != 2){
moveKey = 2;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
} else {
if ((((moveX == 0)) && ((moveY == 1)))){
if (moveKey != 3){
moveKey = 3;
anime_mc.gotoAndPlay(("move0_" + moveKey));
};
};
};
};
};
hitCheck();
} else {
if (deadStatus == 1){
if (animeCount <= 0){
deadStatus = 2;
deadCount = 200;
charaX = startX;
charaY = startY;
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
anime_mc.visible = true;
} else {
animeCount--;
};
} else {
if (deadStatus == 2){
if (deadCount == 0){
deadStatus = 3;
animeCount = 33;
effect_mc.gotoAndPlay("revival");
rootObj.playSe(10);
} else {
deadCount--;
};
} else {
if (deadStatus == 3){
if (animeCount <= 0){
deadFlag = false;
anime_mc.visible = true;
rootObj.addMessage("kyoko was revived!");
effect_mc.gotoAndPlay("revival2");
rootObj.playSe(11);
} else {
animeCount--;
};
};
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
public function searchTarget():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = [];
_local1[0] = {x:-8, y:0};
_local1[1] = {x:8, y:0};
_local1[2] = {x:0, y:-8};
_local1[3] = {x:0, y:8};
_local2 = [];
_local3 = [];
_local2.push(rootObj.playerX);
_local3.push(rootObj.playerY);
_local4 = 1;
while (_local4 < 4) {
_local5 = (rootObj.playerX + (_local1[rootObj.faceKey].x * _local4));
_local6 = (rootObj.playerY + (_local1[rootObj.faceKey].y * _local4));
_local7 = rootObj.getMassNo(_local5, _local6);
_local7 = rootObj.getMassNo(rootObj.getXfromTile(_local7), rootObj.getYfromTile(_local7));
if (rootObj.map_array[_local7] == 0){
_local2.push(_local5);
_local3.push(_local6);
};
_local4++;
};
if (_local2.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = _local2.pop();
targetY = _local3.pop();
};
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function searchSymmetric():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Array;
var _local7:Array;
var _local8:*;
_local1 = rootObj.playerX;
_local2 = rootObj.playerY;
_local3 = (152 - _local1);
_local4 = (112 - _local2);
_local5 = rootObj.getMassNo(_local3, _local4);
_local6 = [];
_local7 = [(_local5 - 21), (_local5 - 20), (_local5 - 19), (_local5 - 1), _local5, (_local5 + 1), (_local5 + 19), (_local5 + 20), (_local5 + 21)];
_local8 = 0;
while (_local8 < 9) {
if (rootObj.map_array[_local7[_local8]] == 0){
_local6.push(_local7[_local8]);
};
_local8++;
};
if (_local6.length == 0){
targetX = rootObj.playerX;
targetY = rootObj.playerY;
} else {
targetX = rootObj.getXfromTile(_local6[0]);
targetY = rootObj.getYfromTile(_local6[0]);
};
}
public function addKubi(_arg1:int):void{
var _local2:MovieClip;
var _local3:int;
_local2 = new KUBI_MC();
_local3 = rootObj.getMassNo(charaX, charaY);
_local2.charaX = charaX;
_local2.charaY = charaY;
_local2.charaType = _arg1;
_local2.x = rootObj.getQX(charaX, charaY);
_local2.y = rootObj.getQY(charaX, charaY);
rootObj.objCount++;
rootObj.itemStage_mc.addChild(_local2);
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
MODE_DEFENCE_TIME = 150;
MODE_ATTACK_TIME = (300 + (rootObj.stageNo * 30));
deleteFlag = false;
deadFlag = false;
deadCount = 0;
deadStatus = 0;
moveX = 0;
moveY = 0;
moveKey = -1;
targetX = 0;
targetY = 0;
moveCounter = 300;
moveMode = 0;
animeCount = 14;
mutekiFlag = false;
scorePoint = 300;
nowMass = 0;
beforeMass = 0;
defence_array = [];
defence_array[0] = [];
defence_array[1] = [];
defence_array[2] = [];
defence_array[3] = [];
defenceType = 0;
defencePoint = 0;
createDefencePoint();
defencePoint = defence_array[0][Math.floor((Math.random() * defence_array.length))];
anime_mc.gotoAndPlay("move0_3");
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 60
//GraphicsLib (GraphicsLib)
package {
import flash.display.*;
import flash.geom.*;
public class GraphicsLib {
private static const RIGHT_ANGLE:Number = 1.5707963267949;
public static function getControlPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Point{
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
_local7 = (_arg4 - _arg1);
_local8 = (_arg5 - _arg2);
_local9 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
_local10 = Math.atan2(_local8, _local7);
_local11 = ((_local9 * Math.sin((_arg6 - _local10))) / Math.sin((_arg6 - _arg3)));
_local12 = (_arg1 + (_local11 * Math.cos(_arg3)));
_local13 = (_arg2 + (_local11 * Math.sin(_arg3)));
return (new Point(_local12, _local13));
}
public static function drawPie(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false):void{
var _local8:int;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:int;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Point;
_local8 = Math.max(1, Math.floor((Math.abs((_arg5 - _arg6)) / 0.4)));
_local12 = 0;
while (_local12 <= _local8) {
_local13 = (_arg5 + (((_arg6 - _arg5) * _local12) / _local8));
_local14 = ((Math.cos(_local13) * _arg4) + _arg2);
_local15 = ((Math.sin(_local13) * _arg4) + _arg3);
if (_local12 == 0){
if (_arg7){
_arg1.lineTo(_local14, _local15);
} else {
_arg1.moveTo(_local14, _local15);
};
} else {
_local16 = getControlPoint(_local9, _local10, (_local11 + RIGHT_ANGLE), _local14, _local15, (_local13 + RIGHT_ANGLE));
_arg1.curveTo(_local16.x, _local16.y, _local14, _local15);
};
_local9 = _local14;
_local10 = _local15;
_local11 = _local13;
_local12++;
};
}
}
}//package
Section 61
//ITEM0_MC (ITEM0_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ITEM0_MC extends MovieClip {
public var charaX:int;
public var randomNo:int;
public var upRate:int;
public var scorePoint:int;
public var moveSpeedX:Number;
public var moveSpeedY:Number;
public var item_array:Array;
public var sweet_array:Array;
public var okashi_mc:MovieClip;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var massNo:int;
public var getFlag:Boolean;
public var itemType:int;
public var charaY:int;
public function ITEM0_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
rootObj = null;
this.parent.removeChild(this);
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))) && ((rootObj.gameOverFlag == false)))){
rootObj.gotItem_array[massNo] = 1;
rootObj.rateTarget = (rootObj.rateTarget + upRate);
rootObj.scoreTarget = (rootObj.scoreTarget + (rootObj.rate_array[rootObj.rate] * scorePoint));
var _local9 = rootObj.eaten_array;
var _local10 = 5;
var _local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
rootObj.addMessage((((sweet_array[randomNo] + " ") + (rootObj.rate_array[rootObj.rate] * scorePoint)) + "P"));
rootObj.stageClear();
getFlag = true;
rootObj.playSe(3);
};
}
public function xEnterChara(_arg1:Event):void{
if (getFlag == false){
hitCheck();
} else {
if (getFlag == true){
this.x = (this.x + moveSpeedX);
this.y = (this.y + moveSpeedY);
if ((((((this.x >= 49)) && ((this.x <= 53)))) && ((((this.y >= 213)) && ((this.y <= 217)))))){
rootObj.balloon_mc.alpha = 1;
rootObj.balloonCount = 30;
rootObj.balloon_mc.okashi_mc.gotoAndStop(("no" + randomNo));
rootObj.circle_mc.gotoAndPlay("start");
deleteFlag = true;
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
sweet_array = ["APPLE", "PEAR", "GREEN APPLE", "LEMON CANDY", "MELON CANDY", "MILKY", "MAPLE DONUT", "ICHIGO DONUT", "MATCHA DONUT", "OLD F", "CHOCO DOUNT", "WHITE CHOCO", "ICHIGO CHOCO", "SUAMA", "M CASTELLA", "CASTELLA3", "MINT ICE", "LEMON SHERBET", "ICHIGO ICE", "POCKY", "PRETZ", "MILK POCKY", "UMAIBO NATTO", "UMAIBO CHEEZE", "UMAIBO MENTAI", "UMAIBO SALAD", "CHOCO CAKE", "ICHIGO CAKE", "DONUT", "DONUT", "APPLE", "CANDY", "DANGO", "DONUT", "DONUT"];
item_array = [];
item_array[0] = [0, 1, 2];
item_array[1] = [3, 4, 5];
item_array[2] = [6, 7, 8, 9];
item_array[3] = [10, 11, 12];
item_array[4] = [13, 14, 15];
item_array[5] = [16, 17, 18];
item_array[6] = [19, 20, 21];
item_array[7] = [22, 23, 24, 25];
item_array[8] = [26, 27];
itemType = (rootObj.stageNo % 9);
if (rootObj.stageNo == 29){
itemType = 0;
};
randomNo = item_array[itemType][Math.floor((Math.random() * item_array[itemType].length))];
getFlag = false;
moveSpeedX = ((52 - this.x) / 10);
moveSpeedY = ((215 - this.y) / 10);
scorePoint = 30;
upRate = 15;
deleteFlag = false;
okashi_mc.gotoAndStop(("no" + randomNo));
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 62
//ITEM1_MC (ITEM1_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ITEM1_MC extends MovieClip {
public var upRate:int;
public var scorePoint:int;
public var moveSpeedX:Number;
public var moveSpeedY:Number;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var massNo:int;
public var getFlag:Boolean;
public var charaX:int;
public var charaY:int;
public function ITEM1_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
rootObj = null;
this.parent.removeChild(this);
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:int;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))) && ((rootObj.gameOverFlag == false)))){
rootObj.gotItem_array[massNo] = 1;
rootObj.rateTarget = (rootObj.rateTarget + upRate);
rootObj.scoreTarget = (rootObj.scoreTarget + (rootObj.rate_array[rootObj.rate] * scorePoint));
var _local10 = rootObj.eaten_array;
var _local11 = 5;
var _local12 = (_local10[_local11] + 1);
_local10[_local11] = _local12;
rootObj.addMessage(((("CHEESE !" + " ") + (rootObj.rate_array[rootObj.rate] * scorePoint)) + "P"));
rootObj.stageClear();
rootObj.playSe(3);
if (rootObj.stageClearFlag == false){
rootObj.chalMode = 1;
_local9 = rootObj.moveKey;
if (rootObj.moveKey == -1){
_local9 = 1;
};
if (rootObj.chalCount == 0){
rootObj.back_mc.mask_mc.gotoAndPlay("start");
};
rootObj.chara_mc.player_mc.effect_mc.gotoAndPlay("change");
rootObj.chara_mc.player_mc.anime_mc.gotoAndPlay(((("move" + rootObj.chalMode) + "_") + _local9));
rootObj.chara_mc.player_mc.alpha = 1;
rootObj.chara_mc.tail0_mc.visible = true;
rootObj.chara_mc.tail1_mc.visible = true;
rootObj.playerSpeed = 2;
rootObj.chalCount = 200;
rootObj.eatGra_mc.gotoAndStop("chara1");
rootObj.chalGage_mc.visible = true;
rootObj.playSe(4);
if (((!((rootObj.playBgmNo == 1))) && (!((rootObj.playBgmNo == 2))))){
rootObj.stopBgm();
if (((rootObj.stageNo + 1) % 5) == 0){
rootObj.playBgmLoop(2);
} else {
rootObj.playBgmLoop(1);
};
};
};
getFlag = true;
};
}
public function xEnterChara(_arg1:Event):void{
if (getFlag == false){
hitCheck();
} else {
if (getFlag == true){
this.x = (this.x + moveSpeedX);
this.y = (this.y + moveSpeedY);
if ((((((this.x >= 49)) && ((this.x <= 53)))) && ((((this.y >= 213)) && ((this.y <= 217)))))){
rootObj.circle_mc.gotoAndPlay("start");
rootObj.balloon_mc.alpha = 1;
rootObj.balloonCount = 30;
rootObj.balloon_mc.okashi_mc.gotoAndStop("cheese");
deleteFlag = true;
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
getFlag = false;
moveSpeedX = ((52 - this.x) / 10);
moveSpeedY = ((215 - this.y) / 10);
scorePoint = 30;
upRate = 15;
deleteFlag = false;
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 63
//KUBI_MC (KUBI_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class KUBI_MC extends MovieClip {
public var moveSpeedX:Number;
public var moveSpeedY:Number;
public var anime_mc:MovieClip;
public var charaType:int;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var chara_array:Array;
public var charaX:int;
public var charaY:int;
public function KUBI_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function xEnterChara(_arg1:Event):void{
this.x = (this.x + moveSpeedX);
this.y = (this.y + moveSpeedY);
if ((((((this.x >= 49)) && ((this.x <= 53)))) && ((((this.y >= 213)) && ((this.y <= 217)))))){
rootObj.balloon_mc.alpha = 1;
rootObj.balloonCount = 30;
rootObj.balloon_mc.okashi_mc.gotoAndStop(("kubi" + charaType));
rootObj.circle_mc.gotoAndPlay("start");
rootObj.addMessage((((("eat" + chara_array[charaType]) + "! ") + (rootObj.rate_array[rootObj.rate] * 300)) + "P"));
deleteFlag = true;
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
deleteFlag = false;
moveSpeedX = ((52 - this.x) / 10);
moveSpeedY = ((215 - this.y) / 10);
chara_array = ["MAMI", "HOMURA", "SAYAKA", "MADOKA", "KYOKO"];
anime_mc.gotoAndStop(("no" + charaType));
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 64
//MASS0_MC (MASS0_MC)
package {
import flash.display.*;
public dynamic class MASS0_MC extends MovieClip {
public function MASS0_MC(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 65
//MASS1_MC (MASS1_MC)
package {
import flash.display.*;
public dynamic class MASS1_MC extends MovieClip {
}
}//package
Section 66
//MINIMASS0_MC (MINIMASS0_MC)
package {
import flash.display.*;
public dynamic class MINIMASS0_MC extends MovieClip {
}
}//package
Section 67
//MINIMASS1_MC (MINIMASS1_MC)
package {
import flash.display.*;
public dynamic class MINIMASS1_MC extends MovieClip {
}
}//package
Section 68
//PLAYER_MC (PLAYER_MC)
package {
import flash.display.*;
public dynamic class PLAYER_MC extends MovieClip {
public var effect_mc:MovieClip;
public var anime_mc:MovieClip;
public var deleteFlag:Boolean;
public function PLAYER_MC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
deleteFlag = false;
}
}
}//package
Section 69
//power0 (power0)
package {
import flash.media.*;
public dynamic class power0 extends Sound {
}
}//package
Section 70
//power1 (power1)
package {
import flash.media.*;
public dynamic class power1 extends Sound {
}
}//package
Section 71
//reverce0 (reverce0)
package {
import flash.media.*;
public dynamic class reverce0 extends Sound {
}
}//package
Section 72
//reverce1 (reverce1)
package {
import flash.media.*;
public dynamic class reverce1 extends Sound {
}
}//package
Section 73
//reverce2 (reverce2)
package {
import flash.media.*;
public dynamic class reverce2 extends Sound {
}
}//package
Section 74
//SHOT_MC (SHOT_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SHOT_MC extends MovieClip {
public var effect_mc:MovieClip;
public var move_array:Array;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var charaX:int;
public var charaY:int;
public var moveTurn:int;
public function SHOT_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
this.parent.removeChild(this);
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = (rootObj.chara_mc.player_mc.x - 8);
_local2 = (rootObj.chara_mc.player_mc.x + 8);
_local3 = (rootObj.chara_mc.player_mc.y + 4);
_local4 = (rootObj.chara_mc.player_mc.y + 12);
_local5 = (this.x - 8);
_local6 = (this.x + 8);
_local7 = (this.y + 4);
_local8 = (this.y + 12);
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
rootObj.gameOver();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
deleteFlag = false;
move_array = [new Point(-4, 0), new Point(4, 0), new Point(0, -4), new Point(0, 4)];
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
public function xEnterChara(_arg1:Event):void{
if (rootObj.waitFlag == false){
charaX = (charaX + move_array[moveTurn].x);
charaY = (charaY + move_array[moveTurn].y);
this.x = rootObj.getQX(charaX, charaY);
this.y = rootObj.getQY(charaX, charaY);
hitCheck();
if ((((((((this.x >= 600)) || ((this.x <= -50)))) || ((this.y >= 325)))) || ((this.y <= -50)))){
deleteFlag = true;
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
}
}//package
Section 75
//tiro0 (tiro0)
package {
import flash.media.*;
public dynamic class tiro0 extends Sound {
}
}//package
Section 76
//tiro1 (tiro1)
package {
import flash.media.*;
public dynamic class tiro1 extends Sound {
}
}//package
Section 77
//warp0 (warp0)
package {
import flash.media.*;
public dynamic class warp0 extends Sound {
}
}//package
Section 78
//WARP0_MC (WARP0_MC)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class WARP0_MC extends MovieClip {
public var upRate:int;
public var scorePoint:int;
public var moveSpeedX:Number;
public var moveSpeedY:Number;
public var i;
public var warpMassNo:int;
public var warpStatus:int;
public var rootObj:MovieClip;
public var deleteFlag:Boolean;
public var massNo:int;
public var getFlag:Boolean;
public var charaX:int;
public var charaY:int;
public function WARP0_MC(){
addFrameScript(0, frame1);
}
public function removeThisObject():void{
if (rootObj != null){
removeEventListener(Event.ENTER_FRAME, xEnterChara);
rootObj.objCount--;
rootObj = null;
this.parent.removeChild(this);
};
}
public function hitCheck():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = (rootObj.chara_mc.player_mc.x - 1);
_local2 = (rootObj.chara_mc.player_mc.x + 1);
_local3 = (rootObj.chara_mc.player_mc.y + 8);
_local4 = (rootObj.chara_mc.player_mc.y + 9);
_local5 = (this.x - 1);
_local6 = (this.x + 1);
_local7 = (this.y + 8);
_local8 = (this.y + 9);
_local9 = (this.x - 8);
_local10 = (this.x + 8);
_local11 = (this.y + 4);
_local12 = (this.y + 12);
if ((((((((_local1 < _local10)) && ((_local2 > _local9)))) && ((_local3 < _local12)))) && ((_local4 > _local11)))){
if ((((((((_local1 < _local6)) && ((_local2 > _local5)))) && ((_local3 < _local8)))) && ((_local4 > _local7)))){
if (rootObj.warp0Flag == true){
warpStatus = 1;
rootObj.autoFlag = true;
rootObj.playSe(13);
rootObj.playSe(15);
};
} else {
rootObj.warp0Flag = true;
};
};
}
public function xEnterChara(_arg1:Event):void{
var _local2:*;
if (rootObj.waitFlag == false){
if (warpStatus == 0){
hitCheck();
} else {
if (warpStatus == 1){
rootObj.chara_mc.player_mc.anime_mc.alpha = (rootObj.chara_mc.player_mc.anime_mc.alpha - 0.05);
rootObj.chara_mc.tail0_mc.alpha = (rootObj.chara_mc.tail0_mc.alpha - 0.05);
rootObj.chara_mc.tail1_mc.alpha = (rootObj.chara_mc.tail1_mc.alpha - 0.05);
if (rootObj.chara_mc.player_mc.anime_mc.alpha <= 0){
rootObj.warp0Flag = false;
rootObj.playerX = ((warpMassNo % rootObj.MASS_WIDTH_MAX) * 8);
rootObj.playerY = (Math.floor((warpMassNo / rootObj.MASS_WIDTH_MAX)) * 8);
warpStatus = 2;
_local2 = 0;
while (_local2 < 5) {
rootObj.tail_array[_local2] = new Point(999, 999);
_local2++;
};
};
} else {
if (warpStatus == 2){
rootObj.chara_mc.tail0_mc.alpha = (rootObj.chara_mc.tail0_mc.alpha + 0.05);
rootObj.chara_mc.tail1_mc.alpha = (rootObj.chara_mc.tail1_mc.alpha + 0.05);
rootObj.chara_mc.player_mc.anime_mc.alpha = (rootObj.chara_mc.player_mc.anime_mc.alpha + 0.05);
if (rootObj.chara_mc.player_mc.anime_mc.alpha >= 1){
rootObj.chara_mc.player_mc.anime_mc.alpha = 1;
rootObj.autoFlag = false;
warpStatus = 0;
};
};
};
};
};
if (rootObj.deleteFlag == true){
deleteFlag = true;
};
if (deleteFlag == true){
removeThisObject();
};
}
function frame1(){
stop();
rootObj = (this.root as MovieClip);
getFlag = false;
moveSpeedX = ((52 - this.x) / 10);
moveSpeedY = ((215 - this.y) / 10);
scorePoint = 30;
upRate = 15;
deleteFlag = false;
warpMassNo = 0;
warpStatus = 0;
i = 0;
while (i < rootObj.warp_array[0].length) {
if (rootObj.warp_array[0][i] != massNo){
warpMassNo = rootObj.warp_array[0][i];
};
i++;
};
addEventListener(Event.ENTER_FRAME, xEnterChara);
}
}
}//package
Section 79
//warp1 (warp1)
package {
import flash.media.*;
public dynamic class warp1 extends Sound {
}
}//package