Frame 1
function attachEvent(eventTrigger) {
this._trace("attachEvent:" + eventTrigger._name);
this[eventTrigger._name](eventTrigger);
}
function start_test() {
this._trace("start_test");
}
function end_test() {
this._trace("end_test");
}
function start_meeting_1() {
this._trace("start_meeting_1");
this.map.fusen_room.show();
this.addBarricade(this.map.meetingRoom_1, "cathedToMeetingRoom");
}
function end_meeting_1() {
this._trace("end_meeting_1");
this.removeBarricade(this.map.meetingRoom_1);
}
function start_meeting_2() {
this._trace("start_meeting_2");
this.addBarricade(this.map.meetingRoom_2, "cathedToMeetingRoom");
}
function end_meeting_2() {
this._trace("end_meeting_2");
this.removeBarricade(this.map.meetingRoom_2);
}
function start_compe(seqMc) {
this._trace("start_compe");
var _local3 = this;
var _local2 = this.map;
var _local4 = _local3.ants;
var _local8 = _local3.barricades;
var _local6 = _local3.barricadesHandlerName;
var _local7 = _local2.ariTarget_goal;
var _local5 = _local3;
var _local9 = (seqMc._seq = new com.kampei.control.Sequence(seqMc, 1));
_local9.execute([150, "show", _local2.hall_1, 10, 200, _local2, _local4, _local8, _local6, _local7, _local5], [20, "show", _local2.fusen_compe], [40, "show", _local2.hall_2, 15, 300, _local2, _local4, _local8, _local6, _local7, _local5]);
}
function start_meeting_3() {
this._trace("start_meeting_3");
this.addBarricade(this.map.meetingRoom_3, "cathedToMeetingRoom");
}
function end_meeting_3() {
this._trace("end_meeting_3");
this.removeBarricade(this.map.meetingRoom_3);
}
function start_cd_1(seqMc) {
this._trace("start_cd_1");
var _local3 = (seqMc._seq = new com.kampei.control.Sequence(seqMc, 1));
var _local2 = this.map.ant_1;
_local3.execute([0, "show", _local2], [0, "addBarricade", this, _local2.ant_img.barricade, "touchedAtCD"]);
}
function end_cd_1() {
this._trace("end_cd_1");
this.map.ant_1.hide();
this.removeBarricade(this.map.ant_1.ant_img.barricade);
}
function start_cd_2(seqMc) {
this._trace("start_cd_2");
var _local3 = (seqMc._seq = new com.kampei.control.Sequence(seqMc, 1));
var _local2 = this.map.ant_2;
_local3.execute([0, "show", _local2], [0, "addBarricade", this, _local2.ant_img.barricade, "touchedAtCD"]);
}
function end_cd_2() {
this._trace("end_cd_2");
this.map.ant_2.hide();
this.removeBarricade(this.map.ant_2.ant_img.barricade);
}
function start_cd_3() {
this._trace("start_cd_3");
var _local3 = (seqMc._seq = new com.kampei.control.Sequence(seqMc, 1));
var _local2 = this.map.ant_3;
_local3.execute([0, "show", _local2], [0, "addBarricade", this, _local2.ant_img.barricade, "touchedAtCD"]);
}
function end_cd_3() {
this._trace("end_cd_3");
this.map.ant_3.hide();
this.removeBarricade(this.map.ant_3.ant_img.barricade);
}
function start_presen_1() {
this._trace("start_presen_1");
var _local3 = this.map.bull_1;
var _local2 = _local3.bull_img;
this.addBarricade(_local2.bull_hit, "stickToBullBlade");
this.addBarricade(_local2.bull_brcd, "getOutOfBarricade");
_local3.startBull(this);
}
function start_presen_2() {
this._trace("start_presen_2");
var _local3 = this.map.bull_2;
var _local2 = _local3.bull_img;
this.addBarricade(_local2.bull_hit, "stickToBullBlade");
this.addBarricade(_local2.bull_brcd, "getOutOfBarricade");
_local3.startBull(this);
}
function start_goal() {
this._trace("start_goal");
this.addBarricade(this.map.barricade_goal, "reachToTheGoal");
}
function start_goal_tmp() {
this._trace("start_goal_tmp");
this.addBarricade(this.map.barricade_goal, "reachToTheGoal");
}
function init(eventManager) {
trace.all.initialize(this, "root");
this._trace("init");
_quality = "HIGH";
if (eventManager != undefined) {
this._eventManager = eventManager;
}
this.scrollStep = 1;
this.scrollStep_default = 1;
this.scrollStep_now = 1;
this._seq = new com.kampei.control.Sequence(this, 1234);
this._scrollSeq = new com.kampei.control.Sequence(this, 1235);
this._checkEndingLoadedSeq = new com.kampei.control.Sequence(this, 1236);
this._flagLifeTimer = new com.kampei.control.Sequence(this, 1237);
var _local3 = this.map;
_local3._x = (_local3._y = 0);
_local3._xscale = (_local3._yscale = 100);
_local3.me_mark.swapDepths(2000);
_local3.flag.swapDepths(1500);
_local3.candy.swapDepths(1501);
_local3.parasol.swapDepths(1502);
_local3.trophy.swapDepths(500);
_local3.ant_3.swapDepths(501);
_local3.ant_2.swapDepths(502);
_local3.ant_1.swapDepths(503);
_local3.over_meetingRoom_1.swapDepths(504);
_local3.over_meetingRoom_2.swapDepths(505);
_local3.over_meetingRoom_3.swapDepths(506);
_local3.fusen_compe.swapDepths(507);
_local3.barricade._visible = false;
_local3.firstPos_1._visible = (_local3.firstPos_2._visible = (_local3.firstPos_3._visible = (_local3.firstPos_4._visible = false)));
this.createEmptyMovieClip("_soundMangerMc", 1500);
_global.sManager = new com.kampei.sound.SoundManagerClass(_soundMangerMc);
_global.sManager.addBgmList(["bgm_game", "bulldozer"]);
_global.sManager.addSeList(["doorclose", "dooropen", "speedup", "hall", "suikomi"]);
this._btns = [this.route_btn, this.treat_btn, this.sabotage_btn];
this.fieldHeight = this.map.boundary._height;
this._eventStartSeq = [];
this._eventFinishSeq = [];
var _local4 = this._eventStartSeq;
_local4.push(_local3.start_meeting_1);
_local4.push(_local3.start_meeting_2);
_local4.push(_local3.start_compe);
_local4.push(_local3.start_meeting_3);
_local4.push(_local3.start_cd_1);
_local4.push(_local3.start_cd_2);
_local4.push(_local3.start_cd_3);
_local4.push(_local3.start_presen_1);
_local4.push(_local3.start_presen_2);
_local4.push(_local3.start_goal);
var _local5 = _eventFinishSeq;
_local5.push(_local3.end_meeting_1);
_local5.push(_local3.end_meeting_2);
_local5.push(_local3.end_cd_1);
_local5.push(_local3.end_meeting_3);
_local5.push(_local3.end_cd_2);
_local5.push(_local3.end_cd_3);
this.antsOthersTotal = 30;
this.resetMain();
}
function resetMain() {
this._trace("resetMain");
this.pointerMode = "flag";
this.pointerActivity = false;
for (var _local2 in this._btns) {
this._btns[_local2].init();
}
this._eventStartIndex = 0;
this._eventFinishIndex = 0;
this._bGoaled = false;
this.barricades = [];
this.barricadesHandlerName = [];
this.addBarricade(this.map.barricade, "getOutOfBarricade");
this.map.fusen_room.resetFusen();
this.map.fusen_compe.resetFusen();
this.ants = [];
var _local2 = 0;
while (_local2 < this.antsOthersTotal) {
var _local3 = this.map.attachMovie("ant", "ant" + _local2, _local2 + 101);
this.ants.push(_local3);
_local2++;
}
var _local5 = {_x:720, _y:this.fieldHeight + 100};
this.me = this.map.attachMovie("ant_me", "me", 100, _local5);
this.ants.push(this.me);
this.me_mark.init();
var _local4 = this.map;
_local4.meetingRoom_1.init();
_local4.meetingRoom_2.init();
_local4.meetingRoom_3.init();
_local4.hall_1.resetHall();
_local4.hall_2.resetHall();
_local4.ant_1.hide();
_local4.ant_2.hide();
_local4.ant_3.hide();
_local4.bull_1.init();
_local4.bull_2.init();
this._flagLifeTimer.resetSequence();
}
function start() {
this._trace("start");
_global.sManager.fadeIn("bgm_game", 10000, 0, 1000);
this._seq.execute(25, "show", this.map.goal_mark);
this._seq.execute(20, "show", this.map.icon_goal);
this._seq.execute(30, "openingScroll", this);
this._seq.execute(10, "hide", this.map.icon_goal);
this._seq.execute([1, "init", this.me, true, this.barricades, this.barricadesHandlerName, this], [0, "start_me", me]);
this.showOtherAnts();
}
function openingScroll() {
this.map.dynTween({duration:50, _y:[-520, "in", 40], callback:this + ".openingScroll2"});
}
function openingScroll2() {
this._trace("openingScroll2");
_quality = "LOW";
this.map._y = -550;
this.map.dynTween({duration:Math.round((this.fieldHeight - Stage.height) / 50), _y:[((-fieldHeight) + Stage.height) + 700], callback:this + ".openingScroll3"});
}
function openingScroll3() {
this._trace("openingScroll3");
_quality = "BEST";
map._y = ((-fieldHeight) + Stage.height) + 650;
this.map.dynTween({duration:60, _y:[(-fieldHeight) + Stage.height, "out", 0], callback:this + ".startGame"});
}
function showOtherAnts() {
this._trace("showOtherAnts");
var o = this;
var m = o.map;
var _local7 = function (pos, idx, goal) {
var _local1 = m["ant" + idx];
_local1._x = pos.x;
_local1._y = pos.y;
o._seq.execute([4, "init", _local1, false, o.barricades, o.barricadesHandlerName, o], [0, "setGoal", _local1, goal], [0, "start", _local1]);
};
var _local3 = 0;
while (_local3 < this.antsOthersTotal) {
switch (Math.ceil(Math.random() * 3) + 1) {
case 1 :
var _local4 = m.ariTarget_start_1;
var _local2 = {x:m.firstPos_1._width, y:Math.round(Math.random() * m.firstPos_1._height)};
m.firstPos_1.localToGlobal(_local2);
break;
case 2 :
_local4 = m.ariTarget_start_2;
_local2 = {x:m.firstPos_2._width, y:Math.round(Math.random() * m.firstPos_2._height)};
m.firstPos_2.localToGlobal(_local2);
break;
case 3 :
_local4 = m.ariTarget_start_3;
_local2 = {x:Math.round(Math.random() * m.firstPos_3._width), y:0};
m.firstPos_3.localToGlobal(_local2);
break;
case 4 :
_local4 = m.ariTarget_start_4;
_local2 = {x:0, y:Math.round(Math.random() * m.firstPos_4._height)};
m.firstPos_4.localToGlobal(_local2);
}
m.globalToLocal(_local2);
_local7(_local2, _local3, _local4);
_local3++;
}
}
function startGame() {
this._trace("startGame");
this._seq.execute([0, "show", this.message, "getThePencil"], [85, "hide", this.message], [8, "startMonitoring", this.map.me_mark, this.me.ant_walk], [10, "_showBoard", this]);
}
function _showBoard() {
this._trace("_showBoard");
this.message.show("howTo");
for (var _local2 in this.ants) {
this.ants[_local2].startPause();
}
}
function onClickStart() {
_trace("onClickStart");
_startGame();
}
function _startGame() {
this.message.hide();
for (var _local2 in this.ants) {
this.ants[_local2].resumeFromPause();
}
this.whiteSheet._visible = false;
this._seq.execute([20, "show", this.route_btn], [3, "show", this.treat_btn], [3, "show", this.sabotage_btn], [18, "startMouseMonitoring", this], [0, "toggleToolBtn", this, this.route_btn], [0, "startMonitorAri", this]);
for (var _local2 in this.ants) {
this.ants[_local2].setGoal(this.map.ariTarget_goal);
}
this.startScroll();
this.me.updatePosInfo();
this.me.walk(false);
}
function retry_ready() {
this._trace("retry_ready");
_global.sManager.fadeOut("bgm_game", 5000);
this.whiteSheet._alpha = 0;
this.whiteSheet._visible = true;
this.whiteSheet.dynTween({duration:10}, {duration:50, _alpha:[100, "out"]});
this._seq.resetSequence();
this._seq.execute([60, "resetAnts", this], [0, "stopScroll", this], [0, "stopMonitoring", this.map.me_mark]);
this.message.show("retry", "startRetry", this);
this.stopMonitorAri();
this.stopMouseMonitoring();
this.treat_btn.hide();
this.sabotage_btn.hide();
}
function startRetry() {
this._trace("startRetry");
this.map.firstPos_3._y = this.fieldHeight;
this.message.hide();
_global.sManager.fadeIn("bgm_game", 2000);
this._seq.resetSequence();
this.resetAnts();
this.resetMain();
this.map.me_mark.stopMonitoring();
this.map._y = (-this.fieldHeight) + Stage.height;
this.whiteSheet._visible = false;
this.stopScroll();
this.whiteSheet._alpha = 100;
this.whiteSheet._visible = true;
this.whiteSheet.dynTween({duration:50, _alpha:[0, "out"]});
this._seq.execute([1, "init", this.me, true, this.barricades, this.barricadesHandlerName, this], [0, "start_me", this.me], [0, function (o) {
o.gotoAndPlay(o._currentframe + 150);
}, this.me]);
this.showOtherAnts();
this.me._x = 700;
this.me._y = this.fieldHeight + 90;
this._seq.execute([20, "startMonitoring", this.map.me_mark, this.me.ant_walk], [5, "_showBoard", this]);
}
function resetAnts() {
this._trace("resetAnts\u2193");
for (var _local2 in this.ants) {
trace((this.ants[_local2] + ":") + typeof(this.ants[_local2]));
this.ants[_local2].removeMovieClip();
}
}
function goal(ant) {
this._trace("goal:" + ant._name);
if (this._bGoaled) {
return(undefined);
}
this._bGoaled = true;
_global.sManager.fadeOut("bgm_game", 3000);
if (ant == this.me) {
this._trace("\u81EA\u5206\u304C\u30B4\u30FC\u30EB");
this.map.goal_mark.hide();
this.showEnding();
} else {
this._trace("\u4ED6\u4EBA\u304C\u30B4\u30FC\u30EB");
this.retry_ready();
}
}
function showEnding() {
this._trace("showEnding");
this._seq.resetSequence();
this.stopMouseMonitoring();
this.treat_btn.hide();
this.sabotage_btn.hide();
this.whiteSheet._alpha = 0;
this.whiteSheet._visible = true;
this.whiteSheet.dynTween({duration:50, _alpha:[100, "out"]});
var _local2 = function (o) {
o._visible = false;
};
this._seq.execute([50, "resetAnts", this], [0, "stopMonitoring", this.map.me_mark], [0, "stopScroll", this], [0, _local2, this]);
if (!this._eventManager._bEndingLoaded) {
this._seq.execute([0, "checkEndingLoaded", this]);
} else {
this._seq.execute([0, "showEnding", this._eventManager]);
}
}
function checkEndingLoaded() {
this._trace("checkEndingLoaded");
if (this._eventManager._bEndingLoaded) {
this._eventManager.showEnding();
} else {
trace("\u307E\u3060");
}
this._checkEndingLoadedSeq.execute(5, "checkEndingLoaded", this);
}
function startScroll() {
this._trace("startScroll");
var self = this;
this.map.onEnterFrame = function () {
var _local2 = self.scrollStep_now;
var _local3 = self.scrollStep;
if (_local2 > _local3) {
_local2 = _local2 - 0.02;
} else if (_local2 < _local3) {
_local2 = _local2 + 0.02;
}
this._y = this._y + _local2;
self.scrollStep_now = _local2;
if (this._y >= 0) {
this._y = 0;
self.stopScroll();
}
};
}
function stopScroll() {
this._trace("stopScroll");
delete this.map.onEnterFrame;
}
function setScrollStep(num) {
this._trace("setScrollStep:" + num);
this.scrollStep = num;
}
function startMonitorAri() {
var len = this.ants.length;
var finishx = (Stage.width + 30);
var finishy = Stage.height;
var step = 10;
var now = 0;
this.onEnterFrame = function () {
var _local4 = Math.floor((len / step) * now);
var _local5 = Math.floor((len / step) * (now + 1));
var _local3 = _local4;
while (_local3 < _local5) {
var _local2 = this.ants[_local3];
if (_local2.hitTest(bottomField)) {
if (_local2 == this.me) {
this._trace("\u25A0\u30B2\u30FC\u30E0\u30AA\u30FC\u30D0\u30FC");
this.retry_ready();
}
_local2.terminate();
}
if (_local2.hitTest(upperField)) {
this.setScrollStep(1.5);
this._scrollSeq.resetSequence();
this._scrollSeq.execute(20, "setScrollStep", this, this.scrollStep_default);
}
_local3++;
}
now = ((now < (step - 1)) ? (now + 1) : 0);
if (now == 0) {
var _local6 = this._eventStartSeq[this._eventStartIndex];
if (_local6.hitTest(-30, 0, true)) {
trace("\u25A0\u30A4\u30D9\u30F3\u30C8\u59CB\u307E\u308A" + _local6._name);
this.attachEvent(_local6);
this._eventStartIndex++;
}
_local6 = this._eventFinishSeq[this._eventFinishIndex];
if (_local6.hitTest(finishx, finishy, true)) {
trace("\u25A0\u30A4\u30D9\u30F3\u30C8\u7D42\u308F\u308A" + _local6._name);
this.attachEvent(_local6);
this._eventFinishIndex++;
}
}
};
}
function stopMonitorAri() {
this._trace("stopMonitorAri");
delete this.onEnterFrame;
}
function stopAntFromMonitor(ant) {
this._trace("stopAntFromMonitor\u2193");
for (var _local3 in this.ants) {
if (ants[_local3] == ant) {
ants.splice(_local3, 1);
break;
}
}
this._trace((("stopAntFromMonitor:" + ant._name) + " \u6B8B:") + this.ants.length);
}
function addBarricade(o, cmd) {
this._trace((("addBarricade:" + o) + ":") + cmd);
for (var _local3 in this.barricades) {
if (this.barricades[_local3] == o) {
this._trace(("\u25B2error addBarricade\u25B2 " + o) + "\u3092\u4E8C\u91CD\u767B\u9332");
}
}
this.barricades.push(o);
this.barricadesHandlerName.push(cmd);
}
function removeBarricade(o) {
this._trace("removeBarricade:" + o);
var _local2 = false;
for (var _local4 in barricades) {
if (barricades[_local4] == o) {
barricades.splice(_local4, 1);
barricadesHandlerName.splice(_local4, 1);
_local2 = true;
break;
}
}
if (!_local2) {
this._trace(("\u25B2error removeBarricade\u25B2 " + o) + "\u306F\u305D\u3082\u305D\u3082\u767B\u9332\u3055\u308C\u3066\u306A\u3044");
}
}
function startMouseMonitoring() {
Mouse.addListener(this);
var o = this;
var p = o.pointer;
var b = o.barricades;
p._x = _xmouse;
p._y = _ymouse;
this.onMouseMove = function () {
p._x = _xmouse;
p._y = _ymouse;
updateAfterEvent();
};
this.pointerArea.onEnterFrame = function () {
var _local1 = false;
do {
if ((in b) == null) {
break;
}
var _local2 = in b;
} while (!((b[_local2] != o.map.barricade_goal) && (_local1 = b[_local2].hitTest(_xmouse, _ymouse, true))));
do {
} while ("onEnterFrame" != null);
if ((!_local1) && (!o.pointerActivity)) {
o.pointerActivity = true;
o.activatePointer();
} else if (_local1 && (o.pointerActivity)) {
o.pointerActivity = false;
o.inActivatePointer();
}
};
var o = this;
treat_btn.activate();
treat_btn.onPress = function () {
o.activatePointer("treat");
o.toggleToolBtn(this);
};
sabotage_btn.activate();
sabotage_btn.onPress = function () {
o.activatePointer("sabotage");
o.toggleToolBtn(this);
};
treat_btn.activate();
route_btn.onPress = function () {
o.activatePointer("flag");
o.toggleToolBtn(this);
};
}
function toggleToolBtn(btn) {
this._trace("toggleToolBtn:" + btn._name);
for (var _local4 in this._btns) {
var _local2 = this._btns[_local4];
if (_local2 == btn) {
_local2.focused();
} else {
_local2.unfocused();
}
}
}
function stopMouseMonitoring() {
this._trace("stopMouseMonitoring");
Mouse.removeListener(this);
this.map.flag._x = (this.map.candy._x = (this.map.parasol._x = -300));
this.inActivatePointer();
this.pointer.resetPointer();
delete this.onMouseMove;
delete this.pointerArea.onEnterFrame;
treat_btn.disabled();
sabotage_btn.disabled();
route_btn.disabled();
}
function activatePointer(pMode) {
this._trace("activatePointer:" + pMode);
if (pMode != undefined) {
this.pointerMode = pMode;
}
var o = this;
var _local2 = o.pointer;
var _local3 = o.pointerArea;
switch (this.pointerMode) {
case "flag" :
_local2.switchMode("flag");
_local3.onPress = function () {
o._trace("flag onPress");
o.setFlag();
};
break;
case "treat" :
_local2.switchMode("treat");
_local3.onPress = function () {
o._trace("treat onPress");
o.treat_btn.disabled();
o.setCandy();
o.activatePointer("flag");
o.toggleToolBtn(o.route_btn);
};
break;
case "sabotage" :
_local2.switchMode("sabotage");
_local3.onPress = function () {
o._trace("sabotage onPress");
o.sabotage_btn.disabled();
o.setParasol();
o.activatePointer("flag");
o.toggleToolBtn(o.route_btn);
};
}
}
function inActivatePointer() {
this.pointer.inactivate();
delete this.pointerArea.onPress;
}
function setFlag() {
this._trace("setFlag");
var _local2 = {x:_xmouse, y:_ymouse};
var _local3 = this.map;
_local3.globalToLocal(_local2);
_local3.flag.show(_local2.x, _local2.y, this.barricades);
me.setFlag(_local3.flag);
this._flagLifeTimer.execute(130, function (o) {
o.setFlag(null);
}, this.me);
}
function setCandy() {
this._trace("setCandy");
var _local2 = {x:_xmouse, y:_ymouse};
var _local3 = this.map;
_local3.globalToLocal(_local2);
_local3.candy.show(_local2.x, _local2.y, this.barricades);
me.setCandy(_local3.candy);
}
function blinkMe_mark() {
this._trace("blinkMe_mark");
this.map.me_mark.startBlink();
}
function stopBlinkMe_mark() {
this._trace("stopBlinkMe_mark");
this.map.me_mark.stopBlink();
}
function setParasol() {
this._trace("setParasol");
var _local2 = {x:_xmouse, y:_ymouse};
var _local3 = this.map;
_local3.globalToLocal(_local2);
_local3.parasol.show(_local2.x, _local2.y, this.barricades);
this.addBarricade(_local3.parasol, "catchedAtParasol");
}
if (this == _level0) {
init();
this.start();
}
Symbol 12 MovieClip [i3] Frame 8
stop();
Symbol 17 MovieClip [i1] Frame 140
this.removeMovieClip();
Symbol 21 MovieClip [i2] Frame 8
stop();
Symbol 41 MovieClip [ant_compe] Frame 1
function _init() {
trace.all.initialize(this, this._name);
this._visible = false;
this.ant_walk.id_txt.text = this._name.slice(3);
stop();
this._goal = null;
this._flag = null;
this._candy = null;
this._bUnableToMove = false;
this._walk = "walk";
this._walk_short = "walk_short";
this.getAngle = this.getAngle_normal;
this.startCollisionDetection = this.startCollisionDetection_normal;
}
function init(bMe, barricades, barricadesHandlerName, eventController) {
this._trace((("init:bMe:" + bMe) + ":") + barricades);
this._visible = true;
this._me = bMe;
this._barricades = barricades;
this._barricadesHandler = barricadesHandlerName;
this._eventController = eventController;
this._colSeq = new com.kampei.control.Sequence(this, 1234);
if (this._me) {
this.getAngle = this.getAngle_me;
this.startCollisionDetection = this.startCollisionDetection_me;
this._speedUpSeq = new com.kampei.control.Sequence(this, 1235);
}
this.updatePosInfo();
}
function setGoal(gl) {
this._trace("setGoal:" + gl);
this._goal = gl;
}
function setFlag(flag) {
this._colSeq.execute(4, "_setFlag", this, flag);
}
function _setFlag(flag) {
this._trace("setFlag:" + flag);
this._flag = flag;
if (_bUnableToMove || (typeof(this._candy) != "null")) {
return(undefined);
}
this.resetSequence();
this.updatePosInfo();
var _local2 = this._flag;
var _local3 = {x:_local2._x, y:_local2._y};
_local2._parent.localToGlobal(_local3);
this._rotation = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local3) + (Math.random() * 30)) - 15;
this.gotoAndStop("stay");
this.stayAnt();
this.reflectPosInfo();
var _local4 = function (o) {
o.updatePosInfo();
o.walk_short(true);
};
this._colSeq.execute(Math.ceil(Math.random() * 10), _local4, this);
}
function setCandy(candy) {
this._trace("setCandy:" + candy);
if (_bUnableToMove) {
return(undefined);
}
this._candy = candy;
this.resetSequence();
this.stayAnt();
this.stop();
this.updatePosInfo();
var _local2 = this._candy;
var _local3 = {x:_local2._x, y:_local2._y};
_local2._parent.localToGlobal(_local3);
this._rotation = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local3) + (Math.random() * 60)) - 30;
this.walk_short(true);
}
function start() {
doNextAction(false);
}
function start_me() {
this._trace("start_me");
this.gotoAndPlay("start_me");
}
function onStart_me() {
this.stop();
this.stayAnt();
}
function doNextAction(bColl) {
this.updatePosInfo();
var _local2 = Math.random();
if (_local2 > 0.9) {
stay();
} else if (_local2 > 0.4) {
walk_short(bColl);
} else {
walk(bColl);
}
}
function getOutOfBarricade(brcd) {
this.reset();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.getOutOfBarricadesPos(brcd);
this.doNextAction(true);
}
function getOutOfBarricadesPos(brcd) {
this.gotoAndStop("stay");
var _local3 = 0;
var _local8 = 1;
var _local6 = 0;
var _local4 = 3;
var _local7 = this._rotation;
while (true) {
_local3 = _local3 + 15;
this._rotation = _local7 + _local3;
var _local2 = {x:0, y:-_local4};
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = 1;
break;
}
_local2 = {x:0, y:-_local4};
this._rotation = _local7 - _local3;
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = -1;
break;
}
_local6++;
if ((_local6 % 12) == 0) {
_local4 = _local4 + 2;
_local3 = 0;
}
if (_local6 > 100) {
this._trace("\u25B2 getOutOfBarricadesPos \u969C\u5BB3\u7269\u306E\u5916\u304C\u5206\u304B\u3089\u306A\u3044 \u25B2" + brcd);
break;
}
}
this._parent.globalToLocal(_local2);
this._x = _local2.x;
this._y = _local2.y;
}
function startCollisionDetection() {
this._trace("\u25B2startCollisionDetection::: this method should be overrided.");
}
function startCollisionDetection_normal() {
var ant = this.ant_walk;
var brcd = _barricades;
var hdler = _barricadesHandler;
this.onEnterFrame = function () {
var _local2 = {x:ant._x, y:ant._y};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
this[hdler[_local3]](brcd[_local3]);
}
}
};
}
function startCollisionDetection_me() {
var ant = this.ant_walk;
var brcd = _barricades;
var hdler = _barricadesHandler;
var candy = this._candy;
this.onEnterFrame = function () {
var _local2 = {x:ant._x, y:ant._y};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
this[hdler[_local3]](brcd[_local3]);
}
}
if ((typeof(candy) != "null") && (candy.barricade.hitTest(_local2.x, _local2.y, true))) {
this._trace("\u30AD\u30E3\u30F3\u30C7\u30A3\u306B\u3076\u3064\u304B\u3063\u305F");
candy.hide(this.ant_walk);
this._candy = null;
this.speedUpTemporary();
this._eventController.blinkMe_mark();
}
};
}
function speedUpTemporary() {
this._trace("speedUpTemporary");
this._walk = "walk_me";
this._walk_short = "walk_short_me";
this.stop();
this.stopSeequence();
this.doNextAction(false);
_global.sManager.start("speedup", 0, 1);
var _local3 = function (o) {
o._trace("\u666E\u901A\u306E\u30B9\u30D4\u30FC\u30C9\u306B\u623B\u308B");
o._walk = "walk";
o._walk_short = "walk";
o._eventController.stopBlinkMe_mark();
};
this._speedUpSeq.execute(400, _local3, this);
}
function stopCollisionDetection() {
delete this.onEnterFrame;
}
function updatePosInfo() {
antLocalPos = {x:this.ant_walk._x, y:this.ant_walk._y};
this.localToGlobal(antLocalPos);
}
function reflectPosInfo() {
this._parent.globalToLocal(antLocalPos);
this._x = this.antLocalPos.x;
this._y = this.antLocalPos.y;
}
function getAngle_normal() {
var _local2 = {x:_goal._x, y:_goal._y};
_goal._parent.localToGlobal(_local2);
if (_goal == undefined) {
this._trace("\u25B2getAngle error goal\u304C\u306A\u3044");
}
if (Math.random() >= 0.1) {
var _local3 = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local2) + (Math.random() * 90)) - 45;
} else {
var _local3 = Math.random() * 360;
}
return(_local3);
}
function getAngle_me() {
if (typeof(_candy) != "null") {
this._trace("\u30AD\u30E3\u30F3\u30C7\u30A3\u30FC");
var _local2 = {x:_candy._x, y:_candy._y};
_candy._parent.localToGlobal(_local2);
} else if (typeof(_flag) != "null") {
this._trace("\u65D7");
var _local2 = {x:_flag._x, y:_flag._y};
_flag._parent.localToGlobal(_local2);
} else {
this._trace("\u30B4\u30FC\u30EB");
var _local2 = {x:_goal._x, y:_goal._y};
_goal._parent.localToGlobal(_local2);
}
var _local4 = Math.random();
if (_local4 >= 0.1) {
var _local3 = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local2) + (Math.random() * 50)) - 25;
} else {
var _local3 = Math.random() * 360;
}
return(_local3);
}
function walkAnt() {
this.ant_walk.play();
}
function stayAnt() {
this.ant_walk.stop();
}
function walk(bColl) {
this.startCollisionDetection();
this.gotoAndPlay(this._walk);
this.walkAnt();
if (!bColl) {
this._rotation = getAngle();
}
this.reflectPosInfo();
}
function onWalk() {
this.stayAnt();
this.stop();
this._colSeq.execute(Math.floor(Math.random() * 20), "doNextAction", this, false);
}
function walk_short(bColl) {
this.startCollisionDetection();
this.gotoAndPlay(this._walk_short);
this.walkAnt();
if (!bColl) {
this._rotation = getAngle();
}
this.reflectPosInfo();
}
function onWalk_short() {
this.stayAnt();
this.stop();
this._colSeq.execute(Math.floor(Math.random() * 20), "doNextAction", this, false);
}
function stay() {
this.reflectPosInfo();
this.stayAnt();
this._rotation = this._rotation + ((Math.random() * 30) - 60);
this.gotoAndStop("stay");
this.gotoAndPlay(this._currentframe + Math.floor(Math.random() * 15));
}
function onStay() {
this.stop();
this.doNextAction();
}
function stickToBullBlade(brcd) {
this._trace("stickToBullBlade:" + brcd);
brcd.addBulledAnts(this);
this._bUnableToMove = true;
this.walkAnt();
this.stop();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.stopCollisionDetection();
var _local3 = ((Math.random() > 0.5) ? 1 : -1);
this._rotation = brcd._rotation + ((90 + (Math.random() * 15)) * _local3);
this._colSeq.resetSequence();
this.onEnterFrame = function () {
var _local2 = {x:0, y:brcd._height - 20};
brcd.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this._y = _local2.y;
};
}
function releaseFromBlade() {
this._trace("releaseFromBlade:");
this._bUnableToMove = false;
delete this.onEnterFrame;
this._y = this._y + (Math.round(Math.random() * 10) + 2);
this.doNextAction(false);
}
function startPause() {
this._trace("startPause");
this._colSeq.resetSequence();
this.stopCollisionDetection();
this.stayAnt();
this.stop();
}
function resumeFromPause() {
this._trace("releaseFromBlade:");
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.doNextAction(false);
}
function cathedToMeetingRoom(brcd) {
this._trace("cathedAtMeetingRoom");
this._colSeq.resetSequence();
if (brcd.checkOccupation()) {
this.getOutOfBarricade(brcd);
} else {
this._bUnableToMove = true;
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
if (!brcd.door2sheet(this)) {
this.getOutOfBarricade(brcd);
} else {
this.stopCollisionDetection();
}
}
}
function catchedAtParasol(brcd) {
if (this._bCatchedAtParasol || (this._me)) {
return(undefined);
}
this._trace("catchedAtParasol");
this._bCatchedAtParasol = true;
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this._colSeq.resetSequence();
brcd.rest(this);
}
function touchedAtCD(brcd) {
this._trace("touchedAtCD");
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this._colSeq.resetSequence();
var _local4 = {x:this._x, y:this._y};
getOutOfBarricadesPos(brcd);
var _local2 = {x:this._x, y:this._y};
var _local3 = 20;
var _local7 = _local2.x + ((_local2.x - _local4.x) * _local3);
var _local6 = _local2.y + ((_local2.y - _local4.y) * _local3);
var _local8 = ((Math.random() > 0.5) ? 1 : -1);
var _local5 = ((Math.random() * 360) + 540) * _local8;
this.dynTween({duration:30, _x:[_local7, "out"], _y:[_local6, "out"], _rotation:[_local5, "out"], callback:this + ".onTouchedAtCD"});
}
function onTouchedAtCD() {
this._trace("onTouchedAtCD");
this.doNextAction(false);
}
function terminate() {
this._trace("terminate");
this._eventController.stopAntFromMonitor(this);
this.removeMovieClip();
}
function reachToTheGoal() {
this._trace("reachToTheGoal");
this._eventController.goal(this);
}
_init();
this._bCatchedAtParasol = false;
Symbol 41 MovieClip [ant_compe] Frame 82
onWalk();
Symbol 41 MovieClip [ant_compe] Frame 175
onWalk_short();
Symbol 41 MovieClip [ant_compe] Frame 255
onStay();
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 14
stop();
Symbol 83 MovieClip [ant_me] Frame 1
function _init() {
trace.all.initialize(this, this._name);
this._visible = false;
this.ant_walk.id_txt.text = this._name.slice(3);
stop();
this._goal = null;
this._flag = null;
this._candy = null;
this._bUnableToMove = false;
this._walk = "walk";
this._walk_short = "walk_short";
this.getAngle = this.getAngle_normal;
this.startCollisionDetection = this.startCollisionDetection_normal;
}
function init(bMe, barricades, barricadesHandlerName, eventController) {
this._trace((("init:bMe:" + bMe) + ":") + barricades);
this._visible = true;
this._me = bMe;
this._barricades = barricades;
this._barricadesHandler = barricadesHandlerName;
this._eventController = eventController;
this._colSeq = new com.kampei.control.Sequence(this, 1234);
if (this._me) {
this.getAngle = this.getAngle_me;
this.startCollisionDetection = this.startCollisionDetection_me;
this._speedUpSeq = new com.kampei.control.Sequence(this, 1235);
}
this.updatePosInfo();
}
function setGoal(gl) {
this._trace("setGoal:" + gl);
this._goal = gl;
}
function setFlag(flag) {
this._colSeq.execute(4, "_setFlag", this, flag);
}
function _setFlag(flag) {
this._trace("setFlag:" + flag);
this._flag = flag;
if (_bUnableToMove || (typeof(this._candy) != "null")) {
return(undefined);
}
this.resetSequence();
this.updatePosInfo();
var _local2 = this._flag;
var _local3 = {x:_local2._x, y:_local2._y};
_local2._parent.localToGlobal(_local3);
this._rotation = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local3) + (Math.random() * 30)) - 15;
this.gotoAndStop("stay");
this.stayAnt();
this.reflectPosInfo();
var _local4 = function (o) {
o.updatePosInfo();
o.walk_short(true);
};
this._colSeq.execute(Math.ceil(Math.random() * 10), _local4, this);
}
function setCandy(candy) {
this._trace("setCandy:" + candy);
if (_bUnableToMove) {
return(undefined);
}
this._candy = candy;
this.resetSequence();
this.stayAnt();
this.stop();
this.updatePosInfo();
var _local2 = this._candy;
var _local3 = {x:_local2._x, y:_local2._y};
_local2._parent.localToGlobal(_local3);
this._rotation = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local3) + (Math.random() * 60)) - 30;
this.walk_short(true);
}
function start() {
doNextAction(false);
}
function start_me() {
this._trace("start_me");
this.gotoAndPlay("start_me");
}
function onStart_me() {
this.stop();
this.stayAnt();
}
function doNextAction(bColl) {
this.updatePosInfo();
var _local2 = Math.random();
if (_local2 > 0.9) {
stay();
} else if (_local2 > 0.4) {
walk_short(bColl);
} else {
walk(bColl);
}
}
function getOutOfBarricade(brcd) {
this.reset();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.getOutOfBarricadesPos(brcd);
this.doNextAction(true);
}
function getOutOfBarricadesPos(brcd) {
this.gotoAndStop("stay");
var _local3 = 0;
var _local8 = 1;
var _local6 = 0;
var _local4 = 3;
var _local7 = this._rotation;
while (true) {
_local3 = _local3 + 15;
this._rotation = _local7 + _local3;
var _local2 = {x:0, y:-_local4};
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = 1;
break;
}
_local2 = {x:0, y:-_local4};
this._rotation = _local7 - _local3;
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = -1;
break;
}
_local6++;
if ((_local6 % 12) == 0) {
_local4 = _local4 + 2;
_local3 = 0;
}
if (_local6 > 100) {
this._trace("\u25B2 getOutOfBarricadesPos \u969C\u5BB3\u7269\u306E\u5916\u304C\u5206\u304B\u3089\u306A\u3044 \u25B2" + brcd);
break;
}
}
this._parent.globalToLocal(_local2);
this._x = _local2.x;
this._y = _local2.y;
}
function startCollisionDetection() {
this._trace("\u25B2startCollisionDetection::: this method should be overrided.");
}
function startCollisionDetection_normal() {
var ant = this.ant_walk;
var brcd = _barricades;
var hdler = _barricadesHandler;
this.onEnterFrame = function () {
var _local2 = {x:ant._x, y:ant._y};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
this[hdler[_local3]](brcd[_local3]);
}
}
};
}
function startCollisionDetection_me() {
var ant = this.ant_walk;
var brcd = _barricades;
var hdler = _barricadesHandler;
var candy = this._candy;
this.onEnterFrame = function () {
var _local2 = {x:ant._x, y:ant._y};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
this[hdler[_local3]](brcd[_local3]);
}
}
if ((typeof(candy) != "null") && (candy.barricade.hitTest(_local2.x, _local2.y, true))) {
this._trace("\u30AD\u30E3\u30F3\u30C7\u30A3\u306B\u3076\u3064\u304B\u3063\u305F");
candy.hide(this.ant_walk);
this._candy = null;
this.speedUpTemporary();
this._eventController.blinkMe_mark();
}
};
}
function speedUpTemporary() {
this._trace("speedUpTemporary");
this._walk = "walk_me";
this._walk_short = "walk_short_me";
this.stop();
this.stopSeequence();
this.doNextAction(false);
_global.sManager.start("speedup", 0, 1);
var _local3 = function (o) {
o._trace("\u666E\u901A\u306E\u30B9\u30D4\u30FC\u30C9\u306B\u623B\u308B");
o._walk = "walk";
o._walk_short = "walk";
o._eventController.stopBlinkMe_mark();
};
this._speedUpSeq.execute(400, _local3, this);
}
function stopCollisionDetection() {
delete this.onEnterFrame;
}
function updatePosInfo() {
antLocalPos = {x:this.ant_walk._x, y:this.ant_walk._y};
this.localToGlobal(antLocalPos);
}
function reflectPosInfo() {
this._parent.globalToLocal(antLocalPos);
this._x = this.antLocalPos.x;
this._y = this.antLocalPos.y;
}
function getAngle_normal() {
var _local2 = {x:_goal._x, y:_goal._y};
_goal._parent.localToGlobal(_local2);
if (_goal == undefined) {
this._trace("\u25B2getAngle error goal\u304C\u306A\u3044");
}
if (Math.random() >= 0.1) {
var _local3 = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local2) + (Math.random() * 90)) - 45;
} else {
var _local3 = Math.random() * 360;
}
return(_local3);
}
function getAngle_me() {
if (typeof(_candy) != "null") {
this._trace("\u30AD\u30E3\u30F3\u30C7\u30A3\u30FC");
var _local2 = {x:_candy._x, y:_candy._y};
_candy._parent.localToGlobal(_local2);
} else if (typeof(_flag) != "null") {
this._trace("\u65D7");
var _local2 = {x:_flag._x, y:_flag._y};
_flag._parent.localToGlobal(_local2);
} else {
this._trace("\u30B4\u30FC\u30EB");
var _local2 = {x:_goal._x, y:_goal._y};
_goal._parent.localToGlobal(_local2);
}
var _local4 = Math.random();
if (_local4 >= 0.1) {
var _local3 = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local2) + (Math.random() * 50)) - 25;
} else {
var _local3 = Math.random() * 360;
}
return(_local3);
}
function walkAnt() {
this.ant_walk.play();
}
function stayAnt() {
this.ant_walk.stop();
}
function walk(bColl) {
this.startCollisionDetection();
this.gotoAndPlay(this._walk);
this.walkAnt();
if (!bColl) {
this._rotation = getAngle();
}
this.reflectPosInfo();
}
function onWalk() {
this.stayAnt();
this.stop();
this._colSeq.execute(Math.floor(Math.random() * 20), "doNextAction", this, false);
}
function walk_short(bColl) {
this.startCollisionDetection();
this.gotoAndPlay(this._walk_short);
this.walkAnt();
if (!bColl) {
this._rotation = getAngle();
}
this.reflectPosInfo();
}
function onWalk_short() {
this.stayAnt();
this.stop();
this._colSeq.execute(Math.floor(Math.random() * 20), "doNextAction", this, false);
}
function stay() {
this.reflectPosInfo();
this.stayAnt();
this._rotation = this._rotation + ((Math.random() * 30) - 60);
this.gotoAndStop("stay");
this.gotoAndPlay(this._currentframe + Math.floor(Math.random() * 15));
}
function onStay() {
this.stop();
this.doNextAction();
}
function stickToBullBlade(brcd) {
this._trace("stickToBullBlade:" + brcd);
brcd.addBulledAnts(this);
this._bUnableToMove = true;
this.walkAnt();
this.stop();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.stopCollisionDetection();
var _local3 = ((Math.random() > 0.5) ? 1 : -1);
this._rotation = brcd._rotation + ((90 + (Math.random() * 15)) * _local3);
this._colSeq.resetSequence();
this.onEnterFrame = function () {
var _local2 = {x:0, y:brcd._height - 20};
brcd.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this._y = _local2.y;
};
}
function releaseFromBlade() {
this._trace("releaseFromBlade:");
this._bUnableToMove = false;
delete this.onEnterFrame;
this._y = this._y + (Math.round(Math.random() * 10) + 2);
this.doNextAction(false);
}
function startPause() {
this._trace("startPause");
this._colSeq.resetSequence();
this.stopCollisionDetection();
this.stayAnt();
this.stop();
}
function resumeFromPause() {
this._trace("releaseFromBlade:");
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.doNextAction(false);
}
function cathedToMeetingRoom(brcd) {
this._trace("cathedAtMeetingRoom");
this._colSeq.resetSequence();
if (brcd.checkOccupation()) {
this.getOutOfBarricade(brcd);
} else {
this._bUnableToMove = true;
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
if (!brcd.door2sheet(this)) {
this.getOutOfBarricade(brcd);
} else {
this.stopCollisionDetection();
}
}
}
function catchedAtParasol(brcd) {
if (this._bCatchedAtParasol || (this._me)) {
return(undefined);
}
this._trace("catchedAtParasol");
this._bCatchedAtParasol = true;
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this._colSeq.resetSequence();
brcd.rest(this);
}
function touchedAtCD(brcd) {
this._trace("touchedAtCD");
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this._colSeq.resetSequence();
var _local4 = {x:this._x, y:this._y};
getOutOfBarricadesPos(brcd);
var _local2 = {x:this._x, y:this._y};
var _local3 = 20;
var _local7 = _local2.x + ((_local2.x - _local4.x) * _local3);
var _local6 = _local2.y + ((_local2.y - _local4.y) * _local3);
var _local8 = ((Math.random() > 0.5) ? 1 : -1);
var _local5 = ((Math.random() * 360) + 540) * _local8;
this.dynTween({duration:30, _x:[_local7, "out"], _y:[_local6, "out"], _rotation:[_local5, "out"], callback:this + ".onTouchedAtCD"});
}
function onTouchedAtCD() {
this._trace("onTouchedAtCD");
this.doNextAction(false);
}
function terminate() {
this._trace("terminate");
this._eventController.stopAntFromMonitor(this);
this.removeMovieClip();
}
function reachToTheGoal() {
this._trace("reachToTheGoal");
this._eventController.goal(this);
}
_init();
this._bCatchedAtParasol = false;
Symbol 83 MovieClip [ant_me] Frame 82
onWalk();
Symbol 83 MovieClip [ant_me] Frame 172
onWalk_short();
Symbol 83 MovieClip [ant_me] Frame 250
onStay();
Symbol 83 MovieClip [ant_me] Frame 291
onWalk();
Symbol 83 MovieClip [ant_me] Frame 369
onWalk_short();
Symbol 83 MovieClip [ant_me] Frame 692
onStart_me();
Symbol 103 MovieClip [ant] Frame 1
function _init() {
trace.all.initialize(this, this._name);
this._visible = false;
this.ant_walk.id_txt.text = this._name.slice(3);
stop();
this._goal = null;
this._flag = null;
this._candy = null;
this._bUnableToMove = false;
this._walk = "walk";
this._walk_short = "walk_short";
this.getAngle = this.getAngle_normal;
this.startCollisionDetection = this.startCollisionDetection_normal;
}
function init(bMe, barricades, barricadesHandlerName, eventController) {
this._trace((("init:bMe:" + bMe) + ":") + barricades);
this._visible = true;
this._me = bMe;
this._barricades = barricades;
this._barricadesHandler = barricadesHandlerName;
this._eventController = eventController;
this._colSeq = new com.kampei.control.Sequence(this, 1234);
if (this._me) {
this.getAngle = this.getAngle_me;
this.startCollisionDetection = this.startCollisionDetection_me;
this._speedUpSeq = new com.kampei.control.Sequence(this, 1235);
}
this.updatePosInfo();
}
function setGoal(gl) {
this._trace("setGoal:" + gl);
this._goal = gl;
}
function setFlag(flag) {
this._colSeq.execute(4, "_setFlag", this, flag);
}
function _setFlag(flag) {
this._trace("setFlag:" + flag);
this._flag = flag;
if (_bUnableToMove || (typeof(this._candy) != "null")) {
return(undefined);
}
this.resetSequence();
this.updatePosInfo();
var _local2 = this._flag;
var _local3 = {x:_local2._x, y:_local2._y};
_local2._parent.localToGlobal(_local3);
this._rotation = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local3) + (Math.random() * 30)) - 15;
this.gotoAndStop("stay");
this.stayAnt();
this.reflectPosInfo();
var _local4 = function (o) {
o.updatePosInfo();
o.walk_short(true);
};
this._colSeq.execute(Math.ceil(Math.random() * 10), _local4, this);
}
function setCandy(candy) {
this._trace("setCandy:" + candy);
if (_bUnableToMove) {
return(undefined);
}
this._candy = candy;
this.resetSequence();
this.stayAnt();
this.stop();
this.updatePosInfo();
var _local2 = this._candy;
var _local3 = {x:_local2._x, y:_local2._y};
_local2._parent.localToGlobal(_local3);
this._rotation = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local3) + (Math.random() * 60)) - 30;
this.walk_short(true);
}
function start() {
doNextAction(false);
}
function start_me() {
this._trace("start_me");
this.gotoAndPlay("start_me");
}
function onStart_me() {
this.stop();
this.stayAnt();
}
function doNextAction(bColl) {
this.updatePosInfo();
var _local2 = Math.random();
if (_local2 > 0.9) {
stay();
} else if (_local2 > 0.4) {
walk_short(bColl);
} else {
walk(bColl);
}
}
function getOutOfBarricade(brcd) {
this.reset();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.getOutOfBarricadesPos(brcd);
this.doNextAction(true);
}
function getOutOfBarricadesPos(brcd) {
this.gotoAndStop("stay");
var _local3 = 0;
var _local8 = 1;
var _local6 = 0;
var _local4 = 3;
var _local7 = this._rotation;
while (true) {
_local3 = _local3 + 15;
this._rotation = _local7 + _local3;
var _local2 = {x:0, y:-_local4};
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = 1;
break;
}
_local2 = {x:0, y:-_local4};
this._rotation = _local7 - _local3;
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = -1;
break;
}
_local6++;
if ((_local6 % 12) == 0) {
_local4 = _local4 + 2;
_local3 = 0;
}
if (_local6 > 100) {
this._trace("\u25B2 getOutOfBarricadesPos \u969C\u5BB3\u7269\u306E\u5916\u304C\u5206\u304B\u3089\u306A\u3044 \u25B2" + brcd);
break;
}
}
this._parent.globalToLocal(_local2);
this._x = _local2.x;
this._y = _local2.y;
}
function startCollisionDetection() {
this._trace("\u25B2startCollisionDetection::: this method should be overrided.");
}
function startCollisionDetection_normal() {
var ant = this.ant_walk;
var brcd = _barricades;
var hdler = _barricadesHandler;
this.onEnterFrame = function () {
var _local2 = {x:ant._x, y:ant._y};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
this[hdler[_local3]](brcd[_local3]);
}
}
};
}
function startCollisionDetection_me() {
var ant = this.ant_walk;
var brcd = _barricades;
var hdler = _barricadesHandler;
var candy = this._candy;
this.onEnterFrame = function () {
var _local2 = {x:ant._x, y:ant._y};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
this[hdler[_local3]](brcd[_local3]);
}
}
if ((typeof(candy) != "null") && (candy.barricade.hitTest(_local2.x, _local2.y, true))) {
this._trace("\u30AD\u30E3\u30F3\u30C7\u30A3\u306B\u3076\u3064\u304B\u3063\u305F");
candy.hide(this.ant_walk);
this._candy = null;
this.speedUpTemporary();
this._eventController.blinkMe_mark();
}
};
}
function speedUpTemporary() {
this._trace("speedUpTemporary");
this._walk = "walk_me";
this._walk_short = "walk_short_me";
this.stop();
this.stopSeequence();
this.doNextAction(false);
_global.sManager.start("speedup", 0, 1);
var _local3 = function (o) {
o._trace("\u666E\u901A\u306E\u30B9\u30D4\u30FC\u30C9\u306B\u623B\u308B");
o._walk = "walk";
o._walk_short = "walk";
o._eventController.stopBlinkMe_mark();
};
this._speedUpSeq.execute(400, _local3, this);
}
function stopCollisionDetection() {
delete this.onEnterFrame;
}
function updatePosInfo() {
antLocalPos = {x:this.ant_walk._x, y:this.ant_walk._y};
this.localToGlobal(antLocalPos);
}
function reflectPosInfo() {
this._parent.globalToLocal(antLocalPos);
this._x = this.antLocalPos.x;
this._y = this.antLocalPos.y;
}
function getAngle_normal() {
var _local2 = {x:_goal._x, y:_goal._y};
_goal._parent.localToGlobal(_local2);
if (_goal == undefined) {
this._trace("\u25B2getAngle error goal\u304C\u306A\u3044");
}
if (Math.random() >= 0.1) {
var _local3 = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local2) + (Math.random() * 90)) - 45;
} else {
var _local3 = Math.random() * 360;
}
return(_local3);
}
function getAngle_me() {
if (typeof(_candy) != "null") {
this._trace("\u30AD\u30E3\u30F3\u30C7\u30A3\u30FC");
var _local2 = {x:_candy._x, y:_candy._y};
_candy._parent.localToGlobal(_local2);
} else if (typeof(_flag) != "null") {
this._trace("\u65D7");
var _local2 = {x:_flag._x, y:_flag._y};
_flag._parent.localToGlobal(_local2);
} else {
this._trace("\u30B4\u30FC\u30EB");
var _local2 = {x:_goal._x, y:_goal._y};
_goal._parent.localToGlobal(_local2);
}
var _local4 = Math.random();
if (_local4 >= 0.1) {
var _local3 = (jp.co.bascule.util.Geometry.getAngleBetweenPoints(this.antLocalPos, _local2) + (Math.random() * 50)) - 25;
} else {
var _local3 = Math.random() * 360;
}
return(_local3);
}
function walkAnt() {
this.ant_walk.play();
}
function stayAnt() {
this.ant_walk.stop();
}
function walk(bColl) {
this.startCollisionDetection();
this.gotoAndPlay(this._walk);
this.walkAnt();
if (!bColl) {
this._rotation = getAngle();
}
this.reflectPosInfo();
}
function onWalk() {
this.stayAnt();
this.stop();
this._colSeq.execute(Math.floor(Math.random() * 20), "doNextAction", this, false);
}
function walk_short(bColl) {
this.startCollisionDetection();
this.gotoAndPlay(this._walk_short);
this.walkAnt();
if (!bColl) {
this._rotation = getAngle();
}
this.reflectPosInfo();
}
function onWalk_short() {
this.stayAnt();
this.stop();
this._colSeq.execute(Math.floor(Math.random() * 20), "doNextAction", this, false);
}
function stay() {
this.reflectPosInfo();
this.stayAnt();
this._rotation = this._rotation + ((Math.random() * 30) - 60);
this.gotoAndStop("stay");
this.gotoAndPlay(this._currentframe + Math.floor(Math.random() * 15));
}
function onStay() {
this.stop();
this.doNextAction();
}
function stickToBullBlade(brcd) {
this._trace("stickToBullBlade:" + brcd);
brcd.addBulledAnts(this);
this._bUnableToMove = true;
this.walkAnt();
this.stop();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.stopCollisionDetection();
var _local3 = ((Math.random() > 0.5) ? 1 : -1);
this._rotation = brcd._rotation + ((90 + (Math.random() * 15)) * _local3);
this._colSeq.resetSequence();
this.onEnterFrame = function () {
var _local2 = {x:0, y:brcd._height - 20};
brcd.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this._y = _local2.y;
};
}
function releaseFromBlade() {
this._trace("releaseFromBlade:");
this._bUnableToMove = false;
delete this.onEnterFrame;
this._y = this._y + (Math.round(Math.random() * 10) + 2);
this.doNextAction(false);
}
function startPause() {
this._trace("startPause");
this._colSeq.resetSequence();
this.stopCollisionDetection();
this.stayAnt();
this.stop();
}
function resumeFromPause() {
this._trace("releaseFromBlade:");
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this.doNextAction(false);
}
function cathedToMeetingRoom(brcd) {
this._trace("cathedAtMeetingRoom");
this._colSeq.resetSequence();
if (brcd.checkOccupation()) {
this.getOutOfBarricade(brcd);
} else {
this._bUnableToMove = true;
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
if (!brcd.door2sheet(this)) {
this.getOutOfBarricade(brcd);
} else {
this.stopCollisionDetection();
}
}
}
function catchedAtParasol(brcd) {
if (this._bCatchedAtParasol || (this._me)) {
return(undefined);
}
this._trace("catchedAtParasol");
this._bCatchedAtParasol = true;
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this._colSeq.resetSequence();
brcd.rest(this);
}
function touchedAtCD(brcd) {
this._trace("touchedAtCD");
this.stop();
this.stayAnt();
this.updatePosInfo();
this.gotoAndStop("stay");
this.reflectPosInfo();
this._colSeq.resetSequence();
var _local4 = {x:this._x, y:this._y};
getOutOfBarricadesPos(brcd);
var _local2 = {x:this._x, y:this._y};
var _local3 = 20;
var _local7 = _local2.x + ((_local2.x - _local4.x) * _local3);
var _local6 = _local2.y + ((_local2.y - _local4.y) * _local3);
var _local8 = ((Math.random() > 0.5) ? 1 : -1);
var _local5 = ((Math.random() * 360) + 540) * _local8;
this.dynTween({duration:30, _x:[_local7, "out"], _y:[_local6, "out"], _rotation:[_local5, "out"], callback:this + ".onTouchedAtCD"});
}
function onTouchedAtCD() {
this._trace("onTouchedAtCD");
this.doNextAction(false);
}
function terminate() {
this._trace("terminate");
this._eventController.stopAntFromMonitor(this);
this.removeMovieClip();
}
function reachToTheGoal() {
this._trace("reachToTheGoal");
this._eventController.goal(this);
}
_init();
this._bCatchedAtParasol = false;
Symbol 103 MovieClip [ant] Frame 82
onWalk();
Symbol 103 MovieClip [ant] Frame 175
onWalk_short();
Symbol 103 MovieClip [ant] Frame 253
onStay();
Symbol 107 MovieClip [AsLib] Frame 1
#initclip 2
if (typeof(_global.AsSetupPackage) == "undefined") {
_global.AsSetupPackage = function (path) {
var _local5 = path.split(".");
var _local4 = _global;
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = _local5[_local3];
if (_local4[_local2] == undefined) {
_local4[_local2] = new Object();
}
_local4 = _local4[_local2];
_local3++;
}
return(_local4);
};
}
if (typeof(trace.all) == "undefined") {
o = (trace.all = function () {
var _local2 = trace.all;
if (_local2.bAvailable) {
if (_local2._filters.length <= 0) {
var _local3 = {eventName:"add", message:_local2.getAll.apply(_local2, arguments)};
_local2._sendTraceEvent(_local3);
} else if (_local2._checkFilter(arguments[0])) {
var _local3 = {eventName:"add", message:"f:" + _local2.getAll.apply(_local2, arguments)};
_local2._sendTraceEvent(_local3);
}
}
});
o.bAvailable = true;
o.setAvailable = function (bOn) {
trace.all.bAvailable = bOn;
};
o._str = "";
o.getAll = function () {
this._analysis.apply(this, arguments);
var _local3 = this._str;
this._str = "";
return(_local3);
};
o._analysis = function () {
if (arguments.length == 2) {
this._addStr(("______" + arguments[0]) + "______");
var _local3 = arguments[1];
} else {
var _local3 = arguments[0];
}
var _local5 = typeof(_local3);
if ((_local5 == "object") || (_local5 == "function")) {
for (var _local6 in _local3) {
var _local4 = true;
break;
}
if (_local4) {
if (_local3 instanceof Array) {
this._traceArr(_local3, 0);
} else {
this._traceObj(_local3, 0);
}
} else if (_local3 instanceof Date) {
this._addStr(("date(" + _local3.toString()) + ")");
} else {
this._addStr(_local5);
}
} else if (_local5 == "undefined") {
this._addStr(_local5);
} else {
this._addStr(String(_local3));
}
if (arguments.length == 2) {
this._addStr("");
}
};
o._traceObj = function (obj, level) {
var _local4 = "";
var _local8 = 0;
while (_local8 < level) {
_local4 = _local4 + "\t";
_local8++;
}
if (level >= this._levMax) {
this._addStr(("*** \u30CD\u30B9\u30C8\u30EC\u30D9\u30EB\u304C " + this._levMax) + " \u3092\u8D85\u3048\u305F\u306E\u3067\u4E2D\u65AD ***");
return(undefined);
}
var _local7 = 0;
for (_local8 in obj) {
_local7++;
if (_local7 > this._lengthMax) {
this._addStr(("*** \u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C " + this._lengthMax) + " \u3092\u8D85\u3048\u305F\u306E\u3067\u4E2D\u65AD ***");
return(undefined);
}
var _local2 = obj[_local8];
var _local3 = typeof(_local2);
if (_local2 instanceof Date) {
this._addStr((((_local4 + _local8) + " : date(") + _local2.toString()) + ")");
} else if (_local2 instanceof Array) {
this._addStr((_local4 + _local8) + " : array");
this._traceArr(_local2, level + 1);
} else if ((_local3 == "object") || (_local3 == "function")) {
this._addStr(((_local4 + _local8) + " : ") + _local3);
this._traceObj(_local2, level + 1);
} else if (_local3 == "undefined") {
this._addStr(((_local4 + _local8) + " : ") + _local3);
} else {
this._addStr(((_local4 + _local8) + " : ") + String(_local2));
}
}
};
o._traceArr = function (arr, level) {
var _local5 = "";
var _local2 = 0;
while (_local2 < level) {
_local5 = _local5 + "\t";
_local2++;
}
if (level >= this._levMax) {
this._addStr(("*** \u30CD\u30B9\u30C8\u30EC\u30D9\u30EB\u304C " + this._levMax) + " \u3092\u8D85\u3048\u305F\u306E\u3067\u4E2D\u65AD ***");
return(undefined);
}
var _local7 = 0;
var _local8 = arr.length;
_local2 = 0;
while (_local2 < _local8) {
_local7++;
if (_local7 > this._lengthMax) {
this._addStr(("*** \u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C " + this._lengthMax) + " \u3092\u8D85\u3048\u305F\u306E\u3067\u4E2D\u65AD ***");
return(undefined);
}
var _local3 = arr[_local2];
var _local4 = typeof(_local3);
if (_local3 instanceof Date) {
this._addStr((((_local5 + _local2) + " : date(") + _local3.toString()) + ")");
} else if (_local3 instanceof Array) {
this._addStr((_local5 + _local2) + " : array");
this._traceArr(_local3, level + 1);
} else if ((_local4 == "object") || (_local4 == "function")) {
this._addStr(((_local5 + _local2) + " : ") + _local4);
this._traceObj(_local3, level + 1);
} else if (_local4 == "undefined") {
this._addStr(((_local5 + _local2) + " : ") + _local4);
} else {
this._addStr(((_local5 + _local2) + " : ") + String(_local3));
}
_local2++;
}
};
o._addStr = function (msg) {
if (this._str == "") {
this._str = this._str + msg;
} else {
this._str = this._str + (newline + msg);
}
};
o._filters = [];
o.addFilter = function () {
trace.all._sendTraceEvent({eventName:"add", message:trace.all.getAll.apply(trace.all, ["**trace.all.addFilter** " + arguments])});
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (typeof(_local3) == "string") {
this._filters.push(_local3);
} else {
trace(("\u25B2trace.all.setFilter:" + _local4) + "\u756A\u76EE\u306B\u5909\u306A\u578B\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u6E21\u3057\u3066\u308B\u3088");
}
}
};
o.resetFilter = function () {
this._filters = [];
trace.all._sendTraceEvent({eventName:"add", message:trace.all.getAll.apply(trace.all, ["**trace.all.resetFilter**"])});
};
o._checkFilter = function (header) {
if (typeof(header) != "string") {
return(false);
}
var _local3 = header.slice(0, 20);
var _local2 = this._filters;
for (var _local4 in _local2) {
if (_local3.indexOf(_local2[_local4]) >= 0) {
return(true);
}
}
return(false);
};
o._levMax = 10;
o._lengthMax = 20;
o._remoteTraceEnabled = false;
o.connectionName = "_basculeDebug";
o.setNestMax = function (num) {
this._levMax = num;
};
o.setLengthMax = function (num) {
this._lengthMax = num;
};
o.clear = function () {
this._sendTraceEvent({eventName:"clear"});
};
o.setTraceEnabled = function (bOk) {
if (bOk) {
this.removeView(this.defaultView);
this.addView(this.defaultView);
} else {
this.removeView(this.defaultView);
}
};
o.setTextBoxEnabled = function (bOk) {
if (bOk) {
this.removeView(this.defaultTextBoxView);
this.defaultTextBoxView = new this.textBoxViewClass(this._textBox);
this.addView(this.defaultTextBoxView);
} else {
this.removeView(this.defaultTextBoxView);
}
};
o.setTextBox = function (p) {
this._textBox = p;
};
o.clearTextBox = function () {
this.defaultTextBoxView.clear();
};
o.setRemoteTraceEnabled = function (bOk) {
if (bOk) {
this.removeView(this.defaultRemoteView);
this.defaultRemoteView = new this.remoteTraceClass(this.connectionName);
this.addView(this.defaultRemoteView);
} else {
this.removeView(this.defaultRemoteView);
}
this._remoteTraceEnabled = bOk;
};
o.setRemoteConnectionName = function (connectionName) {
this.connectionName = connectionName;
if (this._remoteTraceEnabled) {
this.setRemoteTraceEnabled(true);
}
};
o.clearRemoteTextBox = function () {
this.defaultRemoteView.clear();
};
o.views = [];
o.addView = function (viewRef) {
var _local2 = this.views;
var _local3 = _local2.length;
_local2[-1] = viewRef;
_local3--;
while (_local2[_local3] != viewRef) {
}
delete _local2[-1];
if (_local3 < 0) {
_local2.push(viewRef);
return(true);
}
return(false);
};
o.removeView = function (viewRef) {
var _local2 = this.views;
var _local3 = _local2.length;
_local2[-1] = viewRef;
_local3--;
while (_local2[_local3] != viewRef) {
}
delete _local2[-1];
if (_local3 >= 0) {
_local2.splice(_local3, 1);
return(true);
}
return(false);
};
o._sendTraceEvent = function () {
arguments.unshift(this);
var _local4 = this.views.length;
var _local3 = 0;
while (_local3 < _local4) {
this.views[_local3].onTraceEvent.apply(this.views[_local3], arguments);
_local3++;
}
};
o.defaultView = function () {
};
o.defaultView.onTraceEvent = function (sender, e) {
switch (e.eventName) {
case "add" :
this.writeLine(e.message);
break;
case "clear" :
this.clear();
}
};
o.defaultView.writeLine = function (message) {
trace(message);
};
o.defaultView.clear = function () {
};
o.textBoxViewClass = function (textBox) {
this.textBox = textBox;
};
o.textBoxViewClass.prototype.onTraceEvent = function (sender, e) {
switch (e.eventName) {
case "add" :
this.writeLine(e.message);
break;
case "clear" :
this.clear();
}
};
o.textBoxViewClass.prototype.writeLine = function (message) {
this.textBox.text = this.textBox.text + (message + newline);
this.textBox.scroll = this.textBox.scroll + this.textBox.maxscroll;
};
o.textBoxViewClass.prototype.clear = function () {
this.textBox.text = "";
};
o.remoteTraceClass = function (connectionName) {
this.connectionName = connectionName;
this._init();
};
o.remoteTraceClass.prototype._init = function () {
if (typeof(this._lc) != "undefined") {
this._lc.close();
}
this._lc = new LocalConnection();
this._lc.allowDomain = function () {
return(true);
};
this._lc.__owner__ = this;
this._lc.connect(this.connectionName + "_remoteControl");
this._lc.onRemoteControl = this.onRemoteControl;
};
o.remoteTraceClass.prototype.onRemoteControl = function () {
var _local3 = arguments.shift();
switch (_local3) {
case "reset" :
this._init();
break;
default :
}
};
o.remoteTraceClass.prototype.onTraceEvent = function (sender, e) {
switch (e.eventName) {
case "add" :
this.writeLine(e.message);
break;
case "clear" :
this.clear();
}
};
o.remoteTraceClass.prototype.writeLine = function (message) {
this._lc.send(this.connectionName, "onReceive", message);
};
o.remoteTraceClass.prototype.clear = function () {
this._lc.send(this.connectionName, "clearText");
};
o.setTraceEnabled(true);
o._textBox = traceBox;
o.setTextBoxEnabled(true);
o.setRemoteTraceEnabled(true);
delete o;
}
if (!trace.all.initialize) {
o = trace.all;
o.initialize = function (instance, traceTitle) {
instance.__traceTitle__ = traceTitle;
instance._trace = trace.all.__trace__;
};
o.__trace__ = function (arg1, arg2) {
if (arg2 == undefined) {
if ((arg1 instanceof Array) || (arg1 instanceof Object)) {
trace.all(("[" + this.__traceTitle__) + "] ", arg1);
} else {
trace.all((("[" + this.__traceTitle__) + "] ") + arg1);
}
} else {
trace.all((("[" + this.__traceTitle__) + "] ") + arg1, arg2);
}
};
delete o;
}
MovieClip.prototype.dynTween = function (tween_objects) {
var _local7 = this.createEmptyMovieClip("tweenEngine", 20002);
var _local6 = (_local7.holder = new com.tatsuokato.TweensHolder());
var _local3 = arguments.length;
var _local4 = _local6.tweens;
var _local5 = com.tatsuokato.Tween;
while (_local3) {
_local3--;
_local4.unshift(new _local5[undefined](this, arguments[_local3]));
}
_local6.begin();
};
MovieClip.prototype.reset = function (initObj) {
delete eval (this.tweenEngine.removeMovieClip());
if (initObj) {
for (var _local3 in initObj) {
this[_local3] = initObj[_local3];
}
}
};
ASSetPropFlags(MovieClip.prototype, ["dynTween", "reset"], 1);
if (typeof(_global.AsSetupPackage) == "undefined") {
trace("ERROR: DynTween.as requires AsSetupPackage.as - AsSetupPackage.as was not included");
}
AsSetupPackage("com.tatsuokato");
com.tatsuokato.TweensHolder = function () {
this.tweens = [];
};
com.tatsuokato.TweensHolder.prototype.begin = function () {
var _local2 = this.tweens.shift();
_local2.setUp();
this.cnt = 0;
_local2.run(this);
};
com.tatsuokato.Tween = function (mc, tObj) {
this.init(mc, tObj);
};
com.tatsuokato.Tween.prototype.init = function (mc, tObj) {
this.mc = mc;
(this.dur = tObj.duration);
delete tObj.duration;
if (tObj.callback != null) {
this.callback = tObj.callback;
delete tObj.callback;
}
if (tObj.cbArgs != null) {
this.cbArgs = tObj.cbArgs;
delete tObj.cbArgs;
}
this.props = {};
for (var _local6 in tObj) {
var _local2 = tObj[_local6];
var _local3 = (this.props[_local6] = {});
if (typeof(_local2) == "number") {
_local3.end = _local2;
_local3.ease = "none";
} else {
_local3.end = _local2[0];
if (_local2[1] == null) {
_local3.ease = "none";
} else {
_local3.ease = _local2[1];
var _local4 = com.tatsuokato.Tween.MAX_EASING;
_local3.strength = (_local2[2] ? ((((_local4 - 1) * _local2[2]) / 100) + 1) : (_local4 / 2));
}
}
}
};
com.tatsuokato.Tween.prototype.setUp = function () {
var _local3 = this.props;
var _local4 = this.mc;
for (var _local5 in _local3) {
var _local2 = _local3[_local5];
_local2.val = _local2.end - ((_local2.bgn = _local4[_local5]));
delete _local2.end;
}
};
com.tatsuokato.Tween.prototype.run = function (holder) {
var o = this;
var mc = o.mc;
var d = o.dur;
var props = o.props;
mc.tweenEngine.onEnterFrame = function () {
var c = (++holder.cnt);
if (c <= d) {
for (var i in props) {
var p = props[i];
mc[i] = o[p.ease](c, p.bgn, p.val, d, p.strength);
}
mc.onDynTweenEnterFrame();
} else {
if (holder.tweens.length) {
holder.begin();
} else {
mc.reset();
}
eval (o.callback)(o.cbArgs);
}
};
};
com.tatsuokato.Tween.MAX_EASING = 8;
com.tatsuokato.Tween.prototype.none = function (c, b, v, d) {
return(b + ((v * c) / d));
};
com.tatsuokato.Tween.prototype.in = function (c, b, v, d, s) {
return(b + (v * Math.pow(c / d, s)));
};
com.tatsuokato.Tween.prototype.out = function (c, b, v, d, s) {
return(b + (v * (1 - Math.pow(1 - (c / d), s))));
};
com.tatsuokato.Tween.prototype.inOut = function (c, b, v, d, s) {
d = d / 2;
if (c <= d) {
return(b + ((v / 2) * Math.pow(c / d, s)));
}
return((b + v) - ((v / 2) * Math.pow(2 - (c / d), s)));
};
com.tatsuokato.Tween.prototype.outIn = function (c, b, v, d, s) {
d = d / 2;
if (c <= d) {
return(b + ((v / 2) * (1 - Math.pow(1 - (c / d), s))));
}
return(b + ((v / 2) * (1 + Math.pow((c / d) - 1, s))));
};
o = (AsSetupPackage("com.kampei.control").Sequence = function () {
this._init.apply(this, arguments);
});
pt = o.prototype;
pt._init = function (tgt, num) {
trace.all.initialize(this, tgt + "\u306ESequence");
if (num == null) {
num = 20001;
}
this._tgt = tgt.createEmptyMovieClip("___FOR_USE_SEQUENCE_ENGINE_ONLY__" + num, num);
this._seq = [];
this.onFlag = false;
};
pt.addSequence = function () {
if (typeof(arguments[0]) == "number") {
this._seq.push(arguments);
} else {
var _local3 = 0;
while (_local3 < arguments.length) {
this._seq.push(arguments[_local3]);
_local3++;
}
}
};
pt.execute = function () {
this.addSequence.apply(this, arguments);
if (!this.onFlag) {
this.onFlag = true;
this._countFrame();
}
};
pt._countFrame = function () {
if (this._seq.length <= 0) {
this.onFlag = false;
return(undefined);
}
var item = this._seq.shift();
var framesToWeight = item.shift();
if (framesToWeight == 0) {
if (!this._execute(item)) {
return(undefined);
}
this._countFrame();
} else {
var i = 0;
var o = this;
this._tgt.onEnterFrame = function () {
if ((++i) >= framesToWeight) {
delete this.onEnterFrame;
if (!o._execute(item)) {
return(undefined);
}
o._countFrame();
}
};
}
};
pt._execute = function (item) {
var _local6 = item.shift();
var _local7 = typeof(_local6);
if (_local7 == "undefined") {
this._trace("\u25B2ERROR: 2\u3064\u76EE\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u304Cundefined\u25B2");
for (var _local5 in item) {
trace((_local5 + ":") + item[_local5]);
}
trace("______");
return(false);
}
if (_local7 == "null") {
} else if (_local7 == "function") {
var _local8 = _local6;
var _local9 = item;
_local8.apply(null, _local9);
} else {
var _local4 = _local6;
var _local3 = item.shift();
var _local9 = item;
if (_local3 == undefined) {
this._trace(("\u25B2ERROR: path\u304C\u306A\u3044 \u30E1\u30BD\u30C3\u30C9\u306F" + _local4) + "\u25B2");
return(false);
}
if (_local3[_local4] == undefined) {
this._trace(((("\u25B2ERROR: method '" + _local4) + "'\u304C\u306A\u3044 path\u306F") + _local3) + "\u25B2");
return(false);
}
_local3[_local4].apply(_local3, _local9);
}
return(true);
};
pt.resetSequence = function () {
this.onFlag = false;
this._seq = [];
delete this._tgt.onEnterFrame;
};
delete o;
delete pt;
o = (AsSetupPackage("com.kampei.sound").SoundBgmItem = function () {
this._init.apply(this, arguments);
});
pt = o.prototype;
pt._init = function (linkageName, mcRefer) {
trace.all.initialize(this, "SndBgmItem:" + linkageName);
this._trace((("constructed:" + linkageName) + ":") + mcRefer);
this.owner = mcRefer;
this.bOnPlay = false;
this._linkageName = linkageName;
this._sound = new Sound(this.owner);
this._sound.attachSound(linkageName);
};
pt.start = function (startTime, times) {
this._trace("start");
if (this.bOnPlay) {
return(undefined);
}
this.bOnPlay = true;
this._sound.start(startTime, times);
};
pt.stop = function () {
this.bOnPlay = false;
this._sound.stop(this._linkageName);
};
pt.setVolume = function (vol) {
this._sound.setVolume(vol);
};
pt.getVolume = function () {
return(this._sound.getVolume());
};
delete pt;
delete o;
o = (AsSetupPackage("com.kampei.sound").SoundSeItem = function () {
this._init.apply(this, arguments);
});
pt = o.prototype;
pt._init = function (linkageName, mcRefer) {
trace.all.initialize(this, "SndSeItem:" + linkageName);
this._trace((("constructed:" + linkageName) + ":") + mcRefer);
this.owner = mcRefer;
this._linkageName = linkageName;
this._sound = new Sound(this.owner);
this._sound.attachSound(linkageName);
};
pt.start = function (startTime, times) {
this._trace("start");
this._sound.start(startTime, times);
};
pt.stop = function () {
this._sound.stop(this._linkageName);
};
pt.setVolume = function (vol) {
this._sound.setVolume(vol);
};
pt.getVolume = function () {
return(this._sound.getVolume());
};
delete pt;
delete o;
if (typeof(_global.com.kampei.sound.SoundManagerClass) == "undefined") {
if (AsSetupPackage == undefined) {
trace("\u25B2 AsSetupPackage\u3092include\u3057\u3066\u306D!");
}
o = (AsSetupPackage("com.kampei.sound").SoundManagerClass = function () {
this._init.apply(this, arguments);
});
pt = (o.prototype = new Object());
pt._init = function (baseMc) {
trace.all.initialize(this, "sndMngr");
this._trace("constructed::defaultTtarget object=" + baseMc);
this.obj = baseMc;
this._muted = false;
this.initList();
this.setAutoCreateFlag(false);
};
pt.initList = function () {
this.list = new Object();
this.internalMovieClipDic = new Object();
this.outsideMovieClipDic = new Object();
};
pt.addBgmList = function (list, mcRef) {
this._trace("SoundManagerClass addList");
mcRef = ((mcRef == undefined) ? (this.obj) : (mcRef));
var _local6 = list.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = list[_local2];
var _local4 = mcRef.createEmptyMovieClip("mc" + _local2, _local2);
this.list[_local3] = new com.kampei.sound.SoundBgmItem(_local3, _local4);
this.internalMovieClipDic[this.list[_local3].owner] = _local3;
_local2++;
}
};
pt.addSeList = function (list, mcRef) {
this._trace("SoundManagerClass addList");
mcRef = ((mcRef == undefined) ? (this.obj) : (mcRef));
var _local6 = list.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = list[_local2];
var _local4 = mcRef.createEmptyMovieClip("mc" + _local2, _local2);
this.list[_local3] = new com.kampei.sound.SoundSeItem(_local3, _local4);
this.internalMovieClipDic[this.list[_local3].owner] = _local3;
_local2++;
}
};
pt.addList_ex = function (o, mcRef) {
this._trace("SoundManagerClass addList_ex");
mcRef = ((mcRef == undefined) ? (this.obj) : (mcRef));
var _local3 = -1;
for (var _local7 in o) {
_local3++;
var _local2 = _local7;
var _local4 = o[_local7];
trace(((("SoundObject[\"" + _local2) + "\"].attachSound(\"") + _local4) + "\")");
mcRef.createEmptyMovieClip("mc" + _local3, _local3);
this.list[_local2] = new Sound(mcRef["mc" + _local3]);
this.list[_local2].attachSound(_local4);
this.list[_local2].linkage = _local4;
this.list[_local2].owner = mcRef["mc" + _local3];
this.internalMovieClipDic[this.list[_local2].owner] = _local2;
}
};
pt.setAutoCreateFlag = function (bOn) {
this.autoCreateFlag = bOn;
};
pt.getAutoCreateFlag = function () {
return(this.autoCreateFlag);
};
pt.addBgmSwf = function (mc, str) {
this.list[str] = new Sound(mc);
this.list[str].attachSound(str);
this.list[str].owner = mc;
this.outsideMovieClipDic[this.list[str].owner] = str;
};
pt.clearList = function () {
this.stopAllSound();
for (var _local2 in this.internalMovieClipDic) {
this._trace(("SoundManagerClass " + this.internalMovieClipDic[_local2]) + "\u3092\u524A\u9664");
this.internalMovieClipDic[_local2].removeMovieClip();
}
this.initList();
};
pt.start = function (fileName, startTime, times) {
if ((fileName == undefined) || (fileName == "")) {
this._trace("specify arguments for \"start\" method.");
return(undefined);
}
var _local4 = this.list[fileName];
var _local5 = this.list[fileName].owner;
if (_local4 == undefined) {
if (this.autoCreateFlag) {
this._trace(("SoundManagerClass: \"" + fileName) + "\" autoCreate");
this.addList([filename]);
this.start.apply(this, arguments);
return(undefined);
}
this._trace(("SoundManagerClass: \"" + fileName) + "\" is undefined");
} else {
this._trace(((("SoundManagerClass: Now playing \"" + fileName) + "\" owner \"") + _local5) + "\"");
_local4.start(startTime, times);
}
delete _local4.owner.onEnterFrame;
};
pt.stop = function (fileName) {
var _local2 = this.list[fileName];
if (_local2 == undefined) {
this._trace(("SoundManagerClass: \"" + fileName) + "\" is undefined");
} else {
this._trace(("SoundManagerClass: Stop \"" + fileName) + "\"");
if (typeof(_local2.linkage) != "undefined") {
_local2.stop(_local2.linkage);
} else {
_local2.stop(fileName);
delete _local2.owner.onEnterFrame;
}
}
};
pt.stopAllSound = function () {
for (var _local2 in this.list) {
this.stop(_local2);
}
};
pt.setVolume = function (num) {
var _local4 = this.list.length;
for (var _local3 in this.list) {
this.list[_local3].setVolume(num);
}
};
pt.setVolumeName = function (num, linkageName) {
this._trace("linkageName=" + linkageName);
this._trace("num=" + num);
this.list[linkageName].setVolume(num);
};
pt.fadeIn = function (linkageName, totalMillisec) {
this._trace("fadeIn:" + linkageName);
var soundObj = this.list[linkageName];
if (soundObj.bOnPlay) {
trace("\u3059\u3067\u306B\u30D7\u30EC\u30A4\u4E2D");
soundObj.setVolume(soundObj.getVolume());
var offset = soundObj.getVolume();
} else {
trace("\u307E\u3060\u30D7\u30EC\u30A4\u3057\u3066\u306A\u3044");
soundObj.setVolume(0);
var offset = 0;
}
soundObj.start(0, 100000);
var startMillisec = getTimer();
soundObj.owner.onEnterFrame = function () {
var _local2 = getTimer() - startMillisec;
var _local3 = ((_local2 / totalMillisec) * (100 - offset)) + offset;
soundObj.setVolume(_local3);
if (_local2 > totalMillisec) {
this._trace("fadin complete");
soundObj.setVolume(100);
delete this.onEnterFrame;
}
};
};
pt.fadeOut = function (linkageName, totalMillisec) {
this._trace("fadeOut");
var startMillisec = getTimer();
var soundObj = this.list[linkageName];
if (!soundObj.bOnPlay) {
trace("\u30D7\u30EC\u30A4\u4E2D\u3058\u3083\u306A\u3044\u306E\u3067\u51E6\u7406\u4E2D\u65AD");
return(undefined);
}
trace("\u3059\u3067\u306B\u30D7\u30EC\u30A4\u4E2D");
soundObj.setVolume(soundObj.getVolume());
var offset = soundObj.getVolume();
soundObj.owner.onEnterFrame = function () {
var _local2 = getTimer() - startMillisec;
var _local3 = offset - ((_local2 / totalMillisec) * offset);
soundObj.setVolume(_local3);
if (_local2 > totalMillisec) {
this._trace("fadOut complete");
soundObj.setVolume(100);
soundObj.stop();
delete this.onEnterFrame;
}
};
};
pt.crossFade = function (fileOut, fileIn, totalMillisec, fileInStartTime, fileInLoopTimes) {
this.fadeOut(fileOut, totalMillisec);
this.start(fileIn, fileInStartTime, fileInLoopTimes);
this.fadeIn(fileIn, totalMillisec);
};
pt.setMuted = function (muted) {
var _local4 = this.list.length;
if (muted) {
var _local2 = 0;
} else {
var _local2 = 100;
}
for (var _local3 in this.list) {
this.list[_local3].setVolume(_local2);
}
this._muted = muted;
};
pt.onSoundComplete = function (filename, hndlr, obj) {
this.list[filename].onSoundComplete = obj[hndlr];
};
pt.setSoundCompleteHandler = function (filename, hndlr, obj) {
this.list[filename].soundCompleteHandler = hndlr;
this.list[filename].soundCompleteHandlerObj = obj;
this.list[filename].onSoundComplete = this._onSoundComplete;
};
pt._onSoundComplete = function (o) {
this.soundCompleteHandlerObj[this.soundCompleteHandler]();
};
delete pt;
delete o;
}
trace("SoundManagerClass Loaded");
#endinitclip
Symbol 114 MovieClip Frame 1
this._visible = false;
Symbol 124 MovieClip Frame 1
function show(eventController) {
trace("show:");
this._visible = true;
this._eventController = eventController;
this._seq.execute([0, "startAnt", this], [Math.ceil(Math.random() * 50) + 70, "stopAnt", this], [Math.ceil(Math.random() * 40), "show", this]);
}
function hide() {
this._seq.resetSequence();
this.stopAnt();
this._visible = false;
}
function startAnt() {
trace("startAnt");
this.play();
this.ant_img.play();
}
function stopAnt() {
trace("stopAnt");
this.stop();
this.ant_img.stop();
}
trace.all.initialize(this, this._name);
this._visible = false;
this._seq = new com.kampei.control.Sequence(this, 1);
this.stop();
Symbol 124 MovieClip Frame 225
this.stop();
Symbol 136 MovieClip Frame 1
this.stop();
Symbol 137 MovieClip [pointer] Frame 1
function resetPointer() {
this._x = -100;
this._pointerMode = "";
this.gotoAndStop("nothing");
}
function switchMode(pointerMode) {
trace("switchMode:" + pointerMode);
if (this._pointerMode == pointerMode) {
this.activate();
return(undefined);
}
this._pointerMode = pointerMode;
pointer_img._y = -7;
this.activate();
pointer_img.dynTween({duration:2, _y:0});
}
function activate() {
this.pointer_img.gotoAndStop(this._pointerMode + "_available");
}
function inactivate() {
this.pointer_img.gotoAndStop(this._pointerMode + "_unavailable");
}
resetPointer();
Symbol 142 MovieClip [ariTarget] Frame 1
stop();
this.onPress = function () {
this.startDrag();
};
this.onRelease = (this.onReleaseOutside = function () {
this.stopDrag();
});
this._visible = false;
Symbol 148 MovieClip Frame 1
this.hitArea = terr;
terr._visible = false;
this.useHandCursor = false;
this.onPress = function () {
trace("\u25B2pointer area pressed::this handler should be overwrited.");
};
Symbol 150 MovieClip Frame 1
this._visible = false;
Symbol 152 MovieClip Frame 1
this._visible = false;
Symbol 157 MovieClip Frame 1
function resetHall() {
this._trace("resetHall");
this._seq.resetSequence();
this._visible = false;
}
function show(total, startingDepth, map, ants, brcds, brcdsHdlrNm, goal, eventController) {
_trace("show");
this._visible = true;
this.gotoAndPlay("show");
_global.sManager.start("hall", 0, 1);
var _local21 = this;
var _local5 = [];
var _local3 = 0;
while (_local3 < total) {
var _local4 = {x:0, y:0};
_local21.localToGlobal(_local4);
map.globalToLocal(_local4);
var _local7 = {_x:_local4.x, _y:_local4.y};
var _local6 = _local3 + startingDepth;
var _local8 = map.attachMovie("ant_compe", "ant" + _local6, _local6, _local7);
_local5.push(_local8);
_local3++;
}
_local21 = this;
this._seq.addSequence(15, null);
_local3 = 0;
while (_local3 < total) {
this._seq.addSequence([Math.floor(Math.random() * 10), "init", _local5[_local3], false, brcds, brcdsHdlrNm, eventController], [0, "setGoal", _local5[_local3], goal], [0, "start", _local5[_local3]], [0, "push", ants, _local5[_local3]]);
_local3++;
}
this._seq.execute();
}
this.stop();
this._visible = false;
this._seq = new com.kampei.control.Sequence(this, 1);
trace.all.initialize(this, this._name);
Symbol 157 MovieClip Frame 24
stop();
Symbol 173 MovieClip Frame 1
this._visible = false;
Symbol 175 MovieClip Frame 1
this._visible = false;
Symbol 181 MovieClip Frame 1
function init() {
trace.all.initialize(this, this._name);
this.stop();
this._visible = false;
var o = this;
this.bull_img.bull_hit.addBulledAnts = function (ant) {
this._trace("\u4E2D\u7D99OK:" + ant._name);
o.addBulledAnts(ant);
};
}
function startBull(eventController) {
this._visible = true;
this._eventController = eventController;
this._bulledAnts = [];
this.gotoAndPlay("show");
_global.sManager.start("bulldozer", 0, 100);
_global.sManager.setVolumeName(50, "bulldozer");
_global.sManager.fadeIn("bulldozer", 2000);
}
function onShow() {
this._trace("onShow");
this.stop();
this.bull_img.stop();
_global.sManager.stop("bulldozer");
this._eventController.removeBarricade(this.bull_img.bull_hit);
this._eventController.addBarricade(this.bull_img.bull_hit, "getOutOfBarricade");
for (var _local3 in this._bulledAnts) {
this._bulledAnts[_local3].releaseFromBlade();
}
}
function addBulledAnts(ant) {
this._trace("addBulledAnts:" + ant._name);
this._bulledAnts.push(ant);
}
init();
Symbol 181 MovieClip Frame 82
onShow();
Symbol 190 MovieClip Frame 1
this._visible = false;
Symbol 195 MovieClip Frame 1
function init() {
trace.all.initialize(this, this._name);
this.stop();
this._visible = false;
var o = this;
this.bull_img.bull_hit.addBulledAnts = function (ant) {
this._trace("\u4E2D\u7D99OK:" + ant._name);
o.addBulledAnts(ant);
};
}
function startBull(eventController) {
this._visible = true;
this._eventController = eventController;
this._bulledAnts = [];
this.gotoAndPlay("show");
_global.sManager.start("bulldozer", 0, 100);
_global.sManager.setVolumeName(50, "bulldozer");
_global.sManager.fadeIn("bulldozer", 2000);
}
function onShow() {
this._trace("onShow");
this.stop();
this.bull_img.stop();
_global.sManager.stop("bulldozer");
this._eventController.removeBarricade(this.bull_img.bull_hit);
this._eventController.addBarricade(this.bull_img.bull_hit, "getOutOfBarricade");
for (var _local3 in this._bulledAnts) {
this._bulledAnts[_local3].releaseFromBlade();
}
}
function addBulledAnts(ant) {
this._trace("addBulledAnts:" + ant._name);
this._bulledAnts.push(ant);
}
init();
Symbol 195 MovieClip Frame 82
onShow();
Symbol 199 MovieClip Frame 1
function resetFusen() {
this._visible = false;
this.stop();
}
function show() {
this._visible = true;
this.gotoAndPlay("show");
}
resetFusen();
Symbol 199 MovieClip Frame 17
stop();
Symbol 201 MovieClip Frame 1
this._visible = false;
Symbol 207 MovieClip Frame 1
function init() {
this.stop();
this.bOnEnter = false;
this._seq.resetSequence();
this._timer.resetSequence();
this.gotoAndStop("init");
}
function open() {
if (!this.bOnEnter) {
this._seq.execute(Math.round(Math.random() * 10), "_open", this);
}
this.bOnEnter = true;
this._timer.resetSequence();
this._timer.execute(90, "close", this);
}
function _open() {
this.gotoAndPlay("open");
_global.sManager.start("dooropen", 0, 1);
}
function close() {
_global.sManager.start("doorclose", 0, 1);
this.gotoAndPlay("close");
this.bOnEnter = false;
}
this._seq = new com.kampei.control.Sequence(this, 2);
this._timer = new com.kampei.control.Sequence(this, 1);
init();
Symbol 207 MovieClip Frame 7
stop();
Symbol 207 MovieClip Frame 13
stop();
Symbol 214 MovieClip Frame 1
function init() {
this.stop();
this.bOnEnter = false;
this._seq.resetSequence();
this._timer.resetSequence();
this.gotoAndStop("init");
}
function open() {
if (!this.bOnEnter) {
this._seq.execute(Math.round(Math.random() * 10), "_open", this);
}
this.bOnEnter = true;
this._timer.resetSequence();
this._timer.execute(90, "close", this);
}
function _open() {
this.gotoAndPlay("open");
_global.sManager.start("dooropen", 0, 1);
}
function close() {
_global.sManager.start("doorclose", 0, 1);
this.gotoAndPlay("close");
this.bOnEnter = false;
}
this._seq = new com.kampei.control.Sequence(this, 2);
this._timer = new com.kampei.control.Sequence(this, 1);
init();
Symbol 214 MovieClip Frame 6
stop();
Symbol 214 MovieClip Frame 14
stop();
Symbol 218 MovieClip Frame 1
function init() {
this.stop();
this.bOnEnter = false;
this._seq.resetSequence();
this._timer.resetSequence();
this.gotoAndStop("init");
}
function open() {
if (!this.bOnEnter) {
this._seq.execute(Math.round(Math.random() * 10), "_open", this);
}
this.bOnEnter = true;
this._timer.resetSequence();
this._timer.execute(90, "close", this);
}
function _open() {
this.gotoAndPlay("open");
_global.sManager.start("dooropen", 0, 1);
}
function close() {
_global.sManager.start("doorclose", 0, 1);
this.gotoAndPlay("close");
this.bOnEnter = false;
}
this._seq = new com.kampei.control.Sequence(this, 2);
this._timer = new com.kampei.control.Sequence(this, 1);
init();
Symbol 218 MovieClip Frame 6
stop();
Symbol 218 MovieClip Frame 14
stop();
Symbol 227 MovieClip Frame 1
function init() {
this.stop();
this.bOnEnter = false;
this._seq.resetSequence();
this._timer.resetSequence();
this.gotoAndStop("init");
}
function open() {
if (!this.bOnEnter) {
this._seq.execute(Math.round(Math.random() * 10), "_open", this);
}
this.bOnEnter = true;
this._timer.resetSequence();
this._timer.execute(90, "close", this);
}
function _open() {
this.gotoAndPlay("open");
_global.sManager.start("dooropen", 0, 1);
}
function close() {
_global.sManager.start("doorclose", 0, 1);
this.gotoAndPlay("close");
this.bOnEnter = false;
}
this._seq = new com.kampei.control.Sequence(this, 2);
this._timer = new com.kampei.control.Sequence(this, 1);
init();
Symbol 227 MovieClip Frame 6
stop();
Symbol 227 MovieClip Frame 13
stop();
Symbol 228 MovieClip Frame 1
function init() {
trace.all.initialize(this, this._name);
target_n._visible = (target_s._visible = (target_w._visible = (target_e._visible = (transit_n_1._visible = (transit_n_2._visible = (transit_n_3._visible = (transit_s_1._visible = (transit_s_2._visible = (transit_s_3._visible = (transit_w._visible = (transit_e._visible = (sheet_0._visible = (sheet_1._visible = (sheet_2._visible = (sheet_3._visible = (sheet_4._visible = (sheet_5._visible = (sheet_6._visible = (sheet_7._visible = (sheet_8._visible = (sheet_9._visible = false)))))))))))))))))))));
door_e.init();
door_w.init();
door_s.init();
door_n.init();
ariSpeed = 1.3;
sheets_n = [sheet_0, sheet_1, sheet_2, sheet_3, sheet_4];
sheets_s = [sheet_5, sheet_6, sheet_7, sheet_8, sheet_9];
doors = [{dir:"e", area:this.intrusionDir_e, firstTarget:this.target_e, door:this.door_e}, {dir:"s", area:this.intrusionDir_s, firstTarget:this.target_s, door:this.door_s}, {dir:"w", area:this.intrusionDir_w, firstTarget:this.target_w, door:this.door_w}, {dir:"n", area:this.intrusionDir_n, firstTarget:this.target_n, door:this.door_n}];
this.ants = [];
}
function checkOccupation() {
return((sheets_n.length == 0) && (sheets_s.length == 0));
}
function door2sheet(ari) {
this._trace("door2sheet:" + ari._name);
this.ants.push(ari);
var _local4 = {x:0, y:0};
ari.localToGlobal(_local4);
for (var _local5 in doors) {
if (doors[_local5].area.hitTest(_local4.x, _local4.y, true)) {
var _local3 = doors[_local5];
break;
}
}
if (_local3 == undefined) {
this._trace("\u25B2 error :" + ari._name);
return(false);
}
_local3.door.open();
var _local6 = _local3.dir;
if ((_local6 == "w") || (_local6 == "e")) {
if (sheets_n.length >= sheets_s.length) {
var _local9 = getTransit("n");
var _local7 = getSheet(sheets_n);
var _local8 = "n";
} else {
var _local9 = getTransit("s");
var _local7 = getSheet(sheets_s);
var _local8 = "s";
}
moveAgainstTo(ari, _local3.firstTarget, "moveRoundTo", [ari, _local9, "reMoveTo", [ari, _local7, "onSitDown", [ari, _local8]]]);
} else if (_local6 == "n") {
if (sheets_n.length > 0) {
moveAgainstTo(ari, _local3.firstTarget, "moveRoundTo", [ari, getSheet(sheets_n), "onSitDown", [ari, "n"]]);
} else {
var _local9 = ((Math.random() > 0.5) ? (transit_e) : (transit_w));
moveAgainstTo(ari, _local3.firstTarget, "moveRoundTo", [ari, _local9, "reMoveTo", [ari, getTransit("s"), "reMoveTo", [ari, getSheet(sheets_s), "onSitDown", [ari, "s"]]]]);
}
moveTo(ari, _local7, "onSitDown", [ari, _local6]);
} else if (sheets_s.length > 0) {
moveAgainstTo(ari, _local3.firstTarget, "moveRoundTo", [ari, getSheet(sheets_s), "onSitDown", [ari, "s"]]);
} else {
var _local9 = ((Math.random() > 0.5) ? (transit_e) : (transit_w));
moveAgainstTo(ari, _local3.firstTarget, "reMoveTo", [ari, _local9, "moveRoundTo", [ari, getTransit("n"), "reMoveTo", [ari, getSheet(sheets_n), "onSitDown", [ari, "n"]]]]);
}
return(true);
}
function getSheet(sheets) {
return(sheets.splice(Math.floor(Math.random() * sheets.length), 1)[0]);
}
function getTransit(dir) {
var _local2 = Math.ceil(Math.random() * 3);
return(this[(("transit_" + dir) + "_") + _local2]);
}
function onSitDown(args) {
var _local1 = args[0];
var _local2 = args[1];
_local1.stayAnt();
if (_local2 == "n") {
_local1._yscale = 80;
}
creepy(_local1, _local2);
}
function creepy(ari, sheetPos) {
var _local3 = (Math.random() * 30) - 15;
ari._rotation = ((sheetPos == "n") ? 180 : 0);
ari._rotation = ari._rotation + _local3;
ari._colSeq.execute(Math.ceil(Math.random() * 30), "creepy", this, ari, sheetPos);
}
function reMoveTo(args) {
moveTo(args[0], args[1], args[2], args[3]);
}
function moveTo(ari, tgt, callback, cbArgs) {
ari.walkAnt();
var _local2 = {x:0, y:0};
tgt.localToGlobal(_local2);
var _local3 = {x:0, y:0};
ari.localToGlobal(_local3);
var _local6 = jp.co.bascule.util.Geometry.getAngleBetweenPoints(_local3, _local2);
var _local7 = jp.co.bascule.util.Geometry.getDistance(_local3, _local2);
var _local5 = Math.ceil(_local7 / ariSpeed);
ari._parent.globalToLocal(_local2);
ari._rotation = _local6;
ari.dynTween({duration:_local5, _x:_local2.x, _y:_local2.y, callback:(this + ".") + callback, cbArgs:cbArgs});
}
function moveAgainstTo(ari, tgt, callback, cbArgs) {
ari.walkAnt();
var _local3 = {x:0, y:0};
tgt.localToGlobal(_local3);
var _local4 = {x:0, y:0};
ari.localToGlobal(_local4);
var _local7 = jp.co.bascule.util.Geometry.getAngleBetweenPoints(_local3, _local4);
var _local8 = jp.co.bascule.util.Geometry.getDistance(_local4, _local3);
var _local6 = Math.ceil((_local8 / ariSpeed) / 3);
ari._colSeq.execute(_local6 - 7, "start", _global.sManager, "suikomi", 0, 1);
ari._parent.globalToLocal(_local3);
ari.dynTween({duration:_local6, _x:[_local3.x, "in"], _y:[_local3.y, "in"], _rotation:[_local7, "out"], callback:(this + ".") + callback, cbArgs:cbArgs});
}
function moveRoundTo(args) {
var _local3 = args[0];
var _local6 = args[1];
var _local10 = args[2];
var _local12 = args[3];
_local3.walkAnt();
var _local2 = {x:0, y:0};
_local6.localToGlobal(_local2);
var _local4 = {x:0, y:0};
_local3.localToGlobal(_local4);
var _local8 = jp.co.bascule.util.Geometry.getAngleBetweenPoints(_local4, _local2);
var _local9 = jp.co.bascule.util.Geometry.getDistance(_local4, _local2);
var _local7 = Math.ceil(_local9 / ariSpeed);
_local3._parent.globalToLocal(_local2);
_local3._rotation = _local8;
_local3.dynTween({duration:_local7, _x:_local2.x, _y:_local2.y, callback:(this + ".") + _local10, cbArgs:_local12});
}
function terminate() {
this._trace("terminate");
for (var _local2 in ants) {
ants[_local2].removeMovieClip();
}
}
init();
Symbol 253 MovieClip Frame 1
function show() {
this._visible = true;
this._seq.execute([0, "startAnt", this], [Math.ceil(Math.random() * 10), "stopAnt", this], [Math.ceil(Math.random() * 40), "show", this]);
}
function hide() {
this._visible = false;
this._seq.resetSequence();
this.stopAnt();
}
function startAnt() {
trace("startAnt");
this.ant_img.play();
}
function stopAnt() {
trace("stopAnt");
this.ant_img.stop();
}
this._seq = new com.kampei.control.Sequence(this, 1);
this._visible = false;
stopAnt();
Symbol 257 MovieClip Frame 1
function show() {
this._visible = true;
this._seq.execute([0, "startAnt", this], [Math.ceil(Math.random() * 50) + 50, "stopAnt", this], [Math.ceil(Math.random() * 40), "show", this]);
}
function hide() {
this._seq.resetSequence();
this._visible = false;
this.stopAnt();
}
function startAnt() {
trace("startAnt");
this.play();
this.ant_img.play();
}
function stopAnt() {
trace("stopAnt");
this.stop();
this.ant_img.stop();
}
this._seq = new com.kampei.control.Sequence(this, 1);
this._visible = false;
this.stop();
Symbol 257 MovieClip Frame 391
this.gotoAndPlay(2);
Symbol 260 MovieClip Frame 1
function resetFusen() {
this._visible = false;
}
function show() {
this._visible = true;
}
resetFusen();
Symbol 265 MovieClip Frame 17
stop();
Symbol 266 MovieClip Frame 1
function show() {
this._visible = true;
this.gotoAndPlay("show");
}
function hide() {
this.gotoAndPlay("hide");
}
function onHide() {
this._visible = false;
this.stop();
}
this._visible = false;
this.stop();
Symbol 266 MovieClip Frame 33
stop();
Symbol 266 MovieClip Frame 68
stop();
Symbol 266 MovieClip Frame 109
stop();
Symbol 266 MovieClip Frame 129
onHide();
Symbol 272 MovieClip Frame 1
function show() {
this._alpha = 0;
this._visible = true;
this.dynTween({duration:10, _alpha:100});
}
function hide() {
this.dynTween({duration:10, _alpha:0, callback:this + ".onHide"});
}
function onHide() {
this._visible = false;
}
this._visible = false;
hide();
Symbol 273 MovieClip Frame 1
function show(x, y, barricades) {
this._trace("show:");
var _local2 = this["flag" + this._flagCount];
_local2._x = this._x - x;
_local2._y = this._y - y;
_local2.dynTween({duration:10, _alpha:0, callback:this + ".removeFlag", cbArgs:[_local2]});
this._x = x;
this._y = y;
this.gotoAndStop("show");
this._barricades = barricades;
this.startCollisionDetection();
this._flagCount++;
this.attachMovie("i1", "flag" + this._flagCount, this._flagCount);
}
function removeFlag(arg) {
args[0].removeMovieClip();
}
function onShow() {
this.stop();
}
function hide() {
this._visible = false;
this["flag" + this._flagCount].removeMovieClip();
this.stopCollisionDetection();
}
function getOutOfBarricade(brcd) {
this._trace("getOutOfBarricade");
var _local3 = 0;
var _local8 = 1;
var _local6 = 0;
var _local4 = 2;
var _local7 = 0;
while (true) {
_local3 = _local3 + 90;
this._rotation = _local7 + _local3;
var _local2 = {x:0, y:-_local4};
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = 1;
break;
}
_local2 = {x:0, y:-_local4};
this._rotation = _local7 - _local3;
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = -1;
break;
}
_local6++;
if ((_local6 % 12) == 0) {
_local4 = _local4 + 2;
_local3 = 0;
if (_local6 > 100) {
this._trace("\u25B2 getOutOfBarricadesPos \u969C\u5BB3\u7269\u306E\u5916\u304C\u5206\u304B\u3089\u306A\u3044 \u25B2" + brcd);
break;
}
}
}
this._rotation = 0;
this._parent.globalToLocal(_local2);
this._x = _local2.x;
this._y = _local2.y;
}
function startCollisionDetection() {
this._trace("startCollisionDetection");
var brcd = _barricades;
this.onEnterFrame = function () {
var _local2 = {x:0, y:0};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if ((brcd[_local3]._name != "barricade_goal") && (brcd[_local3].hitTest(_local2.x, _local2.y, true))) {
this.getOutOfBarricade(brcd[_local3]);
}
}
};
}
function stopCollisionDetection() {
delete this.onEnterFrame;
}
trace.all.initialize(this, "flag");
this._seq = new com.kampei.control.Sequence(this, 1);
this.stop();
this._flagCount = 0;
Symbol 279 MovieClip Frame 1
function show(x, y, barricades) {
this._x = x;
this._y = y;
this.gotoAndPlay("show");
this._barricades = barricades;
this.startCollisionDetection();
}
function onShow() {
this.stop();
}
function hide(ant) {
var _local2 = {x:ant._x, y:ant._y};
ant._parent.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this.dynTween({duration:10, _x:[_local2.x], _y:[_local2.y]});
this.gotoAndPlay("hide");
this.stopCollisionDetection();
}
function onHide() {
this.stop();
this._visible = false;
}
function getOutOfBarricade(brcd) {
this._trace("getOutOfBarricade");
var _local3 = 0;
var _local8 = 1;
var _local6 = 0;
var _local4 = 2;
var _local7 = 0;
while (true) {
_local3 = _local3 + 90;
this._rotation = _local7 + _local3;
var _local2 = {x:0, y:-_local4};
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = 1;
break;
}
_local2 = {x:0, y:-_local4};
this._rotation = _local7 - _local3;
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = -1;
break;
}
_local6++;
if ((_local6 % 12) == 0) {
_local4 = _local4 + 2;
_local3 = 0;
if (_local6 > 100) {
this._trace("\u25B2 getOutOfBarricadesPos \u969C\u5BB3\u7269\u306E\u5916\u304C\u5206\u304B\u3089\u306A\u3044 \u25B2" + brcd);
break;
}
}
}
this._rotation = 0;
this._parent.globalToLocal(_local2);
this._x = _local2.x;
this._y = _local2.y;
}
function startCollisionDetection() {
this._trace("startCollisionDetection");
var brcd = _barricades;
this.onEnterFrame = function () {
var _local2 = {x:0, y:0};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
this.getOutOfBarricade(brcd[_local3]);
}
}
};
}
function stopCollisionDetection() {
delete this.onEnterFrame;
}
this.stop();
barricade._visible = false;
Symbol 279 MovieClip Frame 12
onShow();
Symbol 279 MovieClip Frame 28
onHide();
Symbol 283 MovieClip Frame 1
function init() {
trace.all.initialize(this, "parasol");
this._seq = new com.kampei.control.Sequence(this, 1);
ariTarget_1._visible = (ariTarget_2._visible = (barricade._visible = false));
ariSpeed = 1.5;
this.ants = [];
this.stop();
}
function show(x, y, barricades) {
this._trace("show:");
this._x = x;
this._y = y;
this.gotoAndPlay("show");
this._barricades = barricades;
this.startCollisionDetection();
}
function onShow() {
this.stop();
}
function hide() {
this._visible = false;
this.stopCollisionDetection();
}
function getOutOfBarricade(brcd) {
this._trace("getOutOfBarricade");
var _local3 = 0;
var _local8 = 1;
var _local6 = 0;
var _local4 = 2;
var _local7 = 0;
while (true) {
_local3 = _local3 + 90;
this._rotation = _local7 + _local3;
var _local2 = {x:0, y:-_local4};
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = 1;
break;
}
_local2 = {x:0, y:-_local4};
this._rotation = _local7 - _local3;
this.localToGlobal(_local2);
if (!brcd.hitTest(_local2.x, _local2.y, true)) {
_local8 = -1;
break;
}
_local6++;
if ((_local6 % 12) == 0) {
_local4 = _local4 + 2;
_local3 = 0;
if (_local6 > 100) {
this._trace("\u25B2 getOutOfBarricadesPos \u969C\u5BB3\u7269\u306E\u5916\u304C\u5206\u304B\u3089\u306A\u3044 \u25B2" + brcd);
break;
}
}
}
this._rotation = 0;
this._parent.globalToLocal(_local2);
this._x = _local2.x;
this._y = _local2.y;
}
function startCollisionDetection() {
this._trace("startCollisionDetection");
var brcd = _barricades;
this.onEnterFrame = function () {
var _local2 = {x:0, y:0};
this.localToGlobal(_local2);
for (var _local3 in brcd) {
if (brcd[_local3].hitTest(_local2.x, _local2.y, true)) {
if (brcd[_local3] != this) {
this.getOutOfBarricade(brcd[_local3]);
}
}
}
};
}
function stopCollisionDetection() {
delete this.onEnterFrame;
}
function rest(ari) {
this._trace("rest:" + ari._name);
this.ants.push(ari);
var _local3 = {x:0, y:0};
ari.localToGlobal(_local3);
var _local4 = ((Math.random() > 0.5) ? (ariTarget_1) : (ariTarget_2));
moveTo(ari, _local4, "onSitDown", [ari]);
}
function onSitDown(args) {
var _local1 = args[0];
trace("onSitDown:" + _local1._name);
_local1.stayAnt();
var _local2 = 15;
creepy(_local1, _local2);
}
function creepy(ari, restCount) {
this._trace((("creepy " + ari._name) + " restCount:") + restCount);
var _local4 = (Math.random() * 30) - 15;
ari._rotation = ari._rotation + _local4;
if ((restCount--) <= 0) {
ari.start();
} else {
ari._colSeq.execute(Math.ceil(Math.random() * 30), "creepy", this, ari, restCount);
}
}
function reMoveTo(args) {
moveTo(args[0], args[1], args[2], args[3]);
}
function moveTo(ari, tgt, callback, cbArgs) {
ari.walkAnt();
var _local2 = {x:randomNum(15), y:randomNum(15)};
tgt.localToGlobal(_local2);
var _local3 = {x:0, y:0};
ari.localToGlobal(_local3);
var _local6 = jp.co.bascule.util.Geometry.getAngleBetweenPoints(_local3, _local2);
var _local7 = jp.co.bascule.util.Geometry.getDistance(_local3, _local2);
var _local5 = Math.ceil(_local7 / ariSpeed);
ari._parent.globalToLocal(_local2);
ari._rotation = _local6;
ari.dynTween({duration:_local5, _x:_local2.x, _y:_local2.y, callback:(this + ".") + callback, cbArgs:cbArgs});
}
function randomNum(aboutness) {
return(Math.round((Math.random() * aboutness) * 2) - aboutness);
}
init();
Symbol 283 MovieClip Frame 12
onShow();
Symbol 288 MovieClip Frame 1
function init() {
this.stop();
this._visible = false;
}
function startMonitoring(ant) {
this._trace("startMonitoring:" + ant._name);
this.onEnterFrame = function () {
var _local2 = {x:ant._x, y:ant._y};
ant._parent.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this._x = _local2.x;
this._y = _local2.y;
};
this.show();
}
function stopMonitoring() {
this._trace("stopMonitoring");
delete this.onEnterFrame;
this.hide();
}
function show() {
this._visible = true;
this.gotoAndPlay("show");
}
function hide() {
this.gotoAndPlay("hide");
}
function onHide() {
this.stop();
this._visible = false;
}
function startBlink() {
trace("STARTBLINKKKKKKKKKKKKK");
this.gotoAndStop("blink");
}
function stopBlink() {
trace("STIOOOOBLINKKKKKKKKKKKKK");
this.gotoAndStop("stay");
}
trace.all.initialize(this, "me_mark");
init();
Symbol 288 MovieClip Frame 12
stop();
Symbol 288 MovieClip Frame 23
onHide();
Symbol 288 MovieClip Frame 31
this.gotoAndPlay("blink");
Symbol 297 MovieClip Frame 1
this._visible = false;
Symbol 316 MovieClip Frame 1
function init() {
this.useHandCursor = false;
this.stop();
this._disabled = false;
this.enabled = false;
this._visible = false;
}
function show() {
this._visible = true;
this.gotoAndPlay("show");
}
function focused() {
if (this._disabled) {
return(undefined);
}
this.enabled = false;
this.gotoAndStop("focused");
}
function unfocused() {
if (this._disabled) {
return(undefined);
}
this.enabled = true;
this.gotoAndStop("unfocused");
}
function activate() {
this._disabled = false;
this.enabled = true;
this.gotoAndStop("unfocused");
}
function disabled() {
this._disabled = true;
this.enabled = false;
this.gotoAndStop("disabled");
}
function pressed() {
}
this.init();
this.onRollOver = function () {
if (this._disabled) {
return(undefined);
}
this.gotoAndStop("_over");
};
this.onRollOut = function () {
if (!this.enabled) {
return(undefined);
}
this.gotoAndStop("unfocused");
};
Symbol 316 MovieClip Frame 20
stop();
Symbol 328 MovieClip Frame 1
function init() {
this.useHandCursor = false;
this.stop();
this._disabled = false;
this.enabled = false;
this._visible = false;
}
function show() {
this._visible = true;
this.gotoAndPlay("show");
}
function focused() {
if (this._disabled) {
return(undefined);
}
this.enabled = false;
this.gotoAndStop("focused");
}
function unfocused() {
if (this._disabled) {
return(undefined);
}
this.enabled = true;
this.gotoAndStop("unfocused");
}
function activate() {
this._disabled = false;
this.enabled = true;
this.gotoAndStop("unfocused");
}
function disabled() {
this._disabled = true;
this.enabled = false;
this.gotoAndStop("disabled");
}
function pressed() {
}
this.init();
this.onRollOver = function () {
if (this._disabled) {
return(undefined);
}
this.gotoAndStop("_over");
};
this.onRollOut = function () {
if (!this.enabled) {
return(undefined);
}
this.gotoAndStop("unfocused");
};
Symbol 328 MovieClip Frame 19
stop();
Symbol 339 MovieClip Frame 1
function init() {
this.useHandCursor = false;
this.stop();
this._disabled = false;
this.enabled = false;
this._visible = false;
}
function show() {
this._visible = true;
this.gotoAndPlay("show");
}
function focused() {
if (this._disabled) {
return(undefined);
}
this.enabled = false;
this.gotoAndStop("focused");
}
function unfocused() {
if (this._disabled) {
return(undefined);
}
this.enabled = true;
this.gotoAndStop("unfocused");
}
function activate() {
this._disabled = false;
this.enabled = true;
this.gotoAndStop("unfocused");
}
function disabled() {
this._disabled = true;
this.enabled = false;
this.gotoAndStop("disabled");
}
function pressed() {
}
this.init();
this.onRollOver = function () {
if (this._disabled) {
return(undefined);
}
this.gotoAndStop("_over");
};
this.onRollOut = function () {
if (!this.enabled) {
return(undefined);
}
this.gotoAndStop("unfocused");
};
Symbol 339 MovieClip Frame 20
stop();
Symbol 344 MovieClip Frame 1
this._visible = false;
Symbol 348 MovieClip Frame 1
Symbol 362 MovieClip Frame 1
function show(label, callback, path) {
this._trace((((("show:" + label) + ":") + callback) + ":") + path);
this._label = label;
this._visible = true;
this.gotoAndPlay(label);
if (callback == undefined) {
delete this.onPress;
} else {
this.onPress = function () {
path[callback]();
};
}
}
function hide() {
this._trace("hide:" + this._label);
this.gotoAndPlay("hide_" + this._label);
}
function onHide() {
this.stop();
this._visible = false;
}
this.stop();
this._visible = false;
this._label = "";
trace.all.initialize(this, "message");
Symbol 362 MovieClip Frame 29
stop();
Symbol 362 MovieClip Frame 56
stop();
Symbol 362 MovieClip Frame 65
start_btn.onRelease = function () {
this._parent._parent.onClickStart();
};
Symbol 362 MovieClip Frame 72
stop();
Symbol 362 MovieClip Frame 81
stop();
Symbol 362 MovieClip Frame 102
stop();
Symbol 362 MovieClip Frame 116
onHide();
Symbol 362 MovieClip Frame 131
stop();
Symbol 362 MovieClip Frame 144
onHide();
Symbol 363 MovieClip [__Packages.jp.co.bascule.util.Geometry] Frame 0
class jp.co.bascule.util.Geometry
{
function Geometry () {
}
static function getAngleBetweenPoints(a, b) {
var _local3 = a.x - b.x;
var _local2 = a.y - b.y;
var _local1 = (((Math.atan2(_local2, _local3) / Math.PI) * 180) - 90) % 360;
if (_local1 < 0) {
_local1 = _local1 + 360;
}
return(_local1);
}
static function getDistance(a, b) {
return(Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)));
}
}