Frame 1
Stage.showMenu = false;
_global.showRedrawRegions(false);
if (this.getBytesLoaded() >= this.getBytesTotal()) {
this.gotoAndStop(10);
}
Frame 2
cnt = 0;
while (cnt < 3) {
this["N" + cnt].gotoAndStop(1);
cnt++;
}
cnt = 0;
while (cnt <= 9) {
this["C" + cnt].gotoAndStop(1);
this["C" + cnt]._visible = false;
cnt++;
}
curPer = 0;
Frame 3
nowPer = Math.floor((this.getBytesLoaded() * 100) / this.getBytesTotal());
if (curPer < nowPer) {
curPer = Math.min(curPer + 5, nowPer);
this.N0.gotoAndStop((curPer % 10) + 1);
this.N1.gotoAndStop((Math.floor(curPer / 10) % 10) + 1);
this.N2.gotoAndStop((Math.floor(curPer / 100) % 10) + 1);
this.N1._visible = curPer >= 10;
this.N2._visible = curPer >= 100;
}
result = true;
cnt = 0;
while (cnt < 10) {
if (curPer >= ((cnt + 1) * 10)) {
mc = this["C" + cnt];
if (!mc._visible) {
mc._visible = true;
mc._xscale = 0;
}
if (mc._xscale < 100) {
mc._xscale = mc._xscale + 10;
result = false;
}
} else {
result = false;
}
cnt++;
}
if (result) {
this.gotoAndStop(10);
}
Frame 4
prevFrame();
play();
Frame 10
var appli = (new app.FairiesCouple());
appli.init(this);
var gm = app.sys.SysInfo.__get__GameMode();
gm.setNormalMode();
this.onEnterFrame = function () {
appli.move();
};
appli.move();
fscommand ("showmenu ", false);
stop();
Frame 11
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 1
Hit._visible = false;
stop();
Symbol 113 MovieClip Frame 1
Hit._visible = false;
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 68
SoundBtn._visible = true;
Symbol 121 MovieClip Frame 85
stop();
Symbol 131 MovieClip [DebugMC] Frame 1
stop();
Symbol 135 MovieClip [FPSMC] Frame 1
stop();
Symbol 514 MovieClip Frame 1
stop();
Symbol 526 MovieClip [CardMC] Frame 1
this.Card.cacheAsBitmap = false;
isEnd = false;
Symbol 526 MovieClip [CardMC] Frame 9
this.Card.cacheAsBitmap = true;
isEnd = true;
stop();
Symbol 526 MovieClip [CardMC] Frame 10
this.Card.cacheAsBitmap = false;
isEnd = false;
Symbol 526 MovieClip [CardMC] Frame 18
this.Card.cacheAsBitmap = true;
isEnd = true;
stop();
Symbol 526 MovieClip [CardMC] Frame 19
isEnd = false;
this.Card.cacheAsBitmap = false;
Symbol 526 MovieClip [CardMC] Frame 49
isEnd = true;
stop();
Symbol 608 MovieClip [__Packages.app.sys.GameMode] Frame 0
class app.sys.GameMode
{
var m_mode;
function GameMode () {
m_mode = GM_NORMAL;
}
function setRankingMode() {
m_mode = GM_RANKING;
}
function setNormalMode() {
m_mode = GM_NORMAL;
}
function isRankingMode() {
return(m_mode == GM_RANKING);
}
function isNormalMode() {
return(m_mode == GM_NORMAL);
}
static var GM_NORMAL = 1;
static var GM_RANKING = 2;
}
Symbol 609 MovieClip [__Packages.app.FairiesCouple] Frame 0
class app.FairiesCouple
{
var m_mode, m_fpsManager, m_flowObject, m_oldFlowObject;
function FairiesCouple () {
m_mode = AFM_START;
}
function init(basemc) {
var _local2;
util.MovieClipFactory.init();
util.MovieClipFactory.append(basemc, app.sys.Screen.OT_TOP_NUM);
_local2 = util.MovieClipFactory.create(app.sys.Screen.OT_GAME, "MaskMC", "MASK");
util.MovieClipFactory.append(_local2.dummy, app.sys.Screen.OT_SCREEN_NUM);
_local2._visible = true;
_local2 = util.MovieClipFactory.get(app.sys.Screen.OT_SCREEN + 0);
util.MovieClipFactory.append(_local2, 1);
_local2 = util.MovieClipFactory.get(app.sys.Screen.OT_SCREEN + app.sys.Screen.OT_SCREEN_NUM);
util.MovieClipFactory.append(_local2, app.sys.Screen.OT_GAME_NUM - 2);
_local2 = util.MovieClipFactory.get(app.sys.Screen.OT_SCREEN + 0);
util.MovieClipFactory.append(_local2, 1);
_local2 = util.MovieClipFactory.get(app.sys.Screen.OT_SCREEN + 1);
util.MovieClipFactory.append(_local2, 1);
_local2 = util.MovieClipFactory.get((app.sys.Screen.OT_SCREEN + app.sys.Screen.OT_SCREEN_NUM) + app.sys.Screen.OT_GAME_NUM);
util.MovieClipFactory.append(_local2, app.sys.Screen.OT_GAME_NUM - 2);
_local2 = util.MovieClipFactory.get(app.sys.Screen.OT_SCREEN + 1);
util.MovieClipFactory.append(_local2, 1);
util.MovieClipFactory.setBasePosition(app.sys.Screen.OT_BACKGROUND);
util.MovieClipFactory.setBaseNumber(app.sys.Screen.OT_GAME_NUM);
util.MovieClipFactory.setGroupPos(app.sys.Screen.OT_SCREEN);
util.MovieClipFactory.reset();
app.sys.SysInfo.initFirst();
app.sys.SysInfo.__get__SoundManager().init(basemc);
app.sys.SysInfo.__get__SoundManager().setRate(app.sys.SysInfo.getRate());
app.sys.SysInfo.__get__SoundManager().setData(app.sys.SoundResource.getSoundData());
app.sys.SysInfo.__get__SoundManager().setSEEnable(app.sys.SysInfo.__get__Option().__get__Se());
app.sys.SysInfo.__get__SoundManager().setBGMEnable(app.sys.SysInfo.__get__Option().__get__Bgm());
app.sys.SysInfo.__get__Cursor().init();
app.sys.SysInfo.__get__Cursor().regist(0, "CursorMC");
var _local3 = false;
app.sys.SysInfo.__get__Debug().init(0, app.sys.Screen.HEIGHT + 20);
app.sys.SysInfo.__get__Debug().setActive(_local3);
app.sys.SysInfo.__get__Debug().setVisible(false);
m_fpsManager = new sys.FpsManager(30);
m_flowObject = undefined;
m_oldFlowObject = undefined;
}
function move() {
var _local3;
var _local2;
_local3 = m_mode;
do {
_local2 = false;
switch (_local3) {
case AFM_START :
_local3 = AFM_TITLE;
_local2 = true;
break;
case AFM_TITLE :
app.sys.SysInfo.updateAttr();
util.MovieClipFactory.flip();
m_oldFlowObject = m_flowObject;
m_flowObject = new app.flow.TitleFlow(m_oldFlowObject);
_local3 = AFM_TITLE_LOOP;
_local2 = true;
break;
case AFM_TITLE_LOOP :
if (moveFlowObject()) {
switch (m_flowObject.getResult()) {
case app.sys.SceneGraph.EID_FLOW_START :
app.sys.SysInfo.initGame();
_local3 = AFM_GAMEMAIN;
_local2 = true;
break;
default :
trace("GameMain Result Error");
}
m_flowObject.destroy();
}
break;
case AFM_GAMEMAIN :
app.sys.SysInfo.initStage();
app.sys.SysInfo.updateAttr();
util.MovieClipFactory.flip();
m_oldFlowObject = m_flowObject;
m_flowObject = new app.flow.GameMainFlow(m_oldFlowObject);
_local3 = AFM_GAMEMAIN_LOOP;
_local2 = true;
break;
case AFM_GAMEMAIN_LOOP :
if (moveFlowObject()) {
switch (m_flowObject.getResult()) {
case app.sys.SceneGraph.EID_FLOW_NEXT :
_local3 = AFM_RESULT;
_local2 = true;
break;
case app.sys.SceneGraph.EID_FLOW_TITLE :
_local3 = AFM_TITLE;
_local2 = true;
break;
default :
trace("GameMain Result Error");
}
m_flowObject.destroy();
}
break;
case AFM_RESULT :
app.sys.SysInfo.initStage();
app.sys.SysInfo.updateAttr();
util.MovieClipFactory.flip();
m_oldFlowObject = m_flowObject;
m_flowObject = new app.flow.ResultFlow(m_oldFlowObject);
_local3 = AFM_RESULT_LOOP;
_local2 = true;
break;
case AFM_RESULT_LOOP :
if (!moveFlowObject()) {
break;
}
switch (m_flowObject.getResult()) {
case app.sys.SceneGraph.EID_FLOW_TITLE :
_local3 = AFM_TITLE;
_local2 = true;
break;
case app.sys.SceneGraph.EID_FLOW_CONTINUE :
_local3 = AFM_GAMEMAIN;
_local2 = true;
break;
default :
trace("GameMain Result Error");
}
m_flowObject.destroy();
}
} while (_local2);
m_mode = _local3;
}
function moveFlowObject() {
var _local2 = m_flowObject.getMode();
app.sys.SysInfo.__get__Debug().reset();
app.sys.SysInfo.move();
if (app.sys.SysInfo.isPause() != m_fpsManager.isPause()) {
m_fpsManager.pause();
}
if (!app.sys.SysInfo.isPause()) {
var _local4;
var _local3 = getTimer();
_local4 = m_fpsManager.getLoopCount();
while (_local4 > 0) {
app.sys.SysInfo.__get__SoundManager().move();
m_flowObject.move(_local2);
_local4--;
}
app.sys.SysInfo.__get__Debug().output(("ScriptTime: " + (getTimer() - _local3)) + "ms");
} else {
var _local3 = getTimer();
m_flowObject.movePause(_local2);
app.sys.SysInfo.__get__Debug().output(("ScriptTime: " + (getTimer() - _local3)) + "ms");
}
m_flowObject.disp(_local2);
app.sys.SysInfo.__get__Debug().disp();
return(m_flowObject.isEnd());
}
static var AFM_START = 0;
static var AFM_TITLE = 3;
static var AFM_TITLE_LOOP = 4;
static var AFM_GAMEMAIN = 9;
static var AFM_GAMEMAIN_LOOP = 10;
static var AFM_RESULT = 20;
static var AFM_RESULT_LOOP = 21;
static var AFM_LEVELCLEAR = 11;
static var AFM_LEVELCLEAR_LOOP = 12;
static var AFM_GAMEOVER = 13;
static var AFM_GAMEOVER_LOOP = 14;
static var AFM_GAMECLEAR = 15;
static var AFM_GAMECLEAR_LOOP = 16;
}
Symbol 610 MovieClip [__Packages.app.flow.Flow] Frame 0
class app.flow.Flow
{
var m_mode, m_preFlow, m_context, m_result, m_isDestroy;
function Flow (mode, preFlow) {
m_mode = mode;
m_preFlow = preFlow;
m_context = new app.sys.Context(app.sys.SysInfo.getAttr(), util.MovieClipFactory.getBase());
m_result = 0;
m_isDestroy = false;
}
function move(mode) {
}
function movePause(mode) {
}
function disp(mode) {
}
function isEnd() {
return(m_result != 0);
}
function destroy() {
m_isDestroy = true;
}
function event(id) {
m_result = id;
}
function getResult() {
return(m_result);
}
function getMode() {
return(m_mode);
}
function isDestroy() {
return(m_isDestroy);
}
function getContext() {
return(m_context);
}
static var FM_TITLE = 0;
static var FM_STAGESTART = 1;
static var FM_GAME = 2;
static var FM_FLOORCLEAR = 3;
static var FM_STAGECLEAR = 4;
static var FM_GAMEOVER = 5;
static var FM_GAMECLEAR = 6;
static var FM_OTHER = 7;
}
Symbol 611 MovieClip [__Packages.app.sys.Context] Frame 0
class app.sys.Context
{
var m_attr, m_base;
function Context (attr, base) {
m_attr = attr;
m_base = base;
}
function getAttr() {
return(m_attr);
}
function getBase() {
return(m_base);
}
}
Symbol 612 MovieClip [__Packages.sys.WorkList] Frame 0
class sys.WorkList
{
var m_list, m_attr;
function WorkList () {
m_list = new util.List();
}
function setAttr(attr) {
m_attr = attr;
}
function append(obj) {
return(m_list.push(obj, m_attr));
}
function appendWithAttr(obj, attr) {
return(m_list.push(obj, attr));
}
function cut(obj) {
obj.cut();
}
function callMove() {
var _local2 = m_list.getFirst();
var _local4 = [];
var _local3;
while (!m_list.isLast(_local2)) {
if (!_local2.m_data.move()) {
_local4.push(_local2);
}
_local2 = _local2.m_next;
}
_local3 = _local4.length - 1;
while (_local3 >= 0) {
_local4[_local3].m_data.destroy();
_local3--;
}
}
function callCtrl() {
var _local2 = m_list.getFirst();
var _local4 = [];
var _local3;
while (!m_list.isLast(_local2)) {
if (!_local2.m_data.ctrl()) {
_local4.push(_local2);
}
_local2 = _local2.m_next;
}
_local3 = _local4.length - 1;
while (_local3 >= 0) {
_local4[_local3].m_data.destroy();
_local3--;
}
}
function callDisp() {
var _local2 = m_list.getFirst();
while (!m_list.isLast(_local2)) {
_local2.m_data.disp();
_local2 = _local2.m_next;
}
}
function callDestroy() {
var _local2 = m_list.getFirst();
while (!m_list.isLast(_local2)) {
_local2.m_data.destroy();
_local2 = m_list.getFirst();
}
}
function callDestroyByAttr(attr) {
var _local2 = m_list.getFirst();
var _local4 = [];
var _local3;
while (!m_list.isLast(_local2)) {
if (_local2.getAttr() == attr) {
_local4.push(_local2);
}
_local2 = _local2.m_next;
}
_local3 = _local4.length - 1;
while (_local3 >= 0) {
_local4[_local3].m_data.destroy();
_local3--;
}
}
}
Symbol 613 MovieClip [__Packages.util.List] Frame 0
class util.List
{
var m_top, m_last;
function List () {
m_top = new util.ListItem(undefined);
m_last = new util.ListItem(undefined);
m_top.m_next = m_last;
m_last.m_prev = m_top;
}
function push(data, attr) {
var _local3;
var _local2;
_local2 = new util.ListItem(data, attr);
_local3 = m_last.m_prev;
m_last.m_prev = _local2;
_local3.m_next = _local2;
_local2.m_prev = _local3;
_local2.m_next = m_last;
return(_local2);
}
function pop() {
var _local2;
var _local3;
_local2 = m_last.m_prev;
_local2.m_prev.m_next = m_last;
m_last.m_prev = _local2.m_prev;
_local3 = _local2.get();
return(_local3);
}
function unshift(data, attr) {
var _local3;
var _local2;
_local2 = new util.ListItem(data, attr);
_local3 = m_top.m_next;
m_top.m_next = _local2;
_local3.m_prev = _local2;
_local2.m_prev = m_top;
_local2.m_next = _local3;
return(_local2);
}
function shift() {
var _local2;
var _local3;
_local2 = m_top.m_next;
_local2.m_next.m_prev = m_top;
m_top.m_next = _local2.m_next;
_local3 = _local2.get();
return(_local3);
}
function cut(data) {
data.cut();
}
function getFirst() {
return(m_top.m_next);
}
function isLast(data) {
return(data == m_last);
}
function isEmpty() {
return(m_top.m_next == m_last);
}
function getLength() {
var _local3;
var _local2;
_local2 = m_top;
_local3 = 0;
while (_local2.m_next != m_last) {
_local2 = _local2.m_next;
_local3++;
}
return(_local3);
}
}
Symbol 614 MovieClip [__Packages.util.ListItem] Frame 0
class util.ListItem
{
var m_prev, m_next, m_data, m_attr;
function ListItem (data, attr) {
m_prev = undefined;
m_next = undefined;
m_data = data;
m_attr = attr;
}
function get() {
return(m_data);
}
function cut() {
m_prev.m_next = m_next;
m_next.m_prev = m_prev;
}
function getAttr() {
return(m_attr);
}
}
Symbol 615 MovieClip [__Packages.app.sys.SceneGraph] Frame 0
class app.sys.SceneGraph
{
var m_listener, m_context, m_scenePos, m_activeList, m_time, m_waitTime, m_waitEvent, m_encountEvent, m_labelList, m_isStop, m_frameCount, m_isFrame, m_sceneList;
function SceneGraph () {
m_listener = [];
}
function init(context) {
m_context = context;
m_scenePos = 0;
m_activeList = [];
m_time = 0;
m_waitTime = 0;
m_waitEvent = undefined;
m_encountEvent = undefined;
m_labelList = {};
m_isStop = false;
m_frameCount = 0;
m_isFrame = false;
}
function setScene(sceneList) {
var _local2;
var _local3;
m_sceneList = sceneList;
_local2 = m_sceneList.length - 1;
while (_local2 >= 0) {
_local3 = m_sceneList[_local2];
if (_local3.type == "LABEL") {
m_labelList[_local3.name] = _local2 + 1;
}
_local2--;
}
}
function move() {
var _local4;
var _local3;
var _local2;
var _local5;
if (m_isStop) {
return(undefined);
}
if (((m_waitEvent != undefined) && (m_waitEvent == m_encountEvent)) || ((m_waitEvent == undefined) && (m_time >= m_waitTime))) {
if (m_waitEvent != undefined) {
m_waitEvent = undefined;
m_time = 0;
} else {
m_time = m_time - m_waitTime;
}
}
}
function destroy() {
}
function stop() {
m_isStop = true;
}
function clearActiveList() {
m_activeList = [];
}
function getFrame() {
return(m_frameCount);
}
function onEvent(eventID, param) {
sendEvent(eventID, param);
}
function addListener(listener) {
var _local2;
for (_local2 in m_listener) {
if (listener == m_listener[_local2]) {
return(undefined);
}
}
m_listener.push(listener);
}
function removeListener(listener) {
var _local2;
for (_local2 in m_listener) {
if (listener == m_listener[_local2]) {
m_listener.splice(_local2, 1);
return(undefined);
}
}
}
function sendEvent(eventID, param) {
var _local3;
var _local2;
_local2 = m_listener.length - 1;
while (_local2 >= 0) {
_local3 = app.sys.SceneGraphListener(m_listener[_local2]);
_local3.onSceneGraphEvent(eventID, param);
_local2--;
}
}
static var EID_FLOW_START = 10;
static var EID_FLOW_CONTINUE = 11;
static var EID_FLOW_STAGECLEAR = 12;
static var EID_FLOW_GAMEOVER = 13;
static var EID_FLOW_TITLE = 14;
static var EID_FLOW_NEXT = 15;
}
Symbol 616 MovieClip [__Packages.sys.Listener] Frame 0
interface sys.Listener
{
}
Symbol 617 MovieClip [__Packages.app.sys.SceneGraphListener] Frame 0
interface app.sys.SceneGraphListener extends sys.Listener
{
}
Symbol 618 MovieClip [__Packages.app.sys.Debug] Frame 0
class app.sys.Debug
{
var m_mc, m_active, m_visible, m_str;
function Debug () {
}
function init(x, y) {
m_mc = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, "DebugMC", "Debug");
m_mc._x = x;
m_mc._y = y;
m_active = false;
m_visible = false;
m_str = "";
}
function reset() {
if (m_active) {
m_str = "";
}
}
function setActive(active) {
if (active) {
output = activeOutput;
disp = activeDisp;
} else {
output = undefined;
disp = noDisp;
}
m_active = active;
}
function setVisible(visible) {
m_visible = visible;
}
function activeOutput(str) {
m_str = m_str + (str + newline);
}
function activeDisp() {
m_mc.str = m_str;
m_mc._visible = m_visible;
}
function noDisp() {
m_mc._visible = m_visible;
}
function output() {
}
function disp() {
}
function destroy() {
m_mc.removeMovieClip();
}
function isActive() {
return(m_active);
}
}
Symbol 619 MovieClip [__Packages.util.MovieClipFactory] Frame 0
class util.MovieClipFactory
{
static var m_idx, m_depthList, m_mcList, m_basePos, m_baseNum, m_baseNow, m_baseGroupPos;
function MovieClipFactory () {
}
static function init() {
m_idx = 0;
m_depthList = [];
m_mcList = [];
m_basePos = -1;
m_baseNum = -1;
m_baseNow = 0;
m_baseGroupPos = 0;
}
static function reset() {
var _local1 = 0;
while (_local1 < m_idx) {
var _local2 = m_mcList[_local1];
m_depthList[_local1] = _local2.getNextHighestDepth();
_local1++;
}
}
static function append(mc, idx) {
var _local3;
var _local1;
_local3 = MCID;
_local1 = mc.MCF_idx;
if (_local1 == undefined) {
_local1 = 1;
}
var _local2 = 0;
while (_local2 < idx) {
mc.createEmptyMovieClip((_local3 + "_") + _local1, _local1);
m_mcList.push(mc[(_local3 + "_") + _local1]);
m_depthList.push(0);
_local1++;
_local2++;
}
mc.MCF_idx = _local1;
m_idx = m_idx + idx;
}
static function get(mcidx) {
return(m_mcList[mcidx]);
}
static function getWithBase(mcidx, baseN) {
mcidx = mcidx + (m_baseNum * baseN);
return(m_mcList[mcidx]);
}
static function setBasePosition(pos) {
m_basePos = pos;
}
static function setBaseNumber(num) {
m_baseNum = num;
}
static function flip() {
if (m_baseNow == 0) {
m_baseNow = 1;
} else {
m_baseNow = 0;
}
}
static function setGroupPos(pos) {
m_baseGroupPos = pos;
}
static function setHighDepth(isHigh) {
var _local2;
var _local1;
if (m_baseNow == 0) {
_local2 = m_mcList[m_baseGroupPos];
_local1 = m_mcList[m_baseGroupPos + 1];
} else {
_local2 = m_mcList[m_baseGroupPos + 1];
_local1 = m_mcList[m_baseGroupPos];
}
if ((_local2.getDepth() > _local1.getDepth()) != isHigh) {
_local2.swapDepths(_local1);
}
}
static function getCurrentMC() {
return(m_mcList[m_baseGroupPos + m_baseNow]);
}
static function getCurrentMCDepth() {
return(m_baseGroupPos + m_baseNow);
}
static function getBase() {
return(m_baseNow);
}
static function setBaseDepth(mc, depth) {
mc.MCF_base = depth;
mc.MCF_idx = depth;
}
static function create(mcidx, idname, name) {
var _local3;
var _local4;
var _local2;
if (name == undefined) {
name = MCID;
}
_local4 = m_depthList[mcidx];
_local2 = m_mcList[mcidx];
_local3 = _create(_local2, idname, name, _local4);
m_depthList[mcidx]++;
return(_local3);
}
static function createWithBase(mcidx, idname, name, base) {
mcidx = mcidx + (m_baseNum * base);
return(create(mcidx, idname, name));
}
static function createOnMc(mc, idname, name) {
var _local4;
var _local1;
if (name == undefined) {
name = MCID;
}
_local1 = mc.MCF_idx;
if (_local1 == undefined) {
_local1 = 1;
}
_local4 = _create(mc, idname, name, _local1);
mc.MCF_idx = _local1 + 1;
return(_local4);
}
static function createOnMcDec(mc, idname, name) {
var _local4;
var _local2;
if (name == undefined) {
name = MCID;
}
_local2 = mc.MCF_idx;
if (_local2 == undefined) {
_local2 = mc.MCF_base;
if (_local2 == undefined) {
_local2 = 100000 /* 0x0186A0 */;
}
}
_local4 = _create(mc, idname, name, _local2);
mc.MCF_idx = _local2 - 1;
if (mc.MCF_idx < 1) {
if (mc.MCF_base == undefined) {
mc.MCF_base = 100000 /* 0x0186A0 */;
}
mc.MCF_idx = mc.MCF_base;
}
return(_local4);
}
static function createEmptyOnMc(mc, name) {
var _local3;
var _local1;
if (name == undefined) {
name = MCID;
}
_local1 = mc.MCF_idx;
if (_local1 == undefined) {
_local1 = 1;
}
name = (name + "_") + _local1;
_local3 = mc.createEmptyMovieClip(name, _local1);
_local3._visible = false;
mc.MCF_idx = _local1 + 1;
return(_local3);
}
static function _create(mc, idname, name, depth) {
var _local2;
name = (name + "_") + depth;
mc.attachMovie(idname, name, depth);
_local2 = mc[name];
_local2._visible = false;
if (_local2 == undefined) {
trace((("MovieClipFactory." + arguments.caller) + " error: ") + idname);
}
return(_local2);
}
static var MCID = "mcfo";
}
Symbol 620 MovieClip [__Packages.app.sys.Screen] Frame 0
class app.sys.Screen
{
function Screen () {
}
static var WIDTH = 600;
static var HEIGHT = 450;
static var GAME_WIDTH = 600;
static var GAME_HEIGHT = 450;
static var OT_MENU = 0;
static var OT_GAME = 1;
static var OT_SYSTEM = 2;
static var OT_UTIL = 3;
static var OT_TOP_NUM = 4;
static var OT_SCREEN = 4;
static var OT_SCREEN_NUM = 2;
static var OT_BGBASE = 6;
static var OT_BACKGROUND = 7;
static var OT_BGSTAR = 8;
static var OT_ENEMY = 9;
static var OT_PLAYER = 10;
static var OT_BULLET = 11;
static var OT_BGFRONT = 12;
static var OT_STATUS = 13;
static var OT_GAME_NUM = 8;
}
Symbol 621 MovieClip [__Packages.sys.SoundManager] Frame 0
class sys.SoundManager
{
var m_mc, m_soundWork, m_freeList, m_prioList, m_updateList, m_seEnable, m_bgmEnable, m_seVolume, m_bgmVolume, m_rate, m_resource;
function SoundManager () {
}
function init(basemc) {
m_mc = basemc.createEmptyMovieClip("Sounds", 10000);
m_soundWork = [];
m_freeList = new util.List();
var _local3 = 0;
while (_local3 < SOUND_MAX) {
var _local2 = {};
var _local4;
_local4 = "snd" + _local3;
_local2.id = _local3;
_local2.idf = _local3;
_local2.mc = m_mc.createEmptyMovieClip(_local4, _local3);
_local2.snd = new Sound(_local2.mc);
_local2.func = createCallback(_local3);
_local2.sts = STS_STOP;
m_soundWork.push(_local2);
m_freeList.push(_local3);
_local3++;
}
m_prioList = [];
_local3 = 0;
while (_local3 < PRIO_MAX) {
m_prioList.push(new util.List());
_local3++;
}
m_updateList = new util.List();
m_seEnable = true;
m_bgmEnable = true;
m_seVolume = 100;
m_bgmVolume = 100;
m_rate = 50;
}
function playSE(sname, prio, vol) {
if (!m_seEnable) {
return(-1);
}
if (prio == undefined) {
prio = PRIO_NORMAL;
}
return(playSound(sname, prio, vol));
}
function playBGM(sname, vol) {
if (!m_bgmEnable) {
return(-1);
}
return(playSound(sname, PRIO_BGM, vol));
}
function playSound(sname, prio, vol) {
var _local2;
_local2 = getEmptyWork(prio);
if (_local2 == null) {
return(-1);
}
if (vol == undefined) {
vol = 100;
}
vol = util.Util.limitRange(vol, 0, 100);
_local2.resvol = 100;
_local2.playvol = vol;
_local2.prio = prio;
_local2.pan = 0;
_local2.time = getTimer();
_local2.index = 0;
_local2.playindex = 0;
_local2.data = m_resource[sname];
_local2.sts = STS_PLAY;
_local2.fadeTime = 0;
_local2.fadeCount = 0;
_local2.listPrio = m_prioList[prio].push(_local2.idf);
_local2.listUpdate = undefined;
playSoundOne(_local2.idf);
return(_local2.id);
}
function playSoundOne(id) {
var _local4;
var _local3;
var _local2;
_local2 = getWork(id);
if (_local2.data.length <= _local2.index) {
freeWork(_local2.idf);
return(undefined);
}
_local3 = _local2.snd;
_local4 = _local2.data[_local2.index];
_local2.resvol = _local4.vol;
_local2.snd.setVolume(calcVolume(_local2));
_local2.snd.setPan(_local2.pan);
_local3.attachSound(_local4.id);
_local2.playindex = _local2.index;
if (_local4.loop != 0) {
_local3.start(0, _local4.loop);
_local3.onSoundComplete = _local2.func;
_local2.index++;
} else {
_local3.start(0, 1);
_local3.onSoundComplete = _local2.func;
}
}
function setVolume(id, vol) {
var _local3;
var _local2;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
_local2.playvol = util.Util.limitRange(vol, 0, 100);
_local3 = _local2.snd;
_local3.setVolume(calcVolume(_local2));
}
function setPan(id, pan) {
var _local3;
var _local2;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
_local2.pan = util.Util.limitRange(pan, -100, 100);
_local3 = _local2.snd;
_local3.setPan(_local2.pan);
}
function stop(id) {
var _local2;
var _local4;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
stopMain(_local2);
}
function stopSE() {
var _local2;
_local2 = PRIO_HIGH;
while (_local2 <= PRIO_LOW) {
stopPrio(_local2);
_local2++;
}
}
function stopBGM() {
stopPrio(PRIO_BGM);
}
function stopAll() {
stopSE();
stopBGM();
}
function setData(data) {
m_resource = data;
}
function setSEVolume(vol) {
var _local2;
m_seVolume = util.Util.limitRange(vol, 0, 100);
_local2 = PRIO_HIGH;
while (_local2 <= PRIO_LOW) {
setVolumePrio(_local2);
_local2++;
}
}
function setBGMVolume(vol) {
m_bgmVolume = util.Util.limitRange(vol, 0, 100);
setVolumePrio(PRIO_BGM);
}
function setRate(rate) {
m_rate = rate;
}
function setSEEnable(enable) {
m_seEnable = enable;
}
function setBGMEnable(enable) {
m_bgmEnable = enable;
}
function getInfo(id) {
var _local2;
var _local3;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
_local3 = _local2.snd.position;
if (_local3 >= _local2.snd.duration) {
_local3 = 0;
}
return({idx:_local2.playindex, position:_local3});
}
function move() {
}
function destroy() {
stopAll();
var _local2 = 0;
while (_local2 < SOUND_MAX) {
var _local3 = getWork(_local2);
_local3.mc.removeMovieClip();
delete _local3.snd;
_local2++;
}
_local2 = 0;
while (_local2 < PRIO_MAX) {
delete m_prioList[_local2];
_local2++;
}
delete m_updateList;
delete m_freeList;
delete m_prioList;
delete m_soundWork;
m_mc.removeMovieClip();
}
function setVolumePrio(prioNum) {
var _local6;
var _local2;
var _local3;
var _local5;
var _local4;
_local6 = m_prioList[prioNum];
_local2 = _local6.getFirst();
while (!_local6.isLast(_local2)) {
_local4 = Number(_local2.get());
_local3 = getWork(_local4);
_local5 = _local3.snd;
_local5.setVolume(calcVolume(_local3));
_local2 = _local2.m_next;
}
}
function stopPrio(prioNum) {
var _local2;
var _local4;
var _local5;
var _local3;
_local2 = m_prioList[prioNum];
while (!_local2.isEmpty()) {
_local4 = _local2.getFirst();
_local3 = Number(_local4.get());
_local5 = getWork(_local3);
stopMain(_local5);
}
}
function stopMain(work) {
var _local2;
_local2 = work.snd;
_local2.onSoundComplete = undefined;
_local2.stop();
freeWork(work.idf);
}
function getEmptyWork(prioNum) {
var _local5;
var _local8;
var _local3;
var _local4;
var _local2;
var _local6;
var _local7;
if (!m_freeList.isEmpty()) {
_local4 = Number(m_freeList.pop());
} else {
_local6 = -1;
_local7 = PRIO_LOW;
while (_local7 >= prioNum) {
_local8 = m_prioList[_local7];
_local2 = -1;
_local3 = _local8.getFirst();
while (!_local8.isLast(_local3)) {
_local4 = Number(_local3.get());
_local5 = getWork(_local4);
if ((_local2 == -1) || ((_local2 != -1) && (_local2 > _local5.time))) {
_local6 = _local4;
_local2 = _local5.time;
}
_local3 = _local3.m_next;
}
if (_local6 != -1) {
_local5 = getWork(_local4);
stopMain(_local5);
_local4 = _local6;
break;
}
_local7--;
}
if (_local6 == -1) {
return(null);
}
_local4 = Number(m_freeList.pop());
}
_local5 = getWork(_local4);
_local5.id = _local5.id + SOUND_MAX;
return(_local5);
}
function getWork(id) {
return(m_soundWork[id]);
}
function getCheckedWork(id) {
var _local2;
if (id < 0) {
return(null);
}
_local2 = m_soundWork[id % SOUND_MAX];
if (_local2.sts == STS_STOP) {
return(null);
}
if (_local2.id != id) {
return(null);
}
return(_local2);
}
function freeWork(id) {
var _local3;
var _local2;
_local3 = getWork(id);
_local3.sts = STS_STOP;
_local2 = _local3.listPrio;
_local2.cut();
_local2 = _local3.listUpdate;
if (_local2 != null) {
_local2.cut();
}
m_freeList.push(id);
}
function calcVolume(work) {
var _local3;
if (work.prio == PRIO_BGM) {
_local3 = ((work.playvol * work.resvol) * m_bgmVolume) / 10000;
} else {
_local3 = ((work.playvol * work.resvol) * m_seVolume) / 10000;
}
return(_local3);
}
function createCallback(id) {
var _local3 = function () {
var _local3 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local2 = arguments.callee.id;
return(_local4.call(_local3, _local2));
};
_local3.target = this;
_local3.func = playSoundOne;
_local3.id = id;
return(_local3);
}
static var SOUND_MAX = 16;
static var PRIO_BGM = 0;
static var PRIO_HIGH = 1;
static var PRIO_NORMAL = 2;
static var PRIO_LOW = 3;
static var PRIO_MAX = 4;
static var STS_STOP = 0;
static var STS_PLAY = 1;
static var STS_PAUSE = 2;
}
Symbol 622 MovieClip [__Packages.util.Util] Frame 0
class util.Util
{
function Util () {
}
static function limitRange(x, mini, maxi) {
if (x < mini) {
x = mini;
} else if (x > maxi) {
x = maxi;
}
return(x);
}
static function crossPos(y, x1, y1, x2, y2) {
return(x1 + (((y - y1) * (x2 - x1)) / (y2 - y1)));
}
static function crossPos2(x1, y1, x2, y2, x3, y3, x4, y4) {
var _local3;
var _local4;
var _local1;
var _local2;
var _local9;
var _local8;
_local3 = (y2 - y1) / (x2 - x1);
_local4 = y1 - (_local3 * x1);
_local1 = (y4 - y3) / (x4 - x3);
_local2 = y3 - (_local1 * x3);
_local9 = (_local4 - _local2) / (_local1 - _local3);
_local8 = _local2 + (_local1 * _local9);
return({x:_local9, y:_local8});
}
}
Symbol 623 MovieClip [__Packages.app.sys.Option] Frame 0
class app.sys.Option
{
var m_hiScore, m_bgm, m_se;
function Option () {
m_hiScore = 0;
HiScore = (0);
Bgm = (true);
Se = (true);
}
function load() {
var _local2;
_local2 = SharedObject.getLocal(SO_ID);
if (_local2.data.Bgm == undefined) {
_local2.data.Bgm = true;
}
if (_local2.data.Se == undefined) {
_local2.data.Se = true;
}
if (_local2.data.HiScore == undefined) {
_local2.data.HiScore = 0;
}
Bgm = (_local2.data.Bgm);
Se = (_local2.data.Se);
HiScore = (_local2.data.HiScore);
}
function save() {
var _local2;
_local2 = SharedObject.getLocal(SO_ID);
_local2.data.Bgm = Bgm;
_local2.data.Se = Se;
_local2.data.HiScore = HiScore;
_local2.flush(256);
}
function get HiScore() {
return(m_hiScore);
}
function get Bgm() {
return(m_bgm);
}
function get Se() {
return(m_se);
}
function set HiScore(score) {
if (m_hiScore < score) {
m_hiScore = score;
}
//return(HiScore);
}
function set Bgm(bgm) {
m_bgm = bgm;
//return(Bgm);
}
function set Se(se) {
m_se = se;
//return(Se);
}
static var SO_ID = "FC_01";
}
Symbol 624 MovieClip [__Packages.sys.WorkItem] Frame 0
class sys.WorkItem
{
function WorkItem () {
}
function init() {
}
function reset() {
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
}
function ctrlAndDisp() {
return(true);
}
}
Symbol 625 MovieClip [__Packages.app.sys.Cursor] Frame 0
class app.sys.Cursor extends sys.WorkItem
{
var m_isShow, m_nextShow, m_isUpdate, m_cursorList, m_curIdx, m_nextIdx, m_count, m_wl, m_isReverse;
function Cursor () {
super();
}
function init() {
m_isShow = false;
m_nextShow = false;
m_isUpdate = false;
m_cursorList = [];
m_curIdx = 0;
m_nextIdx = -1;
m_count = 0;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this);
}
function move() {
m_count++;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local3;
if (m_isUpdate) {
m_isShow = m_nextShow;
_local3 = m_cursorList[m_curIdx];
if (m_isShow) {
Mouse.hide();
if (m_curIdx != m_nextIdx) {
_local3._visible = false;
m_curIdx = m_nextIdx;
_local3 = m_cursorList[m_curIdx];
}
_local3._visible = true;
_local3._x = _root._xmouse;
_local3._y = _root._ymouse;
_local3._xscale = (m_isReverse ? -100 : 100);
_local3.gotoAndStop((m_count % _local3._totalframes) + 1);
} else {
Mouse.show();
_local3._visible = false;
}
m_nextShow = false;
m_isUpdate = false;
}
}
function destroy() {
var _local3;
var _local2;
Mouse.show();
_local2 = 0;
while (_local2 < m_cursorList.length) {
_local3 = m_cursorList[_local2];
_local3.removeMovieClip();
_local2++;
}
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function regist(idx, mcid) {
var _local2;
_local2 = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, mcid, "Cursor");
_local2.stop();
_local2._visible = false;
m_cursorList[idx] = _local2;
}
function show(idx, isReverse) {
if (arguments.length < 2) {
isReverse = false;
}
if (arguments.length < 1) {
idx = 0;
}
if (m_curIdx != idx) {
m_nextIdx = idx;
m_count = 0;
}
m_isReverse = isReverse;
m_nextShow = true;
m_isUpdate = true;
}
function hide() {
m_isUpdate = true;
}
function forceHide() {
m_isUpdate = true;
m_nextShow = false;
}
function isShow() {
return(m_isShow);
}
}
Symbol 626 MovieClip [__Packages.app.sys.SysInfo] Frame 0
class app.sys.SysInfo
{
static var m_isPause, m_isStart, m_ResultEraseCardNum, m_ResultRestTime, m_ResultRestHint, m_ResultRestShuffle;
function SysInfo () {
}
static function initFirst() {
Option.load();
setStart(false);
}
static function initGame() {
}
static function initStage() {
setStart(false);
}
static function clearStage() {
}
static function endGame() {
Option.save();
}
static function clearGame() {
}
static function reset() {
}
static function move() {
}
static function disp() {
}
static function checkPause() {
}
static function isPause() {
return(m_isPause);
}
static function changePause() {
m_isPause = !m_isPause;
}
static function isStart() {
return(m_isStart);
}
static function setStart(flag) {
m_isStart = flag;
}
static function getRate() {
return(1000 / getFrameRate());
}
static function getFrameRate() {
return(30);
}
static function updateAttr() {
m_attr++;
m_WorkList.setAttr(m_attr);
}
static function getAttr() {
return(m_attr);
}
static function get WorkList() {
return(m_WorkList);
}
static function get SceneGraph() {
return(m_SceneGraph);
}
static function get Debug() {
return(m_Debug);
}
static function get SoundManager() {
return(m_SoundManager);
}
static function get Option() {
return(m_Option);
}
static function get GameMode() {
return(m_GameMode);
}
static function get Cursor() {
return(m_Cursor);
}
static function get BitmapData() {
return(m_BitmapData);
}
static function get IsUseBitmap() {
return(m_isUseBitmap);
}
static function set IsUseBitmap(isUse) {
m_isUseBitmap = isUse;
//return(IsUseBitmap);
}
static function set ResultEraseCardNum(num) {
m_ResultEraseCardNum = num;
//return(ResultEraseCardNum);
}
static function set ResultRestTime(num) {
m_ResultRestTime = num;
//return(ResultRestTime);
}
static function set ResultRestHint(num) {
m_ResultRestHint = num;
//return(ResultRestHint);
}
static function set ResultRestShuffle(num) {
m_ResultRestShuffle = num;
//return(ResultRestShuffle);
}
static function get ResultEraseCardNum() {
return(m_ResultEraseCardNum);
}
static function get ResultRestTime() {
return(m_ResultRestTime);
}
static function get ResultRestHint() {
return(m_ResultRestHint);
}
static function get ResultRestShuffle() {
return(m_ResultRestShuffle);
}
static var m_WorkList = new sys.WorkList();
static var m_SceneGraph = new app.sys.SceneGraph();
static var m_Debug = new app.sys.Debug();
static var m_SoundManager = new sys.SoundManager();
static var m_Option = new app.sys.Option();
static var m_GameMode = new app.sys.GameMode();
static var m_Cursor = new app.sys.Cursor();
static var m_BitmapData = new flash.display.BitmapData(app.sys.Screen.WIDTH, app.sys.Screen.HEIGHT);
static var m_attr = 0;
static var m_isUseBitmap = false;
}
Symbol 627 MovieClip [__Packages.sys.FpsManager] Frame 0
class sys.FpsManager
{
var m_fps, m_lastTime, m_pause, m_resetFlag;
function FpsManager (fps) {
m_fps = fps;
m_lastTime = getTimer();
m_pause = false;
m_resetFlag = false;
}
function getLoopCount() {
var _local3;
var _local4;
var _local2;
_local3 = getTimer();
_local4 = _local3 - m_lastTime;
if ((!m_resetFlag) && (_local4 >= (1000 / m_fps))) {
_local2 = Math.floor(_local4 / (1000 / m_fps));
} else {
_local2 = 1;
}
if (_local2 > 4) {
_local2 = 4;
m_lastTime = _local3;
} else {
m_lastTime = m_lastTime + ((1000 / m_fps) * _local2);
if (Math.abs(m_lastTime - _local3) < ((1000 / m_fps) / 10)) {
m_lastTime = _local3;
}
}
if (m_resetFlag) {
m_lastTime = _local3;
m_resetFlag = false;
}
return(_local2);
}
function pause() {
if (m_pause) {
m_lastTime = getTimer();
}
m_pause = !m_pause;
}
function isPause() {
return(m_pause);
}
function reset() {
m_resetFlag = true;
}
}
Symbol 628 MovieClip [__Packages.app.sys.SoundResource] Frame 0
class app.sys.SoundResource
{
function SoundResource () {
}
static function getSoundData() {
return(SoundData);
}
static var SoundData = {BGM_BGM:[{id:"BGM_BGM", vol:40, loop:0}], BUTTON_CLICK_NORMAL:[{id:"SE_BUTTON_MOUSE_CLICK_NORMAL", vol:50, loop:1}], BUTTON_MOUSE_CLIKC_START:[{id:"SE_BUTTON_MOUSE_CLIKC_START", vol:50, loop:1}], BUTTON_MOUSE_OVER:[{id:"SE_BUTTON_MOUSE_OVER", vol:25, loop:1}], CARD_DISTRIBUTE:[{id:"SE_CARD_DISTRIBUTE", vol:50, loop:1}], CARD_MOVE:[{id:"SE_CARD_MOVE", vol:40, loop:1}], CARD_TURN:[{id:"SE_CARD_TURN", vol:70, loop:1}], CARD_TURN_HIT:[{id:"SE_CARD_TURN_HIT", vol:40, loop:1}], CARD_TURN_LOSER:[{id:"SE_CARD_TURN_LOSER", vol:50, loop:1}], DISP_EFFECT:[{id:"SE_DISP_EFFECT", vol:10, loop:1}], GAME_START:[{id:"SE_GAME_START", vol:50, loop:1}], GAME_CLEAR:[{id:"SE_GAME_CLEAR", vol:50, loop:1}], HINT_SHUFFLE:[{id:"SE_HINT_SHUFFLE", vol:50, loop:1}], TIME_OVER:[{id:"SE_TIME_OVER", vol:50, loop:1}], End:[]};
}
Symbol 629 MovieClip [__Packages.app.sys.FPS] Frame 0
class app.sys.FPS
{
var m_lastSec, m_count, m_dispCount, m_mc, m_wl;
function FPS (x, y) {
m_lastSec = Math.floor(getTimer() / 1000);
m_count = 1;
m_dispCount = 1;
m_mc = util.MovieClipFactory.create(app.sys.Screen.OT_UTIL, "FPSMC", "FPS");
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
m_mc._x = x;
m_mc._y = y;
m_mc._visible = true;
m_mc.fps = 0;
}
function move() {
var _local2 = Math.floor(getTimer() / 1000);
if (_local2 == m_lastSec) {
m_count++;
} else {
m_mc.fps = ((m_count + "(") + m_dispCount) + ")";
m_lastSec = _local2;
m_count = 1;
m_dispCount = 0;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
m_dispCount++;
m_mc._visible = true;
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
m_mc.removeMovieClip();
}
}
Symbol 630 MovieClip [__Packages.app.flow.TitleFlow] Frame 0
class app.flow.TitleFlow extends app.flow.Flow implements app.sys.SceneGraphListener
{
var m_context, m_mode, m_isDestroy, m_result;
function TitleFlow (preFlow) {
super(app.flow.Flow.FM_TITLE, preFlow);
util.MovieClipFactory.setHighDepth(true);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
new app.loop.TitleLoop(m_context, this, preFlow);
}
function move(mode) {
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callMove();
app.sys.SysInfo.__get__WorkList().callCtrl();
}
}
function disp(mode) {
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callDisp();
}
}
function destroy() {
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
app.sys.SysInfo.__get__WorkList().callDestroyByAttr(m_context.getAttr());
m_isDestroy = true;
}
function onSceneGraphEvent(eventID, param) {
if (((eventID == app.sys.SceneGraph.EID_FLOW_START) || (eventID == app.sys.SceneGraph.EID_FLOW_CONTINUE)) || (eventID == app.sys.SceneGraph.EID_FLOW_NEXT)) {
m_result = eventID;
}
}
}
Symbol 631 MovieClip [__Packages.app.enemy.Enemy] Frame 0
class app.enemy.Enemy extends sys.WorkItem
{
var m_context;
function Enemy (context) {
super();
m_context = context;
}
static var EM_ENEMY = 0;
static var EM_POWERUP = 1;
static var EM_MAX = 2;
}
Symbol 632 MovieClip [__Packages.app.loop.BaseLoop] Frame 0
class app.loop.BaseLoop extends app.enemy.Enemy
{
var m_nowFlow, m_preFlow, m_menuSEID, m_checkMouseClick, m_checkMouseMove, m_checkMouseWheel, m_keyAction, m_wl, m_context, m_menuAction, m_mcCurrent, m_btnMcList, m_btnShowMcList, m_mainMenuIdx, m_nowMainIndex, m_nowSubIndex, m_mcCursor;
function BaseLoop (context, nowFlow, preFlow) {
super(context);
m_nowFlow = nowFlow;
m_preFlow = preFlow;
m_menuSEID = -1;
m_checkMouseClick = false;
m_checkMouseMove = false;
m_checkMouseWheel = 0;
m_keyAction = -1;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function moveMenu() {
m_menuAction = ACT_NONE;
if (m_checkMouseMove || (m_checkMouseClick)) {
var _local2;
var _local6;
var _local7;
var _local5;
var _local4;
var _local8;
var _local3;
var _local10;
var _local9;
_local5 = m_mcCurrent._xmouse;
_local4 = m_mcCurrent._ymouse;
_local6 = -1;
_local10 = {x:_local5, y:_local4};
m_mcCurrent.localToGlobal(_local10);
_local9 = {};
_local7 = -1;
_local8 = ACT_NONE;
_local2 = m_btnMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
if (m_btnShowMcList[_local2]) {
if ((_local3.onmc != undefined) && (_local3.offmc != undefined)) {
if (hitCheckMC(_local3.onmc, _local5, _local4)) {
showCursor(_local5, _local4);
_local8 = ACT_ON;
_local6 = _local2;
_local7 = 0;
break;
}
if (hitCheckMC(_local3.offmc, _local5, _local4)) {
showCursor(_local5, _local4);
_local8 = ACT_OFF;
_local6 = _local2;
_local7 = 1;
break;
}
} else {
_local9.x = _local10.x;
_local9.y = _local10.y;
if (hitCheckMCGlobal(_local3.hit, _local9)) {
showCursor(_local5, _local4);
_local8 = ACT_ENTER;
_local6 = _local2;
_local7 = 0;
break;
}
}
}
_local2--;
}
if (_local6 != -1) {
if (m_checkMouseClick) {
m_menuAction = _local8;
} else if (((m_mainMenuIdx != _local6) || (m_nowMainIndex != _local6)) || (m_nowSubIndex != _local7)) {
m_menuAction = ACT_MOVE;
}
m_mainMenuIdx = _local6;
} else {
hideCursor();
}
m_nowMainIndex = _local6;
m_nowSubIndex = _local7;
}
if (m_checkMouseWheel != 0) {
if (m_checkMouseWheel < 0) {
m_menuAction = ACT_NEXT;
} else {
m_menuAction = ACT_PREV;
}
}
if (m_keyAction != -1) {
if (m_keyAction == KEY_DOWN) {
m_mainMenuIdx = incMenuIndex(m_mainMenuIdx);
m_nowMainIndex = m_mainMenuIdx;
m_menuAction = ACT_MOVE;
} else if (m_keyAction == KEY_UP) {
m_mainMenuIdx = decMenuIndex(m_mainMenuIdx);
m_nowMainIndex = m_mainMenuIdx;
m_menuAction = ACT_MOVE;
} else if (m_keyAction == KEY_CHANGE) {
var _local3 = m_btnMcList[m_mainMenuIdx];
if ((_local3.onmc != undefined) && (_local3.offmc != undefined)) {
m_menuAction = ACT_CHANGE;
}
} else if (m_keyAction == KEY_ENTER) {
m_menuAction = ACT_ENTER;
}
hideCursor();
}
return(m_menuAction != ACT_NONE);
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function onKeyDown() {
var _local2 = Key.getCode();
if (_local2 == 38) {
m_keyAction = KEY_UP;
}
if (_local2 == 40) {
m_keyAction = KEY_DOWN;
}
if ((_local2 == 37) || (_local2 == 39)) {
m_keyAction = KEY_CHANGE;
}
if (_local2 == 37) {
m_keyAction = KEY_LEFT;
}
if (_local2 == 39) {
m_keyAction = KEY_RIGHT;
}
if ((_local2 == 13) || (_local2 == 108)) {
m_keyAction = KEY_ENTER;
}
}
function onKeyup() {
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
function playMove() {
if (m_menuSEID != -1) {
app.sys.SysInfo.__get__SoundManager().stop(m_menuSEID);
}
m_menuSEID = app.sys.SysInfo.__get__SoundManager().playSE("BUTTON_MOUSE_OVER");
}
function playSelect() {
app.sys.SysInfo.__get__SoundManager().playSE("BUTTON_CLICK_NORMAL");
}
function playDispEffect() {
app.sys.SysInfo.__get__SoundManager().playSE("DISP_EFFECT");
}
function changeOption(opt, onoff) {
switch (opt) {
case "Bgm" :
app.sys.SysInfo.__get__Option().__set__Bgm(onoff);
break;
case "Se" :
app.sys.SysInfo.__get__Option().__set__Se(onoff);
}
}
function showMenu(isShow) {
var _local3;
var _local2;
_local3 = m_btnShowMcList.length - 1;
while (_local3 >= 0) {
_local2 = m_btnMcList[_local3];
if ((_local2.onmc != undefined) && (_local2.offmc != undefined)) {
_local2.onmc._visible = m_btnShowMcList[_local3] && (isShow);
_local2.offmc._visible = m_btnShowMcList[_local3] && (isShow);
} else if (_local2.show) {
_local2.show._visible = m_btnShowMcList[_local3] && (isShow);
} else {
_local2.mc._visible = m_btnShowMcList[_local3] && (isShow);
}
if (_local2.hit != undefined) {
_local2.hit._visible = false;
}
_local3--;
}
}
function incMenuIndex(idx) {
do {
idx++;
if (idx >= m_btnShowMcList.length) {
idx = 0;
}
} while (!m_btnShowMcList[idx]);
return(idx);
}
function decMenuIndex(idx) {
do {
idx--;
if (idx < 0) {
idx = m_btnShowMcList.length - 1;
}
} while (!m_btnShowMcList[idx]);
return(idx);
}
function selectMenu(idx) {
var _local2;
var _local3;
_local2 = m_btnShowMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
_local3.mc.gotoAndStop(((_local2 == idx) ? 2 : 1));
_local2--;
}
}
function hitCheck(btnIdx, x, y) {
var _local2 = m_btnMcList[btnIdx];
return(hitCheckMC(_local2, x, y));
}
function updateBtn(mc, rollmc, x, y) {
var _local2 = hitCheckMC(mc, x, y);
rollmc._visible = _local2;
return(_local2);
}
function hitCheckMC(mcb, x, y) {
if (((((mcb._x - (mcb._width / 2)) <= x) && ((mcb._x + (mcb._width / 2)) >= x)) && ((mcb._y - (mcb._height / 2)) <= y)) && ((mcb._y + (mcb._height / 2)) >= y)) {
return(true);
}
return(false);
}
function hitCheckGlobal(btnIdx, pt) {
var _local2 = m_btnMcList[btnIdx];
return(hitCheckMCGlobal(_local2, pt));
}
function hitCheckMCGlobal(mcb, pt) {
var _local3;
var _local4;
if (mcb.hitTest(pt.x, pt.y, false)) {
return(mcb.hitTest(pt.x, pt.y, true));
}
return(false);
}
function initCursor() {
m_mcCursor = undefined;
}
function createCursor() {
app.sys.SysInfo.__get__Cursor().hide();
}
function destroyCursor() {
app.sys.SysInfo.__get__Cursor().forceHide();
}
function showCursor(x, y) {
app.sys.SysInfo.__get__Cursor().show();
}
function showCursor2(x, y) {
app.sys.SysInfo.__get__Cursor().show();
}
function hideCursor() {
app.sys.SysInfo.__get__Cursor().hide();
}
static var KEY_DOWN = 1;
static var KEY_UP = 2;
static var KEY_ENTER = 3;
static var KEY_CHANGE = 4;
static var KEY_LEFT = 5;
static var KEY_RIGHT = 6;
static var ACT_NONE = 0;
static var ACT_ON = 1;
static var ACT_OFF = 2;
static var ACT_CHANGE = 3;
static var ACT_ENTER = 4;
static var ACT_MOVE = 5;
static var ACT_NEXT = 6;
static var ACT_PREV = 7;
}
Symbol 633 MovieClip [__Packages.app.loop.TitleLoop] Frame 0
class app.loop.TitleLoop extends app.loop.BaseLoop implements app.sys.SceneGraphListener
{
var m_mcMenu, m_context, m_lightAlive, m_lightList, m_mode, m_count, initCursor, m_curMenuIdx, m_mainMenuIdx, m_titleMenuIdx, m_mcCurrent, createCursor, m_isShowMenu, m_isMenuUpdate, m_isSelectUpdate, m_nowMainIndex, m_nowSubIndex, m_mcBack, m_mcMask, playDispEffect, m_checkMouseMove, moveMenu, m_menuAction, playMove, hideCursor, destroyCursor, playSelect, m_mcNext, m_page, m_checkMouseClick, m_checkMouseWheel, m_keyAction, showMenu, selectMenu, m_btnMcList, m_btnShowMcList;
function TitleLoop (context, nowFlow, preFlow) {
super(context, nowFlow, preFlow);
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "TitleMC", "Title", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.stop();
m_mcMenu._visible = true;
m_lightAlive = false;
m_lightList = [];
var _local4 = 0;
while (_local4 < LIGHT_MAX) {
var _local3 = util.MovieClipFactory.createOnMc(m_mcMenu.Light, "LightMC", "Light");
_local3.gotoAndStop(Math.floor(Math.random() * _local3._totalframes) + 1);
_local3.mc.stop();
_local3.live = Math.random() * 500;
m_lightList.push(_local3);
_local4++;
}
if (app.sys.SysInfo.__get__IsUseBitmap()) {
m_mcMenu.BG.gotoAndStop(m_mcMenu.BG._totalframes);
m_mode = MD_MASK_IN;
} else {
m_mode = MD_FIRST_IN;
}
m_count = 0;
initCursor();
Key.addListener(this);
Mouse.addListener(this);
m_curMenuIdx = MENU_TITLE;
m_mainMenuIdx = 0;
m_titleMenuIdx = 0;
app.sys.SysInfo.__get__SceneGraph().addListener(this);
}
function move() {
switch (m_mode) {
case MD_FIRST_IN :
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_FIRST;
initMenu(m_curMenuIdx);
createCursor();
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_FIRST;
break;
case MD_FIRST :
if (m_mcCurrent.BG._currentframe >= m_mcCurrent.BG._totalframes) {
m_mode = MD_TITLE_MENU_IN;
}
break;
case MD_MASK_IN :
m_mcBack = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "DummyMC", "Dummy", m_context.getBase());
m_mcBack.attachBitmap(app.sys.SysInfo.__get__BitmapData(), 24, "never", false);
m_mcBack._visible = true;
m_mcMask = new app.enemy.Mask01(app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2, m_mcMenu);
playDispEffect();
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_TITLE;
initMenu(m_curMenuIdx);
createCursor();
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_lightAlive = true;
m_mode = MD_MASK;
break;
case MD_MASK :
if ((m_mcMask != undefined) && (!m_mcMask.isAlive())) {
m_mcMask.destroy();
m_mcMask = undefined;
m_mcBack.removeMovieClip();
m_mcBack = undefined;
m_mode = MD_TITLE_MENU_IN;
}
break;
case MD_TITLE_MENU_IN :
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_TITLE;
initMenu(m_curMenuIdx);
createCursor();
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_count = 0;
m_lightAlive = true;
m_mode = MD_TITLE_MENU;
break;
case MD_TITLE_MENU :
var _local2 = m_mainMenuIdx;
if (m_count == 0) {
m_checkMouseMove = true;
}
m_count = m_count + app.sys.SysInfo.getRate();
if (moveMenu()) {
switch (m_menuAction) {
case app.loop.BaseLoop.ACT_MOVE :
playMove();
break;
case app.loop.BaseLoop.ACT_ENTER :
switch (m_mainMenuIdx) {
case TITLE_START :
playStart();
app.sys.SysInfo.__get__BitmapData().draw(m_mcMenu, new flash.geom.Matrix(1, 0, 0, 1, app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2));
app.sys.SysInfo.__set__IsUseBitmap(true);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_START, undefined);
m_mode = MD_END;
hideCursor();
destroyCursor();
break;
case TITLE_HELP :
playSelect();
m_titleMenuIdx = m_mainMenuIdx;
m_mode = MD_HELP_MENU_IN;
hideCursor();
destroyCursor();
break;
case TITLE_SOUND :
if (app.sys.SysInfo.__get__Option().__get__Se()) {
app.sys.SysInfo.__get__Option().__set__Se(false);
app.sys.SysInfo.__get__Option().__set__Bgm(false);
} else {
app.sys.SysInfo.__get__Option().__set__Se(true);
app.sys.SysInfo.__get__Option().__set__Bgm(true);
}
app.sys.SysInfo.__get__SoundManager().setSEEnable(app.sys.SysInfo.__get__Option().__get__Se());
app.sys.SysInfo.__get__SoundManager().setBGMEnable(app.sys.SysInfo.__get__Option().__get__Bgm());
app.sys.SysInfo.__get__Option().save();
playSelect();
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_count = 0;
}
}
}
m_mainMenuIdx = m_nowMainIndex;
if (_local2 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_HELP_MENU_IN :
m_mcNext = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "HelpMC", "Help", m_context.getBase());
m_mcNext._x = app.sys.Screen.WIDTH / 2;
m_mcNext._y = app.sys.Screen.HEIGHT / 2;
m_mcNext.gotoAndStop(1);
m_mcNext._visible = true;
createCursor();
m_mcCurrent = m_mcNext;
m_page = 1;
m_curMenuIdx = MENU_HELP;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = 0;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_HELP_MENU;
m_count = 0;
break;
case MD_HELP_MENU :
_local2 = m_mainMenuIdx;
if (m_count == 0) {
m_checkMouseMove = true;
}
m_count = m_count + app.sys.SysInfo.getRate();
if (moveMenu()) {
switch (m_menuAction) {
case app.loop.BaseLoop.ACT_MOVE :
playMove();
break;
case app.loop.BaseLoop.ACT_ENTER :
switch (m_mainMenuIdx) {
case HELP_PREV :
if (m_page > 1) {
m_page--;
m_mcNext.gotoAndStop(m_page);
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_count = 0;
}
break;
case HELP_NEXT :
if (m_page < HELP_PAGE_MAX) {
m_page++;
m_mcNext.gotoAndStop(m_page);
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_count = 0;
}
break;
case HELP_BACK :
m_mcNext.removeMovieClip();
m_mode = MD_TITLE_MENU_IN;
hideCursor();
destroyCursor();
}
playSelect();
}
}
m_mainMenuIdx = m_nowMainIndex;
if (_local2 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_END :
}
m_checkMouseClick = false;
m_checkMouseMove = false;
m_checkMouseWheel = 0;
m_keyAction = -1;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local2;
switch (m_curMenuIdx) {
case MENU_FIRST :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_mcMenu.BG.SoundBtn._visible = false;
m_mcMenu.BG.SoundBtn.onoff.gotoAndStop((app.sys.SysInfo.__get__Option().__get__Se() ? 1 : 2));
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
break;
case MENU_TITLE :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_mcMenu.BG.SoundBtn.onoff.gotoAndStop((app.sys.SysInfo.__get__Option().__get__Se() ? 1 : 2));
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
break;
case MENU_HELP :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (!m_isSelectUpdate) {
break;
}
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
}
function destroy() {
super.destroy();
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
Key.removeListener(this);
Mouse.removeListener(this);
while (m_lightList.length > 0) {
m_lightList.pop().removeMovieClip();
}
m_mcMenu.removeMovieClip();
}
function initMenu(idx) {
var _local2;
m_btnMcList = [];
m_btnShowMcList = [];
switch (idx) {
case MENU_FIRST :
_local2 = m_mcMenu;
m_btnMcList.push({mc:_local2.BG.SoundBtn, hit:_local2.BG.SoundBtn.Hit, show:_local2.BG.SoundBtn});
m_btnShowMcList.push(false);
break;
case MENU_TITLE :
_local2 = m_mcMenu;
m_btnMcList.push({mc:_local2.BG.PlayBtn, hit:_local2.BG.PlayBtn.Hit});
m_btnMcList.push({mc:_local2.BG.HelpBtn, hit:_local2.BG.HelpBtn.Hit});
m_btnMcList.push({mc:_local2.BG.SoundBtn, hit:_local2.BG.SoundBtn.Hit});
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
break;
case MENU_HELP :
_local2 = m_mcNext;
m_btnMcList.push({show:_local2.PrevBtn, mc:_local2.PrevBtn, hit:_local2.PrevBtn.Hit});
m_btnMcList.push({show:_local2.BackBtn, mc:_local2.BackBtn, hit:_local2.BackBtn.Hit});
m_btnMcList.push({show:_local2.NextBtn, mc:_local2.NextBtn, hit:_local2.NextBtn.Hit});
m_btnShowMcList.push(m_page > 1);
m_btnShowMcList.push(true);
m_btnShowMcList.push(m_page < HELP_PAGE_MAX);
}
}
function playStart() {
app.sys.SysInfo.__get__SoundManager().playSE("BUTTON_MOUSE_CLIKC_START");
}
function onSceneGraphEvent(eventID, param) {
}
static var MD_FIRST_IN = 1;
static var MD_FIRST = 2;
static var MD_MASK_IN = 10;
static var MD_MASK = 11;
static var MD_TITLE_MENU_IN = 20;
static var MD_TITLE_MENU = 21;
static var MD_HELP_MENU_IN = 30;
static var MD_HELP_MENU = 31;
static var MD_END = 999;
static var MENU_FIRST = 0;
static var MENU_TITLE = 1;
static var MENU_HELP = 2;
static var MENU_RANKING = 3;
static var TITLE_START = 0;
static var TITLE_HELP = 1;
static var TITLE_SOUND = 2;
static var TITLE_MAX = 3;
static var HELP_PREV = 0;
static var HELP_BACK = 1;
static var HELP_NEXT = 2;
static var HELP_MAX = 3;
static var HELP_PAGE_MAX = 3;
static var LIGHT_MAX = 5;
static var LIGHT_AREA_HEIGHT = 144;
static var LIGHT_AREA_WIDTH = 600;
}
Symbol 634 MovieClip [__Packages.app.enemy.Mask] Frame 0
class app.enemy.Mask extends app.enemy.Enemy
{
var m_count, m_isAlive, m_mc, m_targetMC, m_isAttach, m_mcList, m_wl;
function Mask (x, y, targetMC, mcName) {
super();
m_count = 0;
m_isAlive = true;
m_mc = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, mcName, mcName);
m_mc._x = x;
m_mc._y = y;
m_mc.play();
m_targetMC = targetMC;
m_targetMC.setMask(m_mc.Mask);
m_isAttach = true;
m_mcList = [];
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local2;
if (m_mc._currentframe >= m_mc._totalframes) {
m_mc.stop();
}
m_mc._visible = true;
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
delete m_mcList;
detach();
m_mc.removeMovieClip();
}
function isAlive() {
return(m_isAlive);
}
function detach() {
if (m_isAttach) {
m_targetMC.setMask(null);
m_isAttach = false;
}
}
}
Symbol 635 MovieClip [__Packages.app.enemy.Mask01] Frame 0
class app.enemy.Mask01 extends app.enemy.Mask
{
var m_mc, m_mcList, m_isAlive;
function Mask01 (x, y, targetMC) {
super(x, y, targetMC, "Mask01MC");
}
function move() {
var _local2;
var _local7 = app.sys.SysInfo.getRate() / 1000;
var _local9 = false;
if (m_mc._currentframe < m_mc._totalframes) {
var _local4 = 0;
while (_local4 < 2) {
var _local5 = ((Math.random() * 40) * Math.PI) / 180;
var _local3 = Math.random() * 500;
var _local6 = m_mc.Anime._x - (_local3 * Math.cos(_local5));
var _local8 = m_mc.Anime._y + (_local3 * Math.sin(_local5));
if (_local6 < ((app.sys.Screen.WIDTH - m_mc._x) + 30)) {
_local2 = util.MovieClipFactory.createOnMc(m_mc.Light, "CardLightGroupMC", "Light");
_local2._x = _local6;
_local2._y = _local8;
_local2.gotoAndStop(Math.floor(Math.random() * _local2._totalframes) + 1);
_local2._xscale = (Math.random() * 50) + 50;
_local2._yscale = (Math.random() * 50) + 50;
_local2._rotation = Math.random() * 360;
_local2.xspeed = 0;
_local2.yspeed = (Math.random() * 75) + 25;
_local2.live = (Math.random() * 1) + 0.5;
_local2._visible = true;
m_mcList.push(_local2);
}
_local4++;
}
}
for (var _local10 in m_mcList) {
_local2 = m_mcList[_local10];
if (_local2 != undefined) {
_local2.live = _local2.live - _local7;
if (_local2.live > 0) {
_local2._x = _local2._x + (_local2.xspeed * _local7);
_local2._y = _local2._y + (_local2.yspeed * _local7);
_local9 = true;
} else {
_local2.removeMovieClip();
m_mcList[_local10] = undefined;
}
}
}
m_isAlive = _local9 || (m_mc._currentframe < m_mc._totalframes);
return(true);
}
}
Symbol 636 MovieClip [__Packages.app.flow.GameMainFlow] Frame 0
class app.flow.GameMainFlow extends app.flow.Flow implements app.sys.SceneGraphListener
{
var m_loop, m_context, m_mode, m_isDestroy, m_result;
function GameMainFlow (preFlow) {
super(app.flow.Flow.FM_GAME, preFlow);
m_loop = new app.loop.GameMainLoop(m_context, this, preFlow);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
}
function move(mode) {
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callMove();
}
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callCtrl();
}
}
function movePause(mode) {
m_loop.move();
}
function disp(mode) {
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callDisp();
}
}
function destroy() {
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
app.sys.SysInfo.__get__WorkList().callDestroyByAttr(m_context.getAttr());
m_isDestroy = true;
}
function onSceneGraphEvent(eventID, param) {
if (((eventID == app.sys.SceneGraph.EID_FLOW_TITLE) || (eventID == app.sys.SceneGraph.EID_FLOW_CONTINUE)) || (eventID == app.sys.SceneGraph.EID_FLOW_NEXT)) {
m_result = eventID;
}
}
}
Symbol 637 MovieClip [__Packages.app.loop.GameMainLoop] Frame 0
class app.loop.GameMainLoop extends app.loop.BaseLoop implements app.sys.SceneGraphListener
{
var m_mode, m_count, m_mcMenu, m_context, m_nowTimeMin, m_nowTimeSec, m_nowRestHint, m_nowRestShuffle, m_nowRemainder, initCursor, m_curMenuIdx, m_mainMenuIdx, m_titleMenuIdx, m_restTime, m_restHint, m_restShuffle, m_eraseCardNum, m_remainder, m_isActiveTime, m_lastTime, m_isFirst, m_timeColor, m_chaCount, m_chaDealCount, m_mcCardList, m_mcLightBase, m_cardLightGroup, m_mcCardAnime1MC, m_mcCardAnime2MC, m_mcBack, m_mcMask, playDispEffect, createCursor, m_mcCurrent, m_isShowMenu, m_isMenuUpdate, m_isSelectUpdate, m_nowMainIndex, m_nowSubIndex, m_cardRestDeal, m_cardCurIdx, m_cardMaxIdx, m_checkMouseMove, hideCursor, destroyCursor, moveMenu, m_menuAction, playMove, playSelect, m_cardHitNum, m_checkMouseClick, m_cardSelectOne, m_cardSelectTwo, showCursor, m_cardPreHitNum, m_mcNext, m_page, m_checkMouseWheel, m_keyAction, showMenu, selectMenu, m_wl, m_btnMcList, m_btnShowMcList, m_cardList, m_cardDisplayList, m_cardEndCount;
function GameMainLoop (context, nowFlow, preFlow) {
super(context, nowFlow, preFlow);
m_mode = MD_MASK_START_IN;
m_count = 0;
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "GameMC", "Title", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
m_nowTimeMin = -1;
m_nowTimeSec = -1;
m_nowRestHint = -1;
m_nowRestShuffle = -1;
m_nowRemainder = -1;
initCursor();
Mouse.addListener(this);
m_curMenuIdx = MENU_GAME;
m_mainMenuIdx = 0;
m_titleMenuIdx = 0;
m_restTime = TIME_MAX;
m_restHint = SHUFFLE_MAX;
m_restShuffle = HINT_MAX;
m_eraseCardNum = 0;
m_remainder = CARD_MAX;
m_isActiveTime = false;
m_lastTime = getTimer();
m_isFirst = true;
m_timeColor = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
m_chaCount = 0;
m_chaDealCount = 0;
m_mcCardList = [];
var _local3 = 0;
while (_local3 < CARD_MAX) {
var _local4;
_local4 = util.MovieClipFactory.createOnMc(m_mcMenu.CardDummy, "CardMC", "Card", m_context.getBase());
m_mcCardList.push(_local4);
_local3++;
}
m_mcLightBase = util.MovieClipFactory.createEmptyOnMc(m_mcMenu.CardDummy, "CardMC");
m_cardLightGroup = new app.enemy.CardLightGroup(m_mcLightBase);
m_mcCardAnime1MC = util.MovieClipFactory.createEmptyOnMc(m_mcMenu.CardDummy, "CardMC");
m_mcCardAnime2MC = util.MovieClipFactory.createEmptyOnMc(m_mcMenu.CardDummy, "CardMC");
cardInit();
cardShuffle(-1);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
}
function move() {
var _local2 = getTimer();
if (m_isActiveTime && (!m_isFirst)) {
m_restTime = m_restTime - (_local2 - m_lastTime);
}
m_lastTime = _local2;
switch (m_mode) {
case MD_MASK_START_IN :
m_mcBack = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "DummyMC", "Dummy", m_context.getBase());
m_mcBack.attachBitmap(app.sys.SysInfo.__get__BitmapData(), 24, "never", false);
m_mcBack._visible = true;
m_mcMask = new app.enemy.Mask01(app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2, m_mcMenu);
playDispEffect();
createCursor();
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_GAME;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_count = 0;
m_mode = MD_MASK_START;
break;
case MD_MASK_START :
if ((m_mcMask != undefined) && (!m_mcMask.isAlive())) {
m_mcMask.destroy();
m_mcMask = undefined;
m_mcBack.removeMovieClip();
m_mcBack = undefined;
playBGM();
m_mode = MD_CARD_DEAL_IN;
m_cardRestDeal = 12;
m_cardCurIdx = 0;
}
break;
case MD_CARD_DEAL_IN :
m_isActiveTime = true;
if (m_cardCurIdx < m_cardMaxIdx) {
cardAddDisplayList(m_cardCurIdx);
m_cardCurIdx++;
m_cardRestDeal--;
m_count = 0;
m_remainder--;
m_chaDealCount = CHA_DEAL_SPAN;
new app.enemy.StickLight(m_mcMenu, CHA_LIGHT_X, CHA_LIGHT_Y + (CHA_MOVE_Y * Math.sin(((m_chaCount / CHA_MOVE_SPAN) * Math.PI) * 2)));
} else {
m_cardRestDeal = 0;
}
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_GAME;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_CARD_DEAL;
break;
case MD_CARD_DEAL :
m_count = m_count + app.sys.SysInfo.getRate();
if (m_cardRestDeal > 0) {
if (m_count > CARD_DEAL_WAIT_TIME) {
m_mode = MD_CARD_DEAL_IN;
}
} else if (cardWait()) {
if (((m_restShuffle <= 0) && (m_cardCurIdx >= m_cardMaxIdx)) && (cardRestCheck() == 0)) {
m_mode = MD_GAME_OVER_IN;
} else if (m_isFirst) {
m_mode = MD_GAME_START_IN;
} else {
m_mode = MD_GAME_MAIN_IN;
}
}
break;
case MD_GAME_START_IN :
playGameStart();
new app.enemy.GameStartEffect(-85, 0, 1500);
m_count = 0;
m_mode = MD_GAME_START;
break;
case MD_GAME_START :
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count >= 1500) {
m_isFirst = false;
m_mode = MD_GAME_MAIN_IN;
}
break;
case MD_GAME_MAIN_IN :
m_isActiveTime = true;
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_GAME;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
cardSelectClearDisplay();
cardSelectClearNum();
cardHitClear();
m_count = 0;
m_mode = MD_GAME_MAIN;
break;
case MD_GAME_MAIN :
var _local3 = m_mainMenuIdx;
if (m_count == 0) {
m_checkMouseMove = true;
}
m_count = m_count + app.sys.SysInfo.getRate();
if (m_restTime < 0) {
cardSelectClearDisplay();
cardSelectClearNum();
hideCursor();
destroyCursor();
m_mode = MD_TIME_OVER_IN;
} else if (moveMenu()) {
switch (m_menuAction) {
case app.loop.BaseLoop.ACT_MOVE :
playMove();
break;
case app.loop.BaseLoop.ACT_ENTER :
switch (m_mainMenuIdx) {
case GAME_HINT :
playSelect();
if (m_restHint > 0) {
m_mode = MD_HINT_IN;
hideCursor();
destroyCursor();
}
break;
case GAME_SHUFFLE :
playSelect();
if (m_restShuffle > 0) {
m_mode = MD_SHUFFLE_IN;
hideCursor();
destroyCursor();
}
break;
case GAME_DEAL :
cardSelectClearDisplay();
cardSelectClearNum();
m_cardRestDeal = 4;
m_mode = MD_CARD_DEAL_IN;
hideCursor();
destroyCursor();
break;
case GAME_MENU :
m_mode = MD_GAME_MENU_IN;
hideCursor();
destroyCursor();
}
}
m_cardHitNum = -1;
} else if (cardCheckHit()) {
if (m_checkMouseClick) {
if (cardSelectUpdate()) {
if ((m_cardSelectOne != -1) && (m_cardSelectTwo != -1)) {
if (cardSelectCheck()) {
m_mode = MD_ERASE_IN;
hideCursor();
} else {
playPairError();
cardSelectClearDisplay();
cardSelectClearNum();
showCursor();
}
} else {
playSelectCard();
showCursor();
}
} else {
playSelectCard();
showCursor();
}
} else if (m_checkMouseMove) {
showCursor();
}
}
cardHitUpdate();
m_mainMenuIdx = m_nowMainIndex;
if (_local3 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_ERASE_IN :
m_isActiveTime = true;
cardSelectClearDisplay();
cardHitClear();
cardErase();
m_eraseCardNum = m_eraseCardNum + 2;
m_mode = MD_ERASE;
break;
case MD_ERASE :
if (cardWait()) {
cardRemove();
m_mode = MD_ERASE_MOVE;
}
break;
case MD_ERASE_MOVE :
if (cardWait()) {
if (m_eraseCardNum >= CARD_MAX) {
m_mode = MD_GAME_CLEAR_IN;
} else if (((m_restShuffle <= 0) && (m_cardCurIdx >= m_cardMaxIdx)) && (cardRestCheck() == 0)) {
m_mode = MD_GAME_OVER_IN;
} else {
m_mode = MD_GAME_MAIN_IN;
}
}
break;
case MD_HINT_IN :
m_isActiveTime = true;
new app.enemy.GameItemEffect(-85, 0, app.enemy.GameItemEffect.HINT, HINT_DISPLAY_TIME);
cardHintCheck();
playHintShuffle();
m_count = 0;
m_mode = MD_HINT;
break;
case MD_HINT :
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count >= HINT_BLINK_TIME) {
m_restHint--;
cardHintClear();
m_mode = MD_GAME_MAIN_IN;
}
break;
case MD_SHUFFLE_IN :
m_isActiveTime = true;
new app.enemy.GameItemEffect(-85, 0, app.enemy.GameItemEffect.SHUFFLE, SHUFFLE_DISPLAY_TIME);
playHintShuffle();
cardShuffleMove();
m_count = 0;
m_mode = MD_SHUFFLE;
break;
case MD_SHUFFLE :
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count >= 1000) && (cardWait())) {
cardRestCollect();
cardShuffle(m_cardMaxIdx);
m_restShuffle--;
m_cardRestDeal = 12;
m_remainder = m_cardMaxIdx;
m_cardSelectOne = (m_cardSelectTwo = -1);
m_cardHitNum = (m_cardPreHitNum = -1);
m_mode = MD_CARD_DEAL_IN;
}
break;
case MD_GAME_CLEAR_IN :
m_isActiveTime = false;
stopBGM();
new app.enemy.GameResultEffect(0, 0, app.enemy.GameResultEffect.GAMECLEAR, 3000);
playGameClear();
m_mode = MD_GAME_CLEAR;
m_count = 0;
break;
case MD_GAME_CLEAR :
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count >= 3000) {
app.sys.SysInfo.__set__ResultEraseCardNum(m_eraseCardNum);
app.sys.SysInfo.__set__ResultRestTime(Math.floor(m_restTime / 1000));
app.sys.SysInfo.__set__ResultRestHint(m_restHint);
app.sys.SysInfo.__set__ResultRestShuffle(m_restShuffle);
app.sys.SysInfo.__get__BitmapData().draw(m_mcMenu, new flash.geom.Matrix(1, 0, 0, 1, app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2));
app.sys.SysInfo.__set__IsUseBitmap(true);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_NEXT, undefined);
m_mode = MD_END;
}
break;
case MD_TIME_OVER_IN :
m_isActiveTime = false;
stopBGM();
new app.enemy.GameResultEffect(0, 0, app.enemy.GameResultEffect.TIMEOVER, 3000);
playTimeOver();
m_mode = MD_TIME_OVER;
m_count = 0;
break;
case MD_TIME_OVER :
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count >= 3000) {
app.sys.SysInfo.__set__ResultEraseCardNum(m_eraseCardNum);
app.sys.SysInfo.__set__ResultRestTime(0);
if (m_eraseCardNum > 0) {
app.sys.SysInfo.__set__ResultRestHint(m_restHint);
app.sys.SysInfo.__set__ResultRestShuffle(m_restShuffle);
} else {
app.sys.SysInfo.__set__ResultRestHint(0);
app.sys.SysInfo.__set__ResultRestShuffle(0);
}
app.sys.SysInfo.__get__BitmapData().draw(m_mcMenu, new flash.geom.Matrix(1, 0, 0, 1, app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2));
app.sys.SysInfo.__set__IsUseBitmap(true);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_NEXT, undefined);
m_mode = MD_END;
}
break;
case MD_GAME_OVER_IN :
m_isActiveTime = false;
stopBGM();
new app.enemy.GameResultEffect(0, 0, app.enemy.GameResultEffect.GAMEOVER, 3000);
playTimeOver();
m_mode = MD_GAME_OVER;
m_count = 0;
break;
case MD_GAME_OVER :
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count >= 3000) {
app.sys.SysInfo.__set__ResultEraseCardNum(m_eraseCardNum);
app.sys.SysInfo.__set__ResultRestTime(Math.floor(m_restTime / 1000));
app.sys.SysInfo.__set__ResultRestHint(m_restHint);
app.sys.SysInfo.__set__ResultRestShuffle(m_restShuffle);
app.sys.SysInfo.__get__BitmapData().draw(m_mcMenu, new flash.geom.Matrix(1, 0, 0, 1, app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2));
app.sys.SysInfo.__set__IsUseBitmap(true);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_NEXT, undefined);
m_mode = MD_END;
}
break;
case MD_GAME_MENU_IN :
m_isActiveTime = false;
if (m_mcNext != undefined) {
m_mcNext.removeMovieClip();
}
m_mcNext = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "GameMenuMC", "GameMenu", m_context.getBase());
m_mcNext._x = app.sys.Screen.WIDTH / 2;
m_mcNext._y = app.sys.Screen.HEIGHT / 2;
m_mcNext.gotoAndStop(1);
m_mcNext._visible = true;
createCursor();
m_mcCurrent = m_mcNext;
m_page = 1;
m_curMenuIdx = MENU_MENU;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = 0;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_GAME_MENU;
m_count = 0;
break;
case MD_GAME_MENU :
_local3 = m_mainMenuIdx;
if (m_count == 0) {
m_checkMouseMove = true;
}
m_count = m_count + app.sys.SysInfo.getRate();
if (moveMenu()) {
switch (m_menuAction) {
case app.loop.BaseLoop.ACT_MOVE :
playMove();
break;
case app.loop.BaseLoop.ACT_ENTER :
switch (m_mainMenuIdx) {
case GAME_MENU_SOUND_ON :
app.sys.SysInfo.__get__Option().__set__Se(true);
app.sys.SysInfo.__get__Option().__set__Bgm(true);
app.sys.SysInfo.__get__SoundManager().setSEEnable(app.sys.SysInfo.__get__Option().__get__Se());
app.sys.SysInfo.__get__SoundManager().setBGMEnable(app.sys.SysInfo.__get__Option().__get__Bgm());
app.sys.SysInfo.__get__Option().save();
playBGM();
initMenu(m_curMenuIdx);
m_count = 0;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
break;
case GAME_MENU_SOUND_OFF :
app.sys.SysInfo.__get__Option().__set__Se(false);
app.sys.SysInfo.__get__Option().__set__Bgm(false);
app.sys.SysInfo.__get__SoundManager().setSEEnable(app.sys.SysInfo.__get__Option().__get__Se());
app.sys.SysInfo.__get__SoundManager().setBGMEnable(app.sys.SysInfo.__get__Option().__get__Bgm());
app.sys.SysInfo.__get__Option().save();
stopBGM();
initMenu(m_curMenuIdx);
m_count = 0;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
break;
case GAME_MENU_HELP :
m_mode = MD_HELP_MENU_IN;
hideCursor();
destroyCursor();
break;
case GAME_MENU_BACK :
m_mcNext.removeMovieClip();
m_mcNext = undefined;
m_mode = MD_GAME_MAIN_IN;
hideCursor();
destroyCursor();
break;
case GAME_MENU_RETIRE :
m_mode = MD_CONFIRM_IN;
hideCursor();
destroyCursor();
}
playSelect();
}
}
m_mainMenuIdx = m_nowMainIndex;
if (_local3 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_CONFIRM_IN :
m_isActiveTime = false;
if (m_mcNext != undefined) {
m_mcNext.removeMovieClip();
}
m_mcNext = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "ConfirmMC", "Confirm", m_context.getBase());
m_mcNext._x = app.sys.Screen.WIDTH / 2;
m_mcNext._y = app.sys.Screen.HEIGHT / 2;
m_mcNext.gotoAndStop(1);
m_mcNext._visible = true;
createCursor();
m_mcCurrent = m_mcNext;
m_curMenuIdx = MENU_CONFIRM;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_CONFIRM;
m_count = 0;
break;
case MD_CONFIRM :
_local3 = m_mainMenuIdx;
if (m_count == 0) {
m_checkMouseMove = true;
}
m_count = m_count + app.sys.SysInfo.getRate();
if (moveMenu()) {
switch (m_menuAction) {
case app.loop.BaseLoop.ACT_MOVE :
playMove();
break;
case app.loop.BaseLoop.ACT_ENTER :
switch (m_mainMenuIdx) {
case CONFIRM_YES :
m_mcNext.removeMovieClip();
stopBGM();
app.sys.SysInfo.__get__BitmapData().draw(m_mcMenu, new flash.geom.Matrix(1, 0, 0, 1, app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2));
app.sys.SysInfo.__set__IsUseBitmap(true);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_TITLE, undefined);
m_mode = MD_END;
hideCursor();
destroyCursor();
break;
case CONFIRM_NO :
m_mode = MD_GAME_MENU_IN;
hideCursor();
destroyCursor();
}
playSelect();
}
}
m_mainMenuIdx = m_nowMainIndex;
if (_local3 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_HELP_MENU_IN :
m_isActiveTime = false;
if (m_mcNext != undefined) {
m_mcNext.removeMovieClip();
}
m_mcNext = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "HelpMC", "Help", m_context.getBase());
m_mcNext._x = app.sys.Screen.WIDTH / 2;
m_mcNext._y = app.sys.Screen.HEIGHT / 2;
m_mcNext.gotoAndStop(1);
m_mcNext._visible = true;
createCursor();
m_mcCurrent = m_mcNext;
m_page = 1;
m_curMenuIdx = MENU_HELP;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = 0;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_HELP_MENU;
m_count = 0;
break;
case MD_HELP_MENU :
_local3 = m_mainMenuIdx;
if (m_count == 0) {
m_checkMouseMove = true;
}
m_count = m_count + app.sys.SysInfo.getRate();
if (moveMenu()) {
switch (m_menuAction) {
case app.loop.BaseLoop.ACT_MOVE :
playMove();
break;
case app.loop.BaseLoop.ACT_ENTER :
switch (m_mainMenuIdx) {
case HELP_PREV :
if (m_page > 1) {
m_page--;
m_mcNext.gotoAndStop(m_page);
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_count = 0;
}
break;
case HELP_NEXT :
if (m_page < HELP_PAGE_MAX) {
m_page++;
m_mcNext.gotoAndStop(m_page);
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_count = 0;
}
break;
case HELP_BACK :
m_mode = MD_GAME_MENU_IN;
hideCursor();
destroyCursor();
}
playSelect();
}
}
m_mainMenuIdx = m_nowMainIndex;
if (_local3 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_END :
}
m_checkMouseClick = false;
m_checkMouseMove = false;
m_checkMouseWheel = 0;
m_keyAction = -1;
if (m_chaDealCount > 0) {
m_chaDealCount = m_chaDealCount - app.sys.SysInfo.getRate();
if (m_chaDealCount < 0) {
m_chaDealCount = 0;
}
} else {
m_chaCount = m_chaCount + app.sys.SysInfo.getRate();
}
cardUpdate();
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local5;
var _local2;
switch (m_curMenuIdx) {
case MENU_GAME :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
if (m_restTime < 30000) {
var _local3;
_local3 = m_restTime % 1000;
_local3 = ((_local3 < 500) ? (500 - _local3) : (_local3 - 500)) / 500;
m_timeColor.redOffset = 255;
m_timeColor.blueOffset = -75;
m_timeColor.greenOffset = -75;
m_mcMenu.Time.transform.colorTransform = m_timeColor;
m_mcMenu.Time._alpha = 25 + (_local3 * 75);
}
_local2 = Math.floor(m_restTime / 60000);
if (m_nowTimeMin != _local2) {
if (_local2 >= 10) {
m_mcMenu.Time.TimeStr.M1.gotoAndStop(Math.floor(_local2 / 10) + 1);
m_mcMenu.Time.TimeStr.M1._visible = true;
} else {
m_mcMenu.Time.TimeStr.M1.stop();
m_mcMenu.Time.TimeStr.M1._visible = false;
}
m_mcMenu.Time.TimeStr.M0.gotoAndStop((_local2 % 10) + 1);
m_nowTimeMin = _local2;
}
_local2 = Math.floor(Math.floor(m_restTime / 1000) % 60);
if (m_nowTimeSec != _local2) {
m_mcMenu.Time.TimeStr.S1.gotoAndStop(Math.floor(_local2 / 10) + 1);
m_mcMenu.Time.TimeStr.S0.gotoAndStop((_local2 % 10) + 1);
m_nowTimeSec = _local2;
}
if (m_nowRestHint != m_restHint) {
m_mcMenu.H_N0.gotoAndStop(m_restHint + 1);
m_nowRestHint = m_restHint;
}
if (m_nowRestShuffle != m_restShuffle) {
m_mcMenu.S_N0.gotoAndStop(m_restShuffle + 1);
m_nowRestShuffle = m_restShuffle;
}
if (m_nowRemainder != m_remainder) {
m_mcMenu.Remainder.N1.gotoAndStop(Math.floor(m_remainder / 10) + 1);
m_mcMenu.Remainder.N0.gotoAndStop((m_remainder % 10) + 1);
m_nowRemainder = m_remainder;
}
var _local4;
_local4 = (m_cardCurIdx < m_cardMaxIdx) || (m_chaDealCount > 0);
if (m_mcMenu.Cha01._visible != _local4) {
m_mcMenu.Cha01._visible = _local4;
}
if (m_mcMenu.Cha02._visible == _local4) {
m_mcMenu.Cha02._visible = !_local4;
}
m_mcMenu.Cha01._y = (CHA_POS_Y + (CHA_MOVE_Y * Math.sin(((m_chaCount / CHA_MOVE_SPAN) * Math.PI) * 2))) + (CHA_DEAL_Y * Math.sin(((m_chaDealCount / CHA_DEAL_SPAN) * Math.PI) * 2));
m_mcMenu.Cha02._y = CHA_POS_Y + (CHA_MOVE_Y * Math.sin(((m_chaCount / CHA_MOVE_SPAN) * Math.PI) * 2));
break;
case MENU_MENU :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
break;
case MENU_CONFIRM :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
break;
case MENU_HELP :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (!m_isSelectUpdate) {
break;
}
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
}
function destroy() {
super.destroy();
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
Key.removeListener(this);
Mouse.removeListener(this);
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
m_cardLightGroup.destroy();
m_mcMenu.removeMovieClip();
}
function initMenu(idx) {
var _local2;
m_btnMcList = [];
m_btnShowMcList = [];
switch (idx) {
case MENU_GAME :
_local2 = m_mcCurrent;
m_btnMcList.push({mc:_local2.HintBtn, hit:_local2.HintBtn.Hit});
m_btnMcList.push({mc:_local2.ShuffleBtn, hit:_local2.ShuffleBtn.Hit});
m_btnMcList.push({mc:_local2.DealBtn, hit:_local2.DealBtn.Hit});
m_btnMcList.push({mc:_local2.MenuBtn, hit:_local2.MenuBtn.Hit});
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
m_btnShowMcList.push(m_cardCurIdx < m_cardMaxIdx);
m_btnShowMcList.push(true);
break;
case MENU_MENU :
_local2 = m_mcCurrent;
m_btnMcList.push({mc:_local2.SoundOnBtn, hit:_local2.SoundOnBtn.Hit, show:_local2.SoundOnBtn});
m_btnMcList.push({mc:_local2.SoundOffBtn, hit:_local2.SoundOffBtn.Hit, show:_local2.SoundOffBtn});
m_btnMcList.push({mc:_local2.HelpBtn, hit:_local2.HelpBtn.Hit, show:_local2.HelpBtn});
m_btnMcList.push({mc:_local2.BackBtn, hit:_local2.BackBtn.Hit, show:_local2.BackBtn});
m_btnMcList.push({mc:_local2.RetireBtn, hit:_local2.RetireBtn.Hit, show:_local2.RetireBtn});
m_btnShowMcList.push(!app.sys.SysInfo.__get__Option().__get__Se());
m_btnShowMcList.push(app.sys.SysInfo.__get__Option().__get__Se());
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
break;
case MENU_CONFIRM :
_local2 = m_mcCurrent;
m_btnMcList.push({mc:_local2.YesBtn, hit:_local2.YesBtn.Hit});
m_btnMcList.push({mc:_local2.NoBtn, hit:_local2.NoBtn.Hit});
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
break;
case MENU_HELP :
_local2 = m_mcCurrent;
m_btnMcList.push({show:_local2.PrevBtn, mc:_local2.PrevBtn, hit:_local2.PrevBtn.Hit});
m_btnMcList.push({show:_local2.BackBtn, mc:_local2.BackBtn, hit:_local2.BackBtn.Hit});
m_btnMcList.push({show:_local2.NextBtn, mc:_local2.NextBtn, hit:_local2.NextBtn.Hit});
m_btnShowMcList.push(m_page > 1);
m_btnShowMcList.push(true);
m_btnShowMcList.push(m_page < HELP_PAGE_MAX);
}
}
function cardInit() {
m_cardList = [];
var _local3 = 1;
while (_local3 <= CARD_TYPE_MAX) {
var _local2 = 1;
while (_local2 <= CARD_NUM_MAX) {
m_cardList.push((_local3 * 16) + _local2);
_local2++;
}
_local3++;
}
m_cardDisplayList = [];
m_cardMaxIdx = CARD_MAX;
}
function cardShuffle(num) {
var _local10;
if (num == -1) {
_local10 = CARD_MAX;
} else {
_local10 = num;
}
var _local3 = 0;
while (_local3 < 100) {
var _local6;
var _local5;
var _local8;
var _local7;
_local6 = Math.floor(Math.random() * _local10);
_local5 = Math.floor(Math.random() * _local10);
_local8 = m_cardList[_local6];
_local7 = m_cardList[_local5];
m_cardList[_local6] = _local7;
m_cardList[_local5] = _local8;
_local3++;
}
_local3 = 0;
while (_local3 < CARD_MAX) {
var _local2;
var _local9;
_local9 = Math.floor(m_cardList[_local3] / 16);
num = m_cardList[_local3] % 16;
_local2 = m_mcCardList[_local3];
_local2.stop();
_local2.Card.gotoAndStop(_local9);
_local2.Card.Type.gotoAndStop((((num >= 11) || (num == 1)) ? 2 : 1));
_local2.Card.Type.Num.gotoAndStop(num);
_local2.Select.stop();
_local2.Select._visible = false;
_local2.Hit.stop();
_local2.Hit._visible = false;
_local2.Hint.stop();
_local2.Hint._visible = false;
_local2._visible = false;
_local3++;
}
m_cardCurIdx = 0;
}
function cardShuffleMove() {
var _local3;
_local3 = m_cardDisplayList.length;
var _local2 = 0;
while (_local2 < _local3) {
m_cardDisplayList[_local2].mode = CMD_SHUFFLE;
_local2++;
}
m_cardEndCount = 0;
}
function cardRestCollect() {
var _local3;
var _local4;
_local3 = m_cardDisplayList.length;
var _local2 = 0;
while (_local2 < _local3) {
_local4 = m_cardDisplayList[_local2].cardNum;
m_cardList[_local2] = m_cardList[_local4];
_local2++;
}
_local2 = m_cardCurIdx;
while (_local2 < m_cardMaxIdx) {
m_cardList[(_local3 + _local2) - m_cardCurIdx] = m_cardList[_local2];
_local2++;
}
m_cardMaxIdx = (_local3 + m_cardMaxIdx) - m_cardCurIdx;
while (m_cardDisplayList.length > 0) {
var _local5 = m_cardDisplayList.pop();
}
}
function cardRestCheck() {
var _local9;
var _local7;
var _local6;
var _local14;
var _local13;
var _local11;
var _local10;
var _local8;
var _local2;
var _local12;
var _local15;
_local12 = 0;
_local9 = m_cardDisplayList.length;
var _local5 = 0;
while (_local5 < _local9) {
_local7 = _local5 % 4;
_local6 = Math.floor(_local5 / 4);
_local14 = Math.max(0, _local7 - 1);
_local13 = Math.min(3, _local7 + 1);
_local11 = Math.max(0, _local6 - 1);
_local10 = _local6 + 1;
_local8 = m_cardDisplayList[_local5].cardNum;
_local8 = m_cardList[_local8] % 16;
var _local4 = _local14;
while (_local4 <= _local13) {
var _local3 = _local11;
while (_local3 <= _local10) {
if ((_local4 == _local7) && (_local3 == _local6)) {
} else {
_local2 = (_local3 * 4) + _local4;
if (_local2 >= _local9) {
} else {
_local2 = m_cardDisplayList[_local2].cardNum;
_local2 = m_cardList[_local2] % 16;
if (_local8 == _local2) {
_local12++;
}
}
}
_local3++;
}
_local4++;
}
_local5++;
}
return(_local12);
}
function cardHintCheck() {
var _local10;
var _local8;
var _local7;
var _local15;
var _local13;
var _local12;
var _local11;
var _local9;
var _local2;
var _local6;
var _local14;
_local10 = m_cardDisplayList.length;
var _local5 = 0;
while (_local5 < _local10) {
_local8 = _local5 % 4;
_local7 = Math.floor(_local5 / 4);
_local15 = Math.max(0, _local8 - 1);
_local13 = Math.min(3, _local8 + 1);
_local12 = Math.max(0, _local7 - 1);
_local11 = _local7 + 1;
_local9 = m_cardDisplayList[_local5].cardNum;
_local9 = m_cardList[_local9] % 16;
_local6 = false;
var _local4 = _local15;
while (_local4 <= _local13) {
var _local3 = _local12;
while (_local3 <= _local11) {
if ((_local4 == _local8) && (_local3 == _local7)) {
} else {
_local2 = (_local3 * 4) + _local4;
if (_local2 >= _local10) {
} else {
_local2 = m_cardDisplayList[_local2].cardNum;
_local2 = m_cardList[_local2] % 16;
if (_local9 == _local2) {
_local6 = true;
break;
}
}
}
_local3++;
}
if (_local6) {
break;
}
_local4++;
}
if (_local6) {
_local14 = m_cardDisplayList[_local5].mc;
_local14.Hint._visible = true;
_local14.Hint.gotoAndPlay(1);
}
_local5++;
}
}
function cardHintClear() {
var _local4;
var _local3;
_local4 = m_cardDisplayList.length;
var _local2 = 0;
while (_local2 < _local4) {
_local3 = m_cardDisplayList[_local2].mc;
_local3.Hint._visible = false;
_local3.Hint.stop();
_local2++;
}
}
function cardAddDisplayList(cardNum) {
var _local3;
var _local6;
var _local5;
var _local4 = {};
_local6 = Math.floor((m_cardDisplayList.length - 1) / 4);
_local4.mode = CMD_APPEAR;
_local4.count = 0;
_local4.mc = m_mcCardList[cardNum];
_local4.cardNum = cardNum;
m_cardDisplayList.push(_local4);
_local5 = Math.floor((m_cardDisplayList.length - 1) / 4);
if (_local6 != _local5) {
if (_local5 >= 4) {
_local3 = m_cardDisplayList.length;
var _local2 = 4;
while (_local2 < _local3) {
if (m_cardDisplayList[_local2].mode == CMD_NONE) {
m_cardDisplayList[_local2].mode = CMD_MOVE;
}
_local2++;
}
}
}
}
function cardCheckHit() {
var _local4;
var _local5;
var _local3;
var _local8;
var _local2;
var _local7;
var _local6;
m_cardHitNum = -1;
_local4 = Math.floor((m_cardDisplayList.length - 1) / 4);
_local5 = m_mcMenu.CardDummy._xmouse;
_local3 = m_mcMenu.CardDummy._ymouse;
if ((((CARD_BASE_X < _local5) && (_local5 < ((CARD_BASE_X + CARD_AREA_WIDTH) + CARD_WIDTH))) && (CARD_BASE_Y < _local3)) && (_local3 < ((CARD_BASE_Y + CARD_AREA_HEIGHT) + CARD_HEIGHT))) {
_local8 = Math.floor((_local5 - CARD_BASE_X) / CARD_PER_WIDTH);
if (_local4 < 4) {
_local2 = Math.floor((_local3 - CARD_BASE_Y) / CARD_PER_HEIGHT);
} else {
_local6 = CARD_AREA_HEIGHT / _local4;
_local2 = Math.floor((_local3 - CARD_BASE_Y) / _local6);
if (_local2 >= _local4) {
_local2 = _local4;
if ((m_cardDisplayList.length % 4) > 0) {
if ((CARD_BASE_X + ((m_cardDisplayList.length % 4) * CARD_PER_WIDTH)) <= _local5) {
if (((CARD_BASE_Y + ((_local2 - 1) * _local6)) < _local3) && (_local3 < ((CARD_BASE_Y + ((_local2 - 1) * _local6)) + CARD_HEIGHT))) {
_local2--;
}
}
}
}
}
_local7 = (_local2 * 4) + _local8;
if (_local7 < m_cardDisplayList.length) {
m_cardHitNum = _local7;
}
}
return(m_cardHitNum != -1);
}
function cardHitUpdate() {
if (m_cardHitNum != m_cardPreHitNum) {
if (m_cardPreHitNum != -1) {
m_cardDisplayList[m_cardPreHitNum].mc.Hit._visible = false;
m_cardDisplayList[m_cardPreHitNum].mc.Hit.stop();
}
if (m_cardHitNum != -1) {
m_cardDisplayList[m_cardHitNum].mc.Hit._visible = true;
m_cardDisplayList[m_cardHitNum].mc.Hit.gotoAndPlay(1);
}
m_cardPreHitNum = m_cardHitNum;
}
}
function cardHitClear() {
if (m_cardPreHitNum != -1) {
m_cardDisplayList[m_cardPreHitNum].mc.Hit._visible = false;
m_cardDisplayList[m_cardPreHitNum].mc.Hit.stop();
}
if (m_cardHitNum != -1) {
m_cardDisplayList[m_cardHitNum].mc.Hit._visible = false;
m_cardDisplayList[m_cardHitNum].mc.Hit.stop();
}
m_cardHitNum = (m_cardPreHitNum = -1);
}
function cardSelectUpdate() {
if (m_cardHitNum == -1) {
return(false);
}
if (m_cardSelectOne == m_cardHitNum) {
m_cardDisplayList[m_cardSelectOne].mc.Select._visible = false;
m_cardDisplayList[m_cardSelectOne].mc.Select.stop();
m_cardSelectOne = -1;
return(false);
}
if (m_cardSelectOne == -1) {
m_cardSelectOne = m_cardHitNum;
m_cardDisplayList[m_cardSelectOne].mc.Select._visible = true;
m_cardDisplayList[m_cardSelectOne].mc.Select.gotoAndPlay(1);
return(true);
}
if (m_cardSelectTwo == -1) {
var _local5;
var _local3;
var _local4;
var _local2;
_local5 = m_cardSelectOne % 4;
_local4 = Math.floor(m_cardSelectOne / 4);
_local3 = m_cardHitNum % 4;
_local2 = Math.floor(m_cardHitNum / 4);
if (((((_local5 - 1) <= _local3) && (_local3 <= (_local5 + 1))) && ((_local4 - 1) <= _local2)) && (_local2 <= (_local4 + 1))) {
m_cardSelectTwo = m_cardHitNum;
m_cardDisplayList[m_cardSelectTwo].mc.Select._visible = true;
m_cardDisplayList[m_cardSelectTwo].mc.Select.gotoAndPlay(1);
return(true);
}
m_cardDisplayList[m_cardSelectOne].mc.Select._visible = false;
m_cardDisplayList[m_cardSelectOne].mc.Select.stop();
m_cardSelectOne = m_cardHitNum;
m_cardDisplayList[m_cardSelectOne].mc.Select._visible = true;
m_cardDisplayList[m_cardSelectOne].mc.Select.gotoAndPlay(1);
return(true);
}
return(false);
}
function cardSelectClearDisplay() {
if (m_cardSelectOne != -1) {
m_cardDisplayList[m_cardSelectOne].mc.Select._visible = false;
m_cardDisplayList[m_cardSelectOne].mc.Select.stop();
}
if (m_cardSelectTwo != -1) {
m_cardDisplayList[m_cardSelectTwo].mc.Select._visible = false;
m_cardDisplayList[m_cardSelectTwo].mc.Select.stop();
}
}
function cardSelectClearNum() {
m_cardSelectOne = (m_cardSelectTwo = -1);
}
function cardSelectCheck() {
var _local3;
var _local2;
_local3 = m_cardDisplayList[m_cardSelectOne].cardNum;
_local2 = m_cardDisplayList[m_cardSelectTwo].cardNum;
_local3 = m_cardList[_local3] % 16;
_local2 = m_cardList[_local2] % 16;
return(_local3 == _local2);
}
function cardErase() {
var _local5;
var _local4;
var _local7;
var _local6;
var _local2;
var _local3;
_local5 = m_cardSelectOne % 4;
_local4 = m_cardSelectTwo % 4;
_local7 = Math.floor(m_cardSelectOne / 4);
_local6 = Math.floor(m_cardSelectTwo / 4);
if (_local5 < _local4) {
_local2 = m_cardSelectOne;
_local3 = m_cardSelectTwo;
} else if (_local5 > _local4) {
_local2 = m_cardSelectTwo;
_local3 = m_cardSelectOne;
} else if (_local7 < _local6) {
_local2 = m_cardSelectOne;
_local3 = m_cardSelectTwo;
} else {
_local2 = m_cardSelectTwo;
_local3 = m_cardSelectOne;
}
m_cardDisplayList[_local2].mode = CMD_ERASE;
m_cardDisplayList[_local2].animeMC = m_mcCardAnime1MC;
m_cardDisplayList[_local2].animeNum = 1;
m_cardDisplayList[_local3].mode = CMD_ERASE;
m_cardDisplayList[_local3].animeMC = m_mcCardAnime2MC;
m_cardDisplayList[_local3].animeNum = 2;
}
function cardRemove() {
if (m_cardSelectOne < m_cardSelectTwo) {
m_cardDisplayList.splice(m_cardSelectTwo, 1);
m_cardDisplayList.splice(m_cardSelectOne, 1);
} else {
m_cardDisplayList.splice(m_cardSelectOne, 1);
m_cardDisplayList.splice(m_cardSelectTwo, 1);
}
var _local2 = 0;
while (_local2 < m_cardDisplayList.length) {
if (m_cardDisplayList[_local2].mode == CMD_NONE) {
m_cardDisplayList[_local2].mode = CMD_MOVE;
}
_local2++;
}
}
function cardWait() {
var _local3;
_local3 = m_cardDisplayList.length;
var _local2 = 0;
while (_local2 < _local3) {
if (m_cardDisplayList[_local2].mode != CMD_NONE) {
return(false);
}
_local2++;
}
return(true);
}
function cardUpdate() {
var _local9;
var _local11;
_local9 = Math.floor((m_cardDisplayList.length - 1) / 4);
_local11 = false;
var _local4 = m_cardDisplayList.length - 1;
while (_local4 >= 0) {
var _local2 = m_cardDisplayList[_local4];
var _local3;
if (_local2.mode == CMD_NONE) {
} else {
_local3 = _local2.mc;
switch (_local2.mode) {
case CMD_APPEAR :
_local3.gotoAndPlay("ToOn");
_local3._x = CARD_APPEAR_POS_X;
_local3._y = CARD_APPEAR_POS_Y;
_local3._visible = true;
_local2.mode = CMD_APPEAR_LOOP;
break;
case CMD_APPEAR_LOOP :
if (_local3.isEnd) {
playDeal();
_local2.mode = CMD_MOVE;
}
break;
case CMD_MOVE :
_local2.currentPosX = _local3._x;
_local2.currentPosY = _local3._y;
_local2.targetPosX = (CARD_BASE_X + ((_local4 % 4) * CARD_PER_WIDTH)) + (CARD_WIDTH / 2);
if (_local9 < 4) {
_local2.targetPosY = (CARD_BASE_Y + (Math.floor(_local4 / 4) * CARD_PER_HEIGHT)) + (CARD_HEIGHT / 2);
} else {
_local2.targetPosY = (CARD_BASE_Y + ((Math.floor(_local4 / 4) * CARD_AREA_HEIGHT) / _local9)) + (CARD_HEIGHT / 2);
}
_local2.count = 0;
_local2.curStep = _local9;
_local2.time = CARD_MOVE_WAIT_TIME;
_local2.mode = CMD_MOVE_LOOP;
break;
case CMD_MOVE_LOOP :
_local2.count = _local2.count + app.sys.SysInfo.getRate();
if (_local2.count < _local2.time) {
_local3._x = _local2.currentPosX + (((_local2.targetPosX - _local2.currentPosX) * _local2.count) / _local2.time);
_local3._y = _local2.currentPosY + (((_local2.targetPosY - _local2.currentPosY) * _local2.count) / _local2.time);
} else {
_local3._x = _local2.targetPosX;
_local3._y = _local2.targetPosY;
_local2.mode = CMD_NONE;
}
if (_local9 != _local2.curStep) {
_local2.mode = CMD_MOVE;
}
break;
case CMD_ERASE :
playCardMove();
_local3.swapDepths(_local2.animeMC);
_local2.currentPosX = _local3._x;
_local2.currentPosY = _local3._y;
_local2.targetPosY = CARD_ERASE_Y + (CARD_HEIGHT / 2);
if (_local2.animeNum == 1) {
_local2.targetPosX = CARD_ERASE_X1 + (CARD_WIDTH / 2);
_local2.rot = 1;
} else {
_local2.targetPosX = CARD_ERASE_X2 + (CARD_WIDTH / 2);
_local2.rot = -1;
}
var _local8;
var _local7;
_local8 = _local3._x - _local2.targetPosX;
_local7 = _local3._y - _local2.targetPosY;
_local2.len = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
_local2.rad = Math.atan2(_local7, _local8);
_local2.len2 = Math.sqrt((CARD_ERASE_RAD * CARD_ERASE_RAD) - (_local2.len * _local2.len));
_local2.count = 0;
_local2.time = CARD_ERASE_MOVE_WAIT_TIME;
_local2.mode = CMD_ERASE_MOVE_LOOP;
break;
case CMD_ERASE_MOVE_LOOP :
m_cardLightGroup.add(_local3._x, _local3._y);
_local2.count = _local2.count + app.sys.SysInfo.getRate();
if (_local2.count < _local2.time) {
var _local6;
var _local10;
var _local5;
_local5 = _local2.count / _local2.time;
_local6 = (1 - _local5) * _local2.len2;
_local6 = (_local6 * _local5) + (_local2.len * (1 - _local5));
_local10 = _local2.rad + (((_local2.rot * Math.PI) * 2) * _local5);
_local3._x = _local2.targetPosX + (Math.cos(_local10) * _local6);
_local3._y = _local2.targetPosY + (Math.sin(_local10) * _local6);
} else {
_local3._x = _local2.targetPosX;
_local3._y = _local2.targetPosY;
_local2.mode = CMD_ERASE_ANIME;
}
break;
case CMD_ERASE_ANIME :
playPairOK();
_local3.gotoAndPlay("Erase");
_local2.count = 0;
_local2.time = CARD_ERASE_ANIME_WAIT_TIME;
_local2.mode = CMD_ERASE_ANIME_LOOP;
break;
case CMD_ERASE_ANIME_LOOP :
_local2.count = _local2.count + app.sys.SysInfo.getRate();
if (_local2.count > _local2.time) {
new app.enemy.EraseLight(m_mcLightBase, _local3._x, _local3._y);
_local2.mode = CMD_ERASE_ANIME_LOOP2;
}
break;
case CMD_ERASE_ANIME_LOOP2 :
if (_local3.isEnd) {
_local3.swapDepths(_local2.animeMC);
_local3._visible = false;
_local2.mode = CMD_NONE;
}
break;
case CMD_SHUFFLE :
_local8 = _local3._x - CARD_APPEAR_POS_X;
_local7 = _local3._y - CARD_APPEAR_POS_Y;
_local2.len = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
_local2.rad = Math.atan2(_local7, _local8);
_local2.radSpeed = (((Math.random() * 5) + 5) * Math.PI) / 180;
_local2.moveSpeed = (Math.random() * 5) + 5;
_local2.mode = CMD_SHUFFLE_LOOP;
break;
case CMD_SHUFFLE_LOOP :
_local2.len = _local2.len - _local2.moveSpeed;
_local2.rad = _local2.rad + _local2.radSpeed;
if (_local2.len < 0) {
_local2.len = 0;
if (_local11) {
m_cardEndCount++;
_local2.mode = CMD_NONE;
_local3._visible = false;
} else {
_local11 = true;
if (m_cardEndCount == (m_cardDisplayList.length - 1)) {
m_cardEndCount++;
_local2.mode = CMD_NONE;
_local3._visible = false;
}
}
}
_local3._x = CARD_APPEAR_POS_X + (Math.cos(_local2.rad) * _local2.len);
_local3._y = CARD_APPEAR_POS_Y + (Math.sin(_local2.rad) * _local2.len);
break;
case CMD_END :
}
}
_local4--;
}
}
function playCardMove() {
app.sys.SysInfo.__get__SoundManager().playSE("CARD_MOVE");
}
function playPairOK() {
app.sys.SysInfo.__get__SoundManager().playSE("CARD_TURN_HIT");
}
function playPairError() {
app.sys.SysInfo.__get__SoundManager().playSE("CARD_TURN_LOSER");
}
function playSelectCard() {
app.sys.SysInfo.__get__SoundManager().playSE("CARD_TURN");
}
function playDeal() {
app.sys.SysInfo.__get__SoundManager().playSE("CARD_DISTRIBUTE");
}
function playHintShuffle() {
app.sys.SysInfo.__get__SoundManager().playSE("HINT_SHUFFLE");
}
function playGameClear() {
app.sys.SysInfo.__get__SoundManager().playSE("GAME_CLEAR");
}
function playGameStart() {
app.sys.SysInfo.__get__SoundManager().playSE("GAME_START");
}
function playTimeOver() {
app.sys.SysInfo.__get__SoundManager().playSE("TIME_OVER");
}
function playBGM() {
app.sys.SysInfo.__get__SoundManager().playBGM("BGM_BGM");
}
function stopBGM() {
app.sys.SysInfo.__get__SoundManager().stopBGM();
}
function onSceneGraphEvent(eventID, param) {
}
static var MD_MASK_START_IN = 1;
static var MD_MASK_START = 3;
static var MD_CARD_DEAL_IN = 10;
static var MD_CARD_DEAL = 11;
static var MD_GAME_START_IN = 12;
static var MD_GAME_START = 13;
static var MD_GAME_MAIN_IN = 14;
static var MD_GAME_MAIN = 15;
static var MD_ERASE_IN = 16;
static var MD_ERASE = 17;
static var MD_ERASE_MOVE = 18;
static var MD_HINT_IN = 20;
static var MD_HINT = 21;
static var MD_SHUFFLE_IN = 30;
static var MD_SHUFFLE = 31;
static var MD_GAME_CLEAR_IN = 40;
static var MD_GAME_CLEAR = 41;
static var MD_TIME_OVER_IN = 50;
static var MD_TIME_OVER = 51;
static var MD_GAME_OVER_IN = 60;
static var MD_GAME_OVER = 61;
static var MD_GAME_MENU_IN = 70;
static var MD_GAME_MENU = 71;
static var MD_CONFIRM_IN = 80;
static var MD_CONFIRM = 81;
static var MD_HELP_MENU_IN = 100;
static var MD_HELP_MENU = 101;
static var MD_END = 999;
static var MENU_GAME = 0;
static var MENU_MENU = 1;
static var MENU_CONFIRM = 2;
static var MENU_HELP = 3;
static var MENU_MAX = 4;
static var GAME_HINT = 0;
static var GAME_SHUFFLE = 1;
static var GAME_DEAL = 2;
static var GAME_MENU = 3;
static var GAME_MAX = 4;
static var GAME_MENU_SOUND_ON = 0;
static var GAME_MENU_SOUND_OFF = 1;
static var GAME_MENU_HELP = 2;
static var GAME_MENU_BACK = 3;
static var GAME_MENU_RETIRE = 4;
static var CONFIRM_YES = 0;
static var CONFIRM_NO = 1;
static var HELP_PREV = 0;
static var HELP_BACK = 1;
static var HELP_NEXT = 2;
static var HELP_MAX = 3;
static var HELP_PAGE_MAX = 3;
static var CARD_DEAL_WAIT_TIME = 300;
static var CARD_MOVE_WAIT_TIME = 500;
static var CARD_APPEAR_POS_X = 400;
static var CARD_APPEAR_POS_Y = 350;
static var CARD_WIDTH = 80;
static var CARD_HEIGHT = 100;
static var CARD_AREA_WIDTH = 243;
static var CARD_AREA_HEIGHT = 320;
static var CARD_BASE_X = 10;
static var CARD_BASE_Y = 10;
static var CARD_PER_WIDTH = 81;
static var CARD_PER_HEIGHT = 100;
static var TIME_MAX = 600000;
static var SHUFFLE_MAX = 3;
static var HINT_MAX = 3;
static var CHA_POS_Y = -78;
static var CHA_MOVE_Y = 8;
static var CHA_MOVE_SPAN = 4000;
static var CHA_DEAL_Y = 3;
static var CHA_DEAL_SPAN = 500;
static var CHA_LIGHT_X = 90;
static var CHA_LIGHT_Y = 95;
static var CARD_MAX = 52;
static var CARD_TYPE_MAX = 4;
static var CARD_NUM_MAX = 13;
static var CMD_NONE = 0;
static var CMD_APPEAR = 10;
static var CMD_APPEAR_LOOP = 11;
static var CMD_MOVE = 20;
static var CMD_MOVE_LOOP = 21;
static var CMD_ERASE = 30;
static var CMD_ERASE_MOVE_LOOP = 31;
static var CMD_ERASE_ANIME = 32;
static var CMD_ERASE_ANIME_LOOP = 33;
static var CMD_ERASE_ANIME_LOOP2 = 34;
static var CMD_SHUFFLE = 40;
static var CMD_SHUFFLE_LOOP = 41;
static var CMD_END = 99;
static var CARD_DEAL_POS_X = 359;
static var CARD_DEAL_POS_Y = 299;
static var CARD_ERASE_Y = 175;
static var CARD_ERASE_X1 = 210;
static var CARD_ERASE_X2 = 310;
static var CARD_ERASE_MOVE_WAIT_TIME = 800;
static var CARD_ERASE_ANIME_WAIT_TIME = 600;
static var CARD_ERASE_RAD = 400;
static var HINT_DISPLAY_TIME = 1000;
static var HINT_BLINK_TIME = 2000;
static var SHUFFLE_DISPLAY_TIME = 1500;
}
Symbol 638 MovieClip [__Packages.app.enemy.CardLightGroup] Frame 0
class app.enemy.CardLightGroup extends app.enemy.Enemy
{
var m_baseMC, m_mcList, m_lastIdx, m_wl;
function CardLightGroup (baseMC) {
super();
m_baseMC = baseMC;
m_baseMC._visible = true;
m_mcList = [];
var _local3 = 0;
while (_local3 < OBJ_MAX) {
m_mcList.add(null);
_local3++;
}
m_lastIdx = 0;
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
}
function move() {
var _local4 = app.sys.SysInfo.getRate() / 1000;
var _local3 = 0;
while (_local3 < m_lastIdx) {
var _local2;
_local2 = m_mcList[_local3];
_local2.live = _local2.live - _local4;
if (_local2.live < 0) {
_local2.removeMovieClip();
if (_local3 == (m_lastIdx - 1)) {
m_mcList[_local3] = null;
} else {
m_mcList[_local3] = m_mcList[m_lastIdx - 1];
m_mcList[m_lastIdx - 1] = null;
m_lastIdx--;
_local3--;
}
} else {
_local2._x = _local2._x + (_local2.xspeed * _local4);
_local2._y = _local2._y + (_local2.yspeed * _local4);
}
_local3++;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function add(x, y) {
var _local2;
if (m_lastIdx >= OBJ_MAX) {
return(undefined);
}
_local2 = util.MovieClipFactory.createOnMc(m_baseMC, "CardLightGroupMC", "CardLightGroup");
_local2._x = (x + (Math.random() * 10)) - 5;
_local2._y = (y + (Math.random() * 10)) - 5;
_local2.play();
_local2._xscale = (Math.random() * 25) + 75;
_local2._yscale = (Math.random() * 25) + 75;
_local2._rotation = Math.random() * 360;
_local2.xspeed = 0;
_local2.yspeed = (Math.random() * 10) + 20;
_local2.live = (Math.random() * 0.25) + 0.5;
_local2._visible = true;
m_mcList[m_lastIdx] = _local2;
m_lastIdx++;
}
static var OBJ_MAX = 128;
}
Symbol 639 MovieClip [__Packages.app.enemy.StickLight] Frame 0
class app.enemy.StickLight extends app.enemy.Enemy
{
var m_mc, m_wl;
function StickLight (baseMC, x, y) {
super();
m_mc = util.MovieClipFactory.createOnMc(baseMC, "CardLightGroupMC", "Light");
m_mc._x = x;
m_mc._y = y;
m_mc.gotoAndStop(Math.floor(Math.random() * m_mc._totalframes) + 1);
m_mc._xscale = (Math.random() * 20) + 40;
m_mc._yscale = (Math.random() * 20) + 40;
m_mc._rotation = Math.random() * 360;
m_mc.xspeed = 0;
m_mc.yspeed = (Math.random() * 25) + 75;
m_mc.live = (Math.random() * 0.25) + 0.5;
m_mc._visible = true;
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
}
function move() {
var _local2 = app.sys.SysInfo.getRate() / 1000;
m_mc.live = m_mc.live - _local2;
if (m_mc.live > 0) {
m_mc._x = m_mc._x + (m_mc.xspeed * _local2);
m_mc._y = m_mc._y + (m_mc.yspeed * _local2);
} else {
m_mc.removeMovieClip();
}
return(m_mc.live > 0);
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
}
Symbol 640 MovieClip [__Packages.app.enemy.GameStartEffect] Frame 0
class app.enemy.GameStartEffect extends app.enemy.Enemy
{
var m_count, m_time, m_mc, m_wl;
function GameStartEffect (x, y, time) {
super();
m_count = 0;
m_time = time;
m_mc = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, "GameStartMC", "GameStart");
m_mc._x = (app.sys.Screen.WIDTH / 2) + x;
m_mc._y = (app.sys.Screen.HEIGHT / 2) + y;
m_mc.gotoAndStop(1);
m_mc._visible = true;
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
}
function move() {
var _local2 = app.sys.SysInfo.getRate() / 1000;
m_count = m_count + app.sys.SysInfo.getRate();
return(m_count < m_time);
}
function ctrl() {
return(true);
}
function disp() {
if (m_count < MC_FADE_TIME) {
m_mc._alpha = (100 * m_count) / MC_FADE_TIME;
} else if (m_count < (m_time - MC_FADE_TIME)) {
m_mc._alpha = 100;
} else if (m_count < m_time) {
m_mc._alpha = (100 * (m_time - m_count)) / MC_FADE_TIME;
} else {
m_mc._alpha = 0;
}
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
m_mc.removeMovieClip();
}
static var MC_FADE_TIME = 300;
}
Symbol 641 MovieClip [__Packages.app.enemy.GameItemEffect] Frame 0
class app.enemy.GameItemEffect extends app.enemy.Enemy
{
var m_count, m_time, m_start, m_mc, m_mcLight, m_mcList, m_wl;
function GameItemEffect (x, y, frame, time) {
super();
m_count = 0;
m_time = time;
m_start = Math.random();
m_mc = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, "GameItemMC", "GameItemMC");
m_mc._x = (app.sys.Screen.WIDTH / 2) + x;
m_mc._y = (app.sys.Screen.HEIGHT / 2) + y;
m_mc.gotoAndStop(frame);
m_mc._visible = true;
m_mc.Path._visible = false;
m_mcLight = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, "DummyMC", "Dummy");
m_mcLight._x = (app.sys.Screen.WIDTH / 2) + x;
m_mcLight._y = (app.sys.Screen.HEIGHT / 2) + y;
m_mcLight.Stop();
m_mcLight._visible = true;
m_mcList = [];
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
}
function move() {
var _local4 = app.sys.SysInfo.getRate() / 1000;
var _local7;
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count < m_time) {
var _local6;
var _local5;
var _local2;
var _local3 = 0;
while (_local3 < 2) {
m_mc.Path.gotoAndStop((Math.floor((((m_count / m_time) + (_local3 * 0.5)) + m_start) * m_mc.Path._totalframes) % m_mc.Path._totalframes) + 1);
_local6 = m_mc.Path.Pos._x;
_local5 = m_mc.Path.Pos._y;
_local2 = util.MovieClipFactory.createOnMc(m_mcLight, "CardLightGroupMC", "Light");
_local2._x = _local6;
_local2._y = _local5;
_local2.gotoAndStop(Math.floor(Math.random() * _local2._totalframes) + 1);
_local2._xscale = (Math.random() * 50) + 25;
_local2._yscale = (Math.random() * 50) + 25;
_local2.rot = (Math.random() * 360) + 90;
_local2.xspeed = 0;
_local2.yspeed = (Math.random() * 75) + 25;
_local2.live = (Math.random() * 1) + 0.5;
_local2._visible = true;
m_mcList.push(_local2);
_local3++;
}
}
_local7 = false;
for (var _local8 in m_mcList) {
var _local2 = m_mcList[_local8];
if (_local2 != undefined) {
_local2.live = _local2.live - _local4;
if (_local2.live > 0) {
_local2._x = _local2._x + (_local2.xspeed * _local4);
_local2._y = _local2._y + (_local2.yspeed * _local4);
_local7 = true;
} else {
_local2.removeMovieClip();
m_mcList[_local8] = undefined;
}
}
}
return(_local7 || (m_count < m_time));
}
function ctrl() {
return(true);
}
function disp() {
if (m_count < MC_FADE_TIME) {
m_mc._alpha = (100 * m_count) / MC_FADE_TIME;
} else if (m_count > (m_time - MC_FADE_TIME)) {
m_mc._alpha = (100 * (m_time - m_count)) / MC_FADE_TIME;
} else {
m_mc._alpha = 100;
}
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
delete m_mcList;
m_mc.removeMovieClip();
m_mcLight.removeMovieClip();
}
static var HINT = 1;
static var SHUFFLE = 2;
static var MC_HEIGHT = 140;
static var MC_WIDTH = 340;
static var MC_FADE_TIME = 150;
}
Symbol 642 MovieClip [__Packages.app.enemy.GameResultEffect] Frame 0
class app.enemy.GameResultEffect extends app.enemy.Enemy
{
var m_count, m_time, m_type, m_mc, m_mcLight, m_mcList, m_wl;
function GameResultEffect (x, y, frame, time) {
super();
m_count = 0;
m_time = time;
m_type = frame;
m_mc = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, "GameResultMC", "GameResult");
m_mc._x = app.sys.Screen.WIDTH / 2;
m_mc._y = app.sys.Screen.HEIGHT / 2;
m_mc.gotoAndStop(frame);
m_mc._visible = true;
m_mc.Path._visible = false;
m_mcLight = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, "DummyMC", "Dummy");
m_mcLight._x = app.sys.Screen.WIDTH / 2;
m_mcLight._y = app.sys.Screen.HEIGHT / 2;
m_mcLight.Stop();
m_mcLight._visible = true;
m_mcList = [];
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
}
function move() {
var _local4 = app.sys.SysInfo.getRate() / 1000;
var _local7;
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count < m_time) && (m_type == GAMECLEAR)) {
if (Math.random() > 0.1) {
var _local6;
var _local5;
var _local2;
var _local3 = 0;
while (_local3 < 2) {
m_mc.Path.gotoAndStop((Math.floor(((m_count / m_time) + (_local3 * 0.5)) * m_mc.Path._totalframes) % m_mc.Path._totalframes) + 1);
_local6 = m_mc.Path.Pos._x;
_local5 = m_mc.Path.Pos._y;
_local2 = util.MovieClipFactory.createOnMc(m_mcLight, "CardLightGroupMC", "Light");
_local2._x = _local6;
_local2._y = _local5;
_local2.gotoAndStop(Math.floor(Math.random() * _local2._totalframes) + 1);
_local2._xscale = (Math.random() * 50) + 25;
_local2._yscale = (Math.random() * 50) + 25;
_local2._rotation = Math.random() * 360;
_local2.xspeed = 0;
_local2.yspeed = (Math.random() * 75) + 25;
_local2.live = (Math.random() * 1) + 0.5;
_local2._visible = true;
m_mcList.push(_local2);
_local3++;
}
}
}
_local7 = false;
for (var _local8 in m_mcList) {
var _local2 = m_mcList[_local8];
if (_local2 != undefined) {
_local2.live = _local2.live - _local4;
if (_local2.live > 0) {
_local2._x = _local2._x + (_local2.xspeed * _local4);
_local2._y = _local2._y + (_local2.yspeed * _local4);
_local7 = true;
} else {
_local2.removeMovieClip();
m_mcList[_local8] = undefined;
}
}
}
return(_local7 || (m_count < m_time));
}
function ctrl() {
return(true);
}
function disp() {
if (m_count < MC_FADE_TIME) {
m_mc._alpha = (100 * m_count) / MC_FADE_TIME;
} else {
m_mc._alpha = 100;
}
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
delete m_mcList;
m_mc.removeMovieClip();
m_mcLight.removeMovieClip();
}
static var GAMECLEAR = 1;
static var TIMEOVER = 2;
static var GAMEOVER = 3;
static var MC_HEIGHT = 170;
static var MC_WIDTH = 330;
static var MC_FADE_TIME = 300;
}
Symbol 643 MovieClip [__Packages.app.enemy.EraseLight] Frame 0
class app.enemy.EraseLight extends app.enemy.Enemy
{
var m_mc, m_mcList, m_wl;
function EraseLight (baseMC, x, y) {
super();
m_mc = util.MovieClipFactory.createEmptyOnMc(baseMC, "CardMC");
m_mc._visible = true;
m_mcList = [];
var _local4 = 0;
while (_local4 < OBJ_MAX) {
var _local3;
var _local6 = (_local4 * 360) / OBJ_MAX;
var _local5 = (Math.random() * 60) + 200;
_local3 = util.MovieClipFactory.createOnMc(baseMC, "CardLightGroupMC", "Light");
_local3._x = x;
_local3._y = y;
_local3.play();
_local3._xscale = (Math.random() * 25) + 75;
_local3._yscale = (Math.random() * 25) + 75;
_local3._rotation = Math.random() * 360;
_local3.xspeed = Math.sin(_local6) * _local5;
_local3.yspeed = Math.cos(_local6) * _local5;
_local3.live = (Math.random() * 0.1) + 0.25;
_local3._visible = true;
m_mcList.push(_local3);
_local4++;
}
m_wl = app.sys.SysInfo.__get__WorkList().append(this);
}
function move() {
var _local4 = app.sys.SysInfo.getRate() / 1000;
var _local5 = false;
var _local3 = 0;
while (_local3 < OBJ_MAX) {
var _local2;
_local2 = m_mcList[_local3];
if (_local2 != null) {
_local2.live = _local2.live - _local4;
if (_local2.live > 0) {
_local2.yspeed = _local2.yspeed + (GRAVITY * _local4);
_local2._x = _local2._x + (_local2.xspeed * _local4);
_local2._y = _local2._y + (_local2.yspeed * _local4);
_local5 = true;
} else {
_local2.removeMovieClip();
m_mcList[_local3] = null;
}
}
_local3++;
}
return(_local5);
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
m_mc.removeMovieClip();
}
static var OBJ_MAX = 9;
static var GRAVITY = 200;
}
Symbol 644 MovieClip [__Packages.app.flow.ResultFlow] Frame 0
class app.flow.ResultFlow extends app.flow.Flow implements app.sys.SceneGraphListener
{
var m_loop, m_context, m_mode, m_isDestroy, m_result;
function ResultFlow (preFlow) {
super(app.flow.Flow.FM_GAMECLEAR, preFlow);
m_loop = new app.loop.ResultLoop(m_context, this, preFlow);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
}
function move(mode) {
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callMove();
}
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callCtrl();
}
}
function movePause(mode) {
m_loop.move();
}
function disp(mode) {
if (mode == m_mode) {
app.sys.SysInfo.__get__WorkList().callDisp();
}
}
function destroy() {
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
app.sys.SysInfo.__get__WorkList().callDestroyByAttr(m_context.getAttr());
m_isDestroy = true;
}
function onSceneGraphEvent(eventID, param) {
if (((eventID == app.sys.SceneGraph.EID_FLOW_TITLE) || (eventID == app.sys.SceneGraph.EID_FLOW_CONTINUE)) || (eventID == app.sys.SceneGraph.EID_FLOW_NEXT)) {
m_result = eventID;
}
}
}
Symbol 645 MovieClip [__Packages.app.loop.ResultLoop] Frame 0
class app.loop.ResultLoop extends app.loop.BaseLoop implements app.sys.SceneGraphListener
{
var m_mode, m_count, m_mcMenu, m_context, initCursor, m_curMenuIdx, m_mainMenuIdx, m_titleMenuIdx, m_mcEraseCardNumList, m_mcRestTimeMinList, m_mcRestTimeSecList, m_mcRestHintNumList, m_mcRestShuffleNumList, m_mcBonusScoreList, m_mcTotalScoreList, m_resultEraseCardNum, m_resultRestTime, m_resultRestHintNum, m_resultRestShuffleNum, m_resultBonusScore, m_resultTotalScore, m_dispEraseCardNum, m_dispRestTime, m_dispRestHintNum, m_dispRestShuffleNum, m_dispBonusScore, m_dispTotalScore, m_nowEraseCardNum, m_nowRestTime, m_nowRestHintNum, m_nowRestShuffleNum, m_nowBonusScore, m_nowTotalScore, m_mcBack, m_mcMask, m_mcCurrent, createCursor, m_isShowMenu, m_isMenuUpdate, m_isSelectUpdate, m_nowMainIndex, m_nowSubIndex, m_isSkip, m_checkMouseClick, m_keta, m_checkMouseMove, moveMenu, m_menuAction, playMove, hideCursor, destroyCursor, playSelect, m_checkMouseWheel, m_keyAction, showMenu, selectMenu, m_btnMcList, m_btnShowMcList;
function ResultLoop (context, nowFlow, preFlow) {
super(context, nowFlow, preFlow);
m_mode = MD_RESULT_MASK_IN;
m_count = 0;
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "ResultMC", "Result", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
initCursor();
m_curMenuIdx = MENU_MASK;
m_mainMenuIdx = 0;
m_titleMenuIdx = 0;
var _local3;
_local3 = m_mcMenu.Result;
m_mcEraseCardNumList = [_local3.EC_N1, _local3.EC_N0];
m_mcRestTimeMinList = [_local3.RT_M1, _local3.RT_M0];
m_mcRestTimeSecList = [_local3.RT_C1, _local3.RT_C0];
m_mcRestHintNumList = [_local3.RH_N0];
m_mcRestShuffleNumList = [_local3.RS_N0];
m_mcBonusScoreList = [_local3.B_S4, _local3.B_S3, _local3.B_S2, _local3.B_S1, _local3.B_S0];
m_mcTotalScoreList = [_local3.S5, _local3.S4, _local3.S3, _local3.S2, _local3.S1, _local3.S0];
m_resultEraseCardNum = app.sys.SysInfo.ResultEraseCardNum;
m_resultRestTime = app.sys.SysInfo.ResultRestTime;
m_resultRestHintNum = app.sys.SysInfo.ResultRestHint;
m_resultRestShuffleNum = app.sys.SysInfo.ResultRestShuffle;
m_resultBonusScore = BONUS_SCORE[Math.floor(m_resultEraseCardNum / 10)];
m_resultTotalScore = ((((m_resultEraseCardNum * CARD_PER_SCORE) + (m_resultRestTime * TIME_PER_SCORE)) + (m_resultRestHintNum * HINT_PER_SCORE)) + (m_resultRestShuffleNum * SHUFFLE_PER_SCORE)) + m_resultBonusScore;
m_dispEraseCardNum = (m_dispRestTime = (m_dispRestHintNum = (m_dispRestShuffleNum = (m_dispBonusScore = (m_dispTotalScore = -1)))));
m_nowEraseCardNum = (m_nowRestTime = (m_nowRestHintNum = (m_nowRestShuffleNum = (m_nowBonusScore = (m_nowTotalScore = 0)))));
Mouse.addListener(this);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
}
function move() {
switch (m_mode) {
case MD_RESULT_MASK_IN :
m_mcBack = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "DummyMC", "Dummy", m_context.getBase());
m_mcBack.attachBitmap(app.sys.SysInfo.__get__BitmapData(), 24, "never", false);
m_mcBack._visible = true;
m_mcMask = new app.enemy.Mask02(app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2, m_mcMenu);
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_MASK;
initMenu(m_curMenuIdx);
createCursor();
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = m_titleMenuIdx;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_RESULT_MASK;
break;
case MD_RESULT_MASK :
if ((m_mcMask != undefined) && (!m_mcMask.isAlive())) {
m_mcMask.destroy();
m_mcMask = undefined;
m_mcBack.removeMovieClip();
m_mcBack = undefined;
m_mode = MD_CARD_POINT;
m_count = 0;
m_isSkip = false;
}
break;
case MD_CARD_POINT :
if (m_checkMouseClick) {
m_isSkip = true;
}
if (m_isSkip) {
m_nowEraseCardNum = m_resultEraseCardNum;
}
if (m_nowEraseCardNum < m_resultEraseCardNum) {
m_nowEraseCardNum++;
} else {
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count > WAIT_TIME) || (m_isSkip)) {
m_count = 0;
m_mode = MD_TIME_POINT;
}
}
break;
case MD_TIME_POINT :
if (m_checkMouseClick) {
m_isSkip = true;
}
if (m_isSkip) {
m_nowRestTime = m_resultRestTime;
}
if (m_nowRestTime < m_resultRestTime) {
m_nowRestTime = m_nowRestTime + 3;
if (m_nowRestTime > m_resultRestTime) {
m_nowRestTime = m_resultRestTime;
}
} else {
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count > WAIT_TIME) || (m_isSkip)) {
m_count = 0;
m_mode = MD_HINT_POINT;
}
}
break;
case MD_HINT_POINT :
if (m_checkMouseClick) {
m_isSkip = true;
}
if (m_isSkip) {
m_nowRestHintNum = m_resultRestHintNum;
}
if (m_nowRestHintNum < m_resultRestHintNum) {
m_nowRestHintNum++;
} else {
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count > WAIT_TIME) || (m_isSkip)) {
m_count = 0;
m_mode = MD_SHUFFLE_POINT;
}
}
break;
case MD_SHUFFLE_POINT :
if (m_checkMouseClick) {
m_isSkip = true;
}
if (m_isSkip) {
m_nowRestShuffleNum = m_resultRestShuffleNum;
}
if (m_nowRestShuffleNum < m_resultRestShuffleNum) {
m_nowRestShuffleNum++;
} else {
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count > WAIT_TIME) || (m_isSkip)) {
m_count = 0;
m_mode = MD_BONUS_POINT;
}
}
break;
case MD_BONUS_POINT :
if (m_checkMouseClick) {
m_isSkip = true;
}
if (m_isSkip) {
m_nowBonusScore = m_resultBonusScore;
}
if (m_nowBonusScore < m_resultBonusScore) {
m_nowBonusScore = m_nowBonusScore + 200;
if (m_nowBonusScore >= m_resultBonusScore) {
m_nowBonusScore = m_resultBonusScore;
}
} else {
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count > WAIT_TIME) || (m_isSkip)) {
m_count = 0;
m_keta = 0;
m_mode = MD_TOTAL_POINT;
}
}
break;
case MD_TOTAL_POINT :
m_count = m_count + app.sys.SysInfo.getRate();
if ((m_count < WAIT_TIME) && (!m_isSkip)) {
var _local2 = Math.pow(10, m_keta);
if (m_resultTotalScore != 0) {
m_nowTotalScore = m_nowTotalScore % _local2;
m_nowTotalScore = m_nowTotalScore + (_local2 * Math.floor(1 + (Math.random() * 9)));
}
} else {
m_nowTotalScore = m_resultTotalScore % Math.pow(10, m_keta + 1);
if (m_nowTotalScore == m_resultTotalScore) {
if ((m_count > (WAIT_TIME * 2)) || (m_isSkip)) {
m_count = 0;
m_mode = MD_RESULT_IN;
}
} else {
m_keta++;
m_count = 0;
}
}
break;
case MD_RESULT_IN :
createCursor();
m_mcCurrent = m_mcMenu;
m_curMenuIdx = MENU_RESULT;
initMenu(m_curMenuIdx);
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_mainMenuIdx = -1;
m_nowMainIndex = m_mainMenuIdx;
m_nowSubIndex = -1;
m_mode = MD_RESULT;
m_count = 0;
break;
case MD_RESULT :
var _local3 = m_mainMenuIdx;
if (m_count == 0) {
m_checkMouseMove = true;
}
m_count = m_count + app.sys.SysInfo.getRate();
if (moveMenu()) {
switch (m_menuAction) {
case app.loop.BaseLoop.ACT_MOVE :
playMove();
break;
case app.loop.BaseLoop.ACT_ENTER :
switch (m_mainMenuIdx) {
case RESULT_RANKING :
break;
case RESULT_REPLAY :
app.sys.SysInfo.__get__BitmapData().draw(m_mcMenu, new flash.geom.Matrix(1, 0, 0, 1, app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2));
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_CONTINUE, undefined);
m_mode = MD_END;
hideCursor();
destroyCursor();
break;
case RESULT_TITLE :
app.sys.SysInfo.__get__BitmapData().draw(m_mcMenu, new flash.geom.Matrix(1, 0, 0, 1, app.sys.Screen.WIDTH / 2, app.sys.Screen.HEIGHT / 2));
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_TITLE, undefined);
hideCursor();
destroyCursor();
m_mode = MD_END;
}
playSelect();
}
}
m_mainMenuIdx = m_nowMainIndex;
if (_local3 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_END :
}
m_checkMouseClick = false;
m_checkMouseMove = false;
m_checkMouseWheel = 0;
m_keyAction = -1;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local2;
var _local3;
switch (m_curMenuIdx) {
case MENU_MASK :
case MENU_RESULT :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
_local2 = m_mcMenu.Result;
if (m_dispEraseCardNum != m_nowEraseCardNum) {
SetNumber(m_nowEraseCardNum, m_mcEraseCardNumList, false);
m_dispEraseCardNum = m_nowEraseCardNum;
}
if (m_dispRestTime != m_nowRestTime) {
SetNumber(Math.floor(m_nowRestTime / 60), m_mcRestTimeMinList, false);
SetNumber(m_nowRestTime % 60, m_mcRestTimeSecList, true);
m_dispRestTime = m_nowRestTime;
}
if (m_dispRestHintNum != m_nowRestHintNum) {
SetNumber(m_nowRestHintNum, m_mcRestHintNumList, false);
m_dispRestHintNum = m_nowRestHintNum;
}
if (m_dispRestShuffleNum != m_nowRestShuffleNum) {
SetNumber(m_nowRestShuffleNum, m_mcRestShuffleNumList, false);
m_dispRestShuffleNum = m_nowRestShuffleNum;
}
if (m_dispBonusScore != m_nowBonusScore) {
SetNumber(m_nowBonusScore, m_mcBonusScoreList, false);
m_dispBonusScore = m_nowBonusScore;
}
if (m_dispTotalScore == m_nowTotalScore) {
break;
}
SetNumber(m_nowTotalScore, m_mcTotalScoreList, false);
m_dispTotalScore = m_nowTotalScore;
}
}
function destroy() {
super.destroy();
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
Mouse.removeListener(this);
m_mcMenu.removeMovieClip();
}
function SetNumber(num, mcList, zeroPad) {
var _local2;
var _local1;
var _local5 = mcList.length;
var _local4;
_local1 = 0;
while (_local1 < _local5) {
_local2 = mcList[(_local5 - _local1) - 1];
_local4 = num % 10;
_local2.gotoAndStop(_local4 + 1);
if ((((_local1 == 0) || (zeroPad)) || (num >= 10)) || (_local4 > 0)) {
_local2._visible = true;
} else {
_local2._visible = false;
}
num = Math.floor(num / 10);
_local1++;
}
}
function initMenu(idx) {
var _local2;
m_btnMcList = [];
m_btnShowMcList = [];
switch (idx) {
case MENU_MASK :
_local2 = m_mcMenu;
m_btnMcList.push({show:_local2.Result.RankingBtn, mc:_local2.Result.RankingBtn, hit:_local2.Result.RankingBtn.Hit});
m_btnMcList.push({show:_local2.Result.ReplayBtn, mc:_local2.Result.ReplayBtn, hit:_local2.Result.ReplayBtn.Hit});
m_btnMcList.push({show:_local2.Result.TitleBtn, mc:_local2.Result.TitleBtn, hit:_local2.Result.TitleBtn.Hit});
m_btnShowMcList.push(false);
m_btnShowMcList.push(false);
m_btnShowMcList.push(false);
break;
case MENU_RESULT :
_local2 = m_mcMenu;
m_btnMcList.push({show:_local2.Result.RankingBtn, mc:_local2.Result.RankingBtn, hit:_local2.Result.RankingBtn.Hit});
m_btnMcList.push({show:_local2.Result.ReplayBtn, mc:_local2.Result.ReplayBtn, hit:_local2.Result.ReplayBtn.Hit});
m_btnMcList.push({show:_local2.Result.TitleBtn, mc:_local2.Result.TitleBtn, hit:_local2.Result.TitleBtn.Hit});
m_btnShowMcList.push(false);
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
}
}
function onSceneGraphEvent(eventID, param) {
}
static var MD_RESULT_MASK_IN = 1;
static var MD_RESULT_MASK = 2;
static var MD_CARD_POINT = 10;
static var MD_TIME_POINT = 11;
static var MD_HINT_POINT = 12;
static var MD_SHUFFLE_POINT = 13;
static var MD_BONUS_POINT = 14;
static var MD_TOTAL_POINT = 15;
static var MD_RESULT_IN = 20;
static var MD_RESULT = 21;
static var MD_END = 999;
static var MENU_MASK = 0;
static var MENU_RESULT = 1;
static var RESULT_RANKING = 0;
static var RESULT_REPLAY = 1;
static var RESULT_TITLE = 2;
static var RESULT_MAX = 3;
static var CARD_PER_SCORE = 100;
static var TIME_PER_SCORE = 10;
static var HINT_PER_SCORE = 100;
static var SHUFFLE_PER_SCORE = 1000;
static var BONUS_SCORE = [0, 500, 1000, 2000, 5000, 10000];
static var WAIT_TIME = 500;
}
Symbol 646 MovieClip [__Packages.app.enemy.Mask02] Frame 0
class app.enemy.Mask02 extends app.enemy.Mask
{
var m_mc, m_mcList, m_isAlive;
function Mask02 (x, y, targetMC) {
super(x, y, targetMC, "Mask02MC");
}
function move() {
var _local2;
var _local5 = app.sys.SysInfo.getRate() / 1000;
var _local8 = false;
if (m_mc._currentframe < m_mc._totalframes) {
var _local3 = 0;
while (_local3 < 2) {
var _local6 = Math.random() * 200;
var _local7 = m_mc.Anime._x + (Math.random() * app.sys.Screen.WIDTH);
var _local4 = m_mc.Anime._y + (Math.random() * _local6);
if (_local4 > ((-m_mc._y) - 30)) {
_local2 = util.MovieClipFactory.createOnMc(m_mc.Light, "CardLightGroupMC", "Light");
_local2._x = _local7;
_local2._y = _local4;
_local2.gotoAndStop(Math.floor(Math.random() * _local2._totalframes) + 1);
_local2._xscale = (Math.random() * 50) + 50;
_local2._yscale = (Math.random() * 50) + 50;
_local2._rotation = Math.random() * 360;
_local2.xspeed = 0;
_local2.yspeed = (Math.random() * 75) + 25;
_local2.live = (Math.random() * 1) + 0.5;
_local2._visible = true;
m_mcList.push(_local2);
}
_local3++;
}
}
for (var _local9 in m_mcList) {
_local2 = m_mcList[_local9];
if (_local2 != undefined) {
_local2.live = _local2.live - _local5;
if (_local2.live > 0) {
_local2._x = _local2._x + (_local2.xspeed * _local5);
_local2._y = _local2._y + (_local2.yspeed * _local5);
_local8 = true;
} else {
_local2.removeMovieClip();
m_mcList[_local9] = undefined;
}
}
}
m_isAlive = _local8 || (m_mc._currentframe < m_mc._totalframes);
return(true);
}
}