Frame 1
_root.reserved.swapDepths(-2);
_root.focusManager.swapDepths(-1);
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
this.menu = my_cm;
MochiAd.showPreloaderAd({id:"6df0cadba5b56269", res:"600x550"});
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndStop ("loading");
}
Instance of Symbol 37 MovieClip in Frame 4
//component parameters
onClipEvent (construct) {
_game_name = "castle_draw";
score_var = "_root.score";
}
Frame 5
stop();
Frame 7
function initLoad() {
sDifficulty = "NORMAL";
_quality = "HIGH";
_global.stageW = 600;
_global.stageH = 500;
bNoted = false;
bFirst = true;
}
function loadSD() {
for (var _local8 in aSDType) {
var _local3 = _root[aSDType[_local8]];
var _local7 = _local3.length;
var _local2 = 0;
while (_local2 < _local7) {
var _local4 = _local3[_local2];
var _local5 = _local4 + "mc";
var _local6 = newMc(_root, _local5);
_root[_local3[_local2]] = new Sound(_local6);
_root[_local3[_local2]].attachSound(_local4);
if (_local3 == aMusic) {
_root[_local3[_local2]].setVolume(aMuscVol[_local2]);
_root[_local3[_local2]].start(0, 999);
} else if (_local3 == aSound) {
_root[_local3[_local2]].setVolume(aSoundVol[_local2]);
}
_local2++;
}
}
}
function initMusic() {
var _local4 = aMusic.length;
var _local2 = 0;
while (_local2 < _local4) {
if (bMusicOn) {
var _local3 = aMuscVol[_local2];
} else {
var _local3 = 0;
}
_root[aMusic[_local2]].setVolume(_local3);
_local2++;
}
}
function initSD() {
var _local4 = aSound.length;
var _local2 = 0;
while (_local2 < _local4) {
if (bSoundOn) {
var _local3 = aSoundVol[_local2];
} else {
var _local3 = 0;
}
_root[aSound[_local2]].setVolume(_local3);
_local2++;
}
}
new global.GlobalFun();
initLoad();
var aSDType = new Array("aMusic", "aSound");
var aMusic = new Array("mainMusic");
var aSound = new Array("sdStone", "sdLaser", "sdFist", "sdScream");
var aMuscVol = new Array();
aMuscVol.push(20);
var aSoundVol = new Array(20, 50, 30, 40);
var bMusicOn = true;
var bSoundOn = true;
var musicHolder = newMc(_root, "musicHolder");
var sdHolder = newMc(_root, "sdHolder");
loadSD();
initSD();
turnTo("main_menu");
Frame 19
function clearScene() {
clearInterval(mcLevel.enemyInter);
var _local3 = new Array("mcLevel", "mcLayout", "mcMenu", "mcPause", "mcPass", "mcOver", "mcEnd", "headAnim", "roleDrop");
for (var _local4 in _local3) {
var _local2 = _root[_local3[_local4]];
kill(_local2);
}
}
function initScene() {
Mouse.show();
nLevel = 1;
aAimNum = new Array();
aAimNum.push(20);
aAimNum.push(20);
aAimNum.push(25);
aAimNum.push(25);
aAimNum.push(25);
aAimNum.push(25);
aAimNum.push(25);
aAimNum.push(25);
aAimNum.push(30);
aAimNum.push(30);
aAimNum.push(30);
aAimNum.push(30);
aAimNum.push(30);
aAimNum.push(30);
aAimNum.push(30);
aAimNum.push(40);
aAimNum.push(50);
aAimNum.push(60);
aAimNum.push(70);
aAimNum.push(80);
maxDotNum = 25;
power = 1;
maxPower = 6;
levelScore = 0;
score = 0;
money = 0;
maxBlood = 100;
blood = maxBlood;
maxEnergy = 40;
energy = maxEnergy;
man1Blood = 5;
man2Blood = 8;
arrowBlood = 10;
spiderBlood = 12;
killScore = 50;
killMoney = 10;
dScore = 2;
pu1Money = 200;
pu2Money = 300;
pu3Money = 100;
pu4Money = 600;
pu5Money = 200;
helperNum = 0;
}
function loadSceneMask() {
kill(sceneMasker);
newMasker();
}
function gameStart() {
turnTo("howToPlay");
}
stop();
clearScene();
initScene();
loadSceneMask();
btPlay.onPress = function () {
gameStart();
};
btInstructions.onPress = function () {
turnTo("instructions");
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btSetting.onPress = function () {
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Instance of Symbol 2 MovieClip in Frame 19
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Frame 32
stop();
Frame 46
function activeGame() {
bStart = true;
bPause = false;
}
function pauseGame() {
bStart = false;
bPause = true;
}
function tryAgain() {
turnTo("init_game");
initScene();
score = 0;
money = 0;
blood = maxBlood;
energy = maxEnergy;
}
function continueGame() {
turnTo("init_game");
score = score * 0.7;
money = money * 0.7;
score = floor(score);
money = floor(money);
blood = maxBlood;
energy = maxEnergy;
}
function nextLevel() {
turnTo("init_game");
if (nLevel < 20) {
nLevel = nLevel + 1;
}
blood = maxBlood;
energy = maxEnergy;
}
clearScene();
initGame();
bStart = false;
bPause = true;
bPass = false;
bOver = false;
bEnd = false;
bAllowMenu = false;
usedTime = 0;
prevTime = 0;
usedTime = 0;
levelScore = 0;
aimNum = aAimNum[nLevel - 1];
killNum = 0;
initGame();
turnTo("game_scene");
Frame 60
function loadLevel() {
atMc(this, "mcLevel", "mcLevel");
atMc(this, "mcLayout");
loadSceneMask();
}
function dcOver() {
if (bPass) {
return(undefined);
}
if (blood == 0) {
bOver = true;
}
if (bOver) {
aEnemy = mcLevel.aEnemy;
for (var _local3 in aEnemy) {
aEnemy[_local3].body.stop();
}
_root.bAllowMenu = false;
atMc(this, "mcOver");
delete onEnterFrame;
}
}
function dcPass() {
if (bOver) {
return(undefined);
}
if (killNum == aimNum) {
bPass = true;
}
if (bPass) {
if (nLevel == 20) {
_root.bAllowMenu = false;
atMc(this, "mcEnd");
delete onEnterFrame;
} else {
_root.bAllowMenu = false;
atMc(this, "mcPass");
delete onEnterFrame;
}
}
}
function dcPause() {
if (!bStart) {
return(undefined);
}
bPause = !bPause;
if (bPause) {
_root.bAllowMenu = false;
kill(mcPause);
atMc(this, "mcPause");
} else {
_root.bAllowMenu = true;
kill(mcPause);
}
}
function disScore() {
if (levelScore < 0) {
levelScore = 0;
}
if (score < 0) {
score = 0;
}
}
function gameTime() {
if (bPause) {
prevTime = getTimer();
return(undefined);
}
if (!bStart) {
return(undefined);
}
if (bPause) {
return(undefined);
}
if (bOver) {
return(undefined);
}
if (bEnd) {
return(undefined);
}
newTime = getTimer();
if (!prevTime) {
prevTime = newTime;
}
usedTime = usedTime + (newTime - prevTime);
prevTime = getTimer();
passMin = Math.floor((usedTime / 1000) / 60);
passSec = Math.floor((usedTime / 1000) % 60);
nTime = (passMin + " : ") + passSec;
}
function onEnterFrame() {
disScore();
dcOver();
dcPass();
}
stop();
clearScene();
loadLevel();
var myLis = new Object();
bKeyDown = false;
myLis.onKeyDown = function () {
if (bKeyDown) {
return(undefined);
}
if (Key.isDown(80)) {
dcPause();
}
};
myLis.onKeyUp = function () {
bKeyDown = false;
};
Key.addListener(myLis);
Frame 75
stop();
Instance of Symbol 2 MovieClip in Frame 75
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Instance of Symbol 2 MovieClip in Frame 90
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 5 MovieClip Frame 1
onEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local5 = int((_local4 / _local3) * 100);
num_txt.text = _local5 + "%";
if (_local4 == _local3) {
delete this.onEnterFrame;
if ((_root._mochiad instanceof MovieClip) != true) {
_root.play();
}
}
};
Symbol 9 MovieClip Frame 1
this._visible = false;
Symbol 9 MovieClip Frame 2
this._visible = true;
Symbol 9 MovieClip Frame 39
stop();
Instance of Symbol 2 MovieClip in Symbol 9 MovieClip Frame 39
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 1401 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 1402 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClip
{
var THIS, LEVEL, role, g, blood, aFun, bRun, bDie, minSize, dBlood, bloodRate, sType, nColor, v, upv, dir, _xscale, aimx, rand, gotoAndStop, onEnterFrame, bSwoon, _x, killArrayElem, bAttack, _y, kill, atMc2, aim, intRand, abs, currBall, hitA, body, swoon;
function Enemy () {
super();
_global.initGlobalFun(this);
THIS = this;
LEVEL = _root.mcLevel;
role = LEVEL.role;
g = 0.9;
blood = 100;
aFun = new Array("dcBall");
bRun = true;
bDie = false;
minSize = 16.5 + (_root.nLevel * 1.2);
dBlood = 100 - (_root.nLevel * 1.2);
bloodRate = minSize;
initFrame();
}
function initType(_type, act, _c) {
sType = _type;
nColor = _c;
switch (_type) {
case "man1" :
v = 2.6;
upv = 2;
break;
case "man2" :
v = 2.2;
upv = 1.6;
break;
case "bowman" :
v = 2.2;
break;
case "spider" :
v = 3.5;
upv = 3.5;
}
aFun.push(act);
}
function getType() {
return(sType);
}
function initDir(_dir) {
dir = _dir;
_xscale = (-dir) * 100;
v = v * _dir;
if (sType == "bowman") {
aimx = ((dir == 1) ? 0 : 600) + (dir * (100 + rand(100)));
} else {
aimx = ((dir == 1) ? 0 : 600) + (dir * (100 + rand(300)));
}
}
function changeAct(_act) {
gotoAndStop(_act);
}
function initFrame() {
onEnterFrame = function () {
if (_root.bPause) {
return(undefined);
}
this.funManage(this, [this.aFun]);
};
}
function mv() {
if (bSwoon) {
return(undefined);
}
_x = _x + v;
if (dir == 1) {
if (_x > aimx) {
if (sType == "bowman") {
stShoot();
} else {
stClimb();
}
}
} else if (_x < aimx) {
if (sType == "bowman") {
stShoot();
} else {
stClimb();
}
}
}
function stClimb() {
changeAct("climb");
killArrayElem(aFun, "mv");
aFun.push("climbing");
bRun = false;
}
function stShoot() {
changeAct("shoot");
killArrayElem(aFun, "mv");
aFun.push("");
bAttack = true;
bRun = false;
}
function climbing() {
if (bSwoon) {
return(undefined);
}
_y = _y - upv;
var _local2 = LEVEL.role._x - _x;
if (_y < 180) {
_y = 190;
stMvToRole();
}
}
function stMvToRole() {
clone(_x, _y, sType, dir);
killAE();
kill(this);
}
function clone(x, y, _type, _dir) {
var _local2 = atMc2(LEVEL.mcEnemy, _type + nColor);
_local2._x = x;
_local2._y = y;
dir = _dir;
_local2._xscale = dir * -100;
_local2.initType(_type, "attack", nColor);
LEVEL.addEnemyA(_local2);
}
function attack() {
if (bSwoon) {
return(undefined);
}
if (!aim) {
var _local3 = LEVEL.aHelper;
var _local6 = new Array();
var _local5 = false;
var _local4 = 0;
for (var _local7 in _local3) {
var _local2 = _local3[_local7];
if (!_local2.killed) {
_local5 = true;
_local6.push(_local2);
_local4 = _local4 + 1;
}
}
if (_local5) {
aim = _local6[intRand(_local4)];
aim.killed = true;
} else {
aim = role;
}
}
var _local10 = aim._x;
var _local8 = _local10 - _x;
var _local9 = abs(_local8);
dir = _local8 / _local9;
_xscale = dir * -100;
if (_local9 > 30) {
_x = _x + (dir * v);
changeAct("run");
} else {
changeAct("attack");
}
}
function hitAim() {
if (_root.bPause) {
return(undefined);
}
var _local3 = _root[sType + "Blood"] + ((nColor - 1) * 3);
aim.lossBlood(this, _local3);
}
function initAim() {
aim = null;
}
function dcBall() {
if (bDie) {
return(undefined);
}
var _local6 = LEVEL.mcDraw.aBall;
for (var _local7 in _local6) {
var _local3 = LEVEL.mcDraw[_local6[_local7]];
if (_local3 == currBall) {
continue;
}
var _local5 = _local3.hitTest(hitA);
if (_local5) {
_root.sdStone.start();
currBall = _local3;
var _local4 = _local3.size;
if (_local4 > minSize) {
die();
} else {
blood = blood - ((dBlood * _local4) / bloodRate);
blood = blood - (_root.power * 6);
if (blood <= 0) {
die();
} else {
stSwoon();
}
}
}
}
dcRoleDie();
}
function getBlood() {
return(blood);
}
function dcRoleDie() {
if (_root.bOver) {
if (this == LEVEL.killer) {
changeAct("kill");
aFun = null;
} else {
aFun = null;
if (bRun) {
changeAct("run");
} else {
changeAct("climb");
}
body.stop();
}
}
}
function stSwoon() {
if (bDie) {
return(undefined);
}
swoon.gotoAndPlay(2);
body.stop();
bSwoon = true;
if (!bRun) {
if (!bAttack) {
_y = _y + 10;
if (_y > 523) {
_y = 523;
}
}
} else {
changeAct("swoon");
}
}
function stopSwoon() {
if (bDie) {
return(undefined);
}
body.play();
bSwoon = false;
if (bRun) {
changeAct("run");
} else if (bAttack) {
changeAct("attack");
}
}
function addScore() {
_root.score = _root.score + _root.killScore;
_root.levelScore = _root.levelScore + _root.killScore;
_root.money = _root.money + _root.killMoney;
_root.killNum = _root.killNum + 1;
}
function killAE() {
LEVEL.killEnemyA(this);
}
function die() {
if (bDie) {
return(undefined);
}
if (aim) {
aim.killed = false;
}
if (sType == "bowman") {
changeAct("runDie");
LEVEL.nBownam = LEVEL.nBownam - 1;
} else if (bRun) {
changeAct("runDie");
} else {
changeAct("climbDie");
}
bDie = true;
aFun = null;
killAE();
addScore();
}
}
Symbol 1403 MovieClip [__Packages.RoleDrop] Frame 0
class RoleDrop extends MovieClip
{
var THIS, LEVEL, aFun, v, g, bound, onEnterFrame, _y, gotoAndStop;
function RoleDrop () {
super();
_global.initGlobalFun(this);
THIS = this;
LEVEL = _root.mcLevel;
aFun = new Array("mv");
v = 0;
g = 0.6;
bound = 530;
initFrame();
}
function initFrame() {
onEnterFrame = function () {
this.funManage(this, [this.aFun]);
};
}
function mv() {
v = v + g;
_y = _y + v;
if (_y > bound) {
_y = bound;
gotoAndStop("die");
aFun = null;
delete eval (onEnterFrame());
}
}
}
Symbol 1404 MovieClip [__Packages.Ball] Frame 0
class Ball extends MovieClip
{
var THIS, LEVEL, v, g, aLine, aFun, aPoint, onEnterFrame, _y, _parent, _name, kill, _alpha;
function Ball () {
super();
_global.initGlobalFun(this);
THIS = this;
LEVEL = _root.mcLevel;
v = 0;
g = 0.9;
aLine = new Array();
aFun = new Array("mv", "remove");
aPoint = new Array();
}
function addLine(_elem) {
aLine.push(_elem);
}
function addPoint(x, y) {
aPoint.push([x, y]);
}
function getLineA() {
return(aLine);
}
function getPointA() {
return(aPoint);
}
function initFrame() {
onEnterFrame = function () {
if (_root.bPause) {
return(undefined);
}
for (var _local3 in this.aFun) {
this[this.aFun[_local3]]();
}
};
}
function mv() {
v = v + g;
_y = _y + v;
}
function remove() {
if (_y > 500) {
_global.killArrayElem(_parent.aBall, _name);
kill(this);
}
}
function stDisapear() {
aFun.push("disapear");
_global.killArrayElem(aFun, "mv");
}
function disapear() {
_alpha = _alpha - 10;
if (_alpha < 30) {
kill(this);
}
}
}
Symbol 1405 MovieClip [__Packages.Helper] Frame 0
class Helper extends MovieClip
{
var THIS, LEVEL, aFun, v, LB, RB, blood, bDie, intRand, aimx, aimType, gotoAndStop, onEnterFrame, _x, killArrayElem, _y, kill;
function Helper () {
super();
_global.initGlobalFun(this);
THIS = this;
LEVEL = _root.mcLevel;
aFun = new Array("mv");
v = 2;
LB = 150;
RB = 500;
blood = 100;
bDie = false;
initAimCoord();
initFrame();
}
function initAimCoord() {
var _local2 = LEVEL.aHelperCoord;
var _local4 = _local2.length;
var _local3 = intRand(_local4);
aimx = _local2[_local3][0];
aimType = _local2[_local3][1];
_local2.splice(_local3, 1);
}
function changeAct(_act) {
gotoAndStop(_act);
}
function initFrame() {
onEnterFrame = function () {
this.funManage(this, [this.aFun]);
};
}
function mv() {
_x = _x - v;
if (aimType == 1) {
if (_x < aimx) {
_x = aimx;
killArrayElem(aFun, "mv");
changeAct("throw");
}
} else {
if (_x < aimx) {
_x = aimx;
}
if (_x == aimx) {
if (_y > 162) {
_y = _y - v;
} else {
_y = 162;
killArrayElem(aFun, "mv");
changeAct("throw");
}
}
}
}
function lossBlood(killer) {
if (bDie) {
return(undefined);
}
blood = blood - 40;
if (blood < 0) {
killer.initAim();
die();
}
}
function die() {
bDie = true;
_root.helperNum = _root.helperNum - 1;
killArrayElem(LEVEL.aHelper, this);
LEVEL.aHelperCoord.push([aimx, aimType]);
drop();
kill(this);
}
function drop() {
var _local3 = _global.atMc2(LEVEL, "helperDrop");
_local3._x = _x;
_local3._y = _y;
}
}
Symbol 1406 MovieClip [__Packages.Role] Frame 0
class Role extends MovieClip
{
var THIS, LEVEL, aFun, v, LB, RB, onEnterFrame, _x, _y, abs, gotoAndStop, classRo2, _xmouse, _ymouse, stick, bDie, kill;
function Role () {
super();
_global.initGlobalFun(this);
THIS = this;
LEVEL = _root.mcLevel;
aFun = new Array("mv", "stickRo", "bloodManage");
v = 5;
LB = 150;
RB = 500;
initFrame();
}
function initFrame() {
onEnterFrame = function () {
if (_root.bPause) {
return(undefined);
}
this.funManage(this, [this.aFun]);
};
}
function mv() {
var _local4 = _x;
var _local6 = _y;
var _local3 = LEVEL._xmouse;
var _local5 = LEVEL._ymouse;
var _local2 = _local3 - _local4;
if (abs(_local2) > 80) {
if (_local2 < 0) {
if (_x > LB) {
_x = _x - v;
gotoAndStop("move");
}
} else {
if (_x < RB) {
_x = _x + v;
}
gotoAndStop("move");
}
} else {
gotoAndStop("stand");
}
}
function stickRo() {
classRo2(_xmouse, _ymouse, stick, 0);
}
function lossBlood(killer, n) {
_root.blood = _root.blood - n;
lossScore(n);
if (_root.blood <= 0) {
_root.blood = 0;
LEVEL.killer = killer;
killer.swapDepths(LEVEL.role);
die();
}
}
function lossScore(n) {
_root.score = _root.score - (_root.dScore * n);
_root.levelScore = _root.levelScore - (_root.dScore * n);
_root.disScore();
}
function bloodManage() {
var _local2 = _root.mcLayout.mcBar.blood.bar;
_local2._xscale = (_root.blood / _root.maxBlood) * 100;
}
function addBlood() {
if (_root.money >= _root.pu3Money) {
_root.money = _root.money - _root.pu3Money;
_root.blood = _root.blood + 50;
if (_root.blood > _root.maxBlood) {
_root.blood = _root.maxBlood;
}
bloodManage();
}
}
function die() {
if (bDie) {
return(undefined);
}
if (_root.bPass) {
return(undefined);
}
bDie = true;
var _local7 = _root.mcLayout.mcBar.blood.bar;
_local7._xscale = 0;
var _local4 = true;
var _local6 = LEVEL.killer.getType();
if (_local6 == "man1") {
_local4 = false;
}
if (_local6 == "man2") {
_local4 = false;
}
if (_local4) {
var _local5 = _global.atMc(_root, "roleDrop");
_local5._x = _x;
_local5._y = _y;
_root.sdScream.start();
}
kill(this);
}
}
Symbol 1407 MovieClip [__Packages.Draw] Frame 0
class Draw extends MovieClip
{
var glow, glow2, bevel, THIS, LEVEL, mcLight, newMc, atMc, kill, maxDotNum, unitLen, nEnergy, nBall, maxBallNum, lightInter, aBall, aFun, aColor, onEnterFrame, bDrawing, dotNum, _xmouse, _ymouse, currMc, prevX, prevY, currX, currY, getDis, getAng, floor, atMc2, cosD, sinD, intRand, getL3, rand, getCoordG2, killArrayElem, lightKillInter, aKill;
function Draw () {
super();
_global.initGlobalFun(this);
glow = new flash.filters.GlowFilter(16777215, 0.5, 10, 10, 2, 3);
glow2 = new flash.filters.GradientGlowFilter(0, 45, [16777215, 6684927], [0, 1], [0, 255], 10, 10, 2, 3, "outer");
bevel = new flash.filters.BevelFilter(4, 45, 16777215, 0.8, 0, 0.8, 10, 10, 2, 3);
THIS = this;
LEVEL = _root.mcLevel;
mcLight = newMc(this, "mcLight");
var _local6 = 1;
while (_local6 <= 5) {
var _local5 = atMc(this, "mcTexture" + _local6);
this["bmpImg" + _local6] = new flash.display.BitmapData(_local5._width, _local5._height);
this["bmpImg" + _local6].draw(_local5);
kill(_local5);
_local6++;
}
maxDotNum = _root.maxDotNum;
unitLen = 15;
nEnergy = 100;
nBall = 0;
maxBallNum = 20;
lightInter = 0;
aBall = new Array();
aFun = new Array("energyManage");
aColor = new Array(16777215, 16737792, 6736896, 39423, 6711039, 16738047);
initFrame();
}
function initFrame() {
onEnterFrame = function () {
if (_root.bPause) {
return(undefined);
}
if (_root.bOver) {
this.kill(this);
return(undefined);
}
this.funManage(this, [this.aFun]);
};
}
function addBall(ball) {
aBall.push(ball);
}
function onMouseDown() {
if (_root.bOver) {
return(undefined);
}
if (_root.energy == 0) {
return(undefined);
}
if (_root.bPause) {
return(undefined);
}
bDrawing = true;
_root.sdLaser.start();
dotNum = 0;
if (nBall > maxBallNum) {
nBall = 0;
}
nBall = nBall + 1;
var _local3 = atMc(this, "ball", "b" + nBall);
_local3._x = _xmouse;
_local3._y = _ymouse;
addBall(_local3._name);
currMc = _local3;
prevX = currMc._xmouse;
prevY = currMc._ymouse;
stDrawLight();
}
function onMouseUp() {
_root.sdLaser.stop();
bDrawing = false;
currMc.initFrame();
dcClose();
stopDrawLight();
}
function onMouseMove() {
if (_root.energy == 0) {
return(undefined);
}
if (_root.bPause) {
return(undefined);
}
if (_root.bOver) {
return(undefined);
}
if (_root._ymouse > 200) {
LEVEL.showMouse();
return(undefined);
}
LEVEL.hideMouse();
if (!bDrawing) {
return(undefined);
}
if (dotNum > maxDotNum) {
bDrawing = false;
return(undefined);
}
currX = currMc._xmouse;
currY = currMc._ymouse;
var _local7 = getDis(prevX, prevY, currX, currY);
var _local4 = getAng(prevX, prevY, currX, currY);
var _local6 = floor(_local7 / unitLen);
if (_local6 > 0) {
var _local5 = 0;
while (_local5 < _local6) {
var _local3 = atMc2(mcLight, "line");
_local3._x = prevX;
_local3._y = prevY;
_local3._rotation = _local4;
_local3._visible = false;
dotNum = dotNum + 1;
currMc.addLine(_local3);
currMc.addPoint(prevX, prevY);
prevX = prevX + (unitLen * cosD(_local4));
prevY = prevY + (unitLen * sinD(_local4));
lossEnergy();
_local5++;
if (dotNum > maxDotNum) {
break;
}
if (_root.energy < 1) {
return(undefined);
}
}
}
}
function dcClose() {
var _local6 = currMc.getLineA();
var _local9 = _local6.length;
var _local5 = 0;
var _local17 = false;
var _local16 = null;
var _local15 = null;
while (_local5 < _local9) {
var _local7 = _local6[_local5];
var _local11 = _local6[_local5 - 1];
var _local12 = _local6[_local5 + 1];
var _local4 = 0;
while (_local4 < _local9) {
var _local3 = _local6[_local4];
var _local2 = true;
if (_local3 == _local7) {
_local2 = false;
}
if (_local3 == _local11) {
_local2 = false;
}
if (_local3 == _local12) {
_local2 = false;
}
if (_local2) {
var _local8 = _local3.hitTest(_local7);
if (_local8) {
_local16 = _local4;
_local15 = _local5;
_local17 = true;
break;
}
}
_local4++;
}
_local5++;
}
if (_local17) {
var _local13 = 0;
while (_local13 < _local9) {
kill(_local6[_local13]);
_local13++;
}
var _local24 = 0;
var _local21 = _local16 + 1;
var _local23 = _local15 - _local21;
var _local22 = (_local9 - _local15) + 1;
var _local14 = currMc.getPointA();
_local14.splice(_local24, _local21);
_local14.splice(_local23, _local22);
var _local10 = 0;
var _local20 = _local14.length;
var _local19 = _local14[0][0];
var _local18 = _local14[0][1];
var _local25 = intRand(aColor.length);
currMc.lineStyle(0, 0, 0);
currMc.moveTo(_local19, _local18);
currMc.beginBitmapFill(this["bmpImg" + (intRand(5) + 1)], new flash.geom.Matrix(1, 0, 0, 1), true, true);
while (_local10 < _local20) {
_local19 = _local14[_local10][0];
_local18 = _local14[_local10][1];
currMc.lineTo(_local19, _local18);
_local10++;
}
currMc.endFill();
currMc.filters = [bevel];
currMc.cacheAsBitmap = true;
currMc.size = _local20;
} else {
currMc.stDisapear();
}
}
function randLine(_mc, x1, y1, x2, y2, d) {
var _local6 = _mc;
var _local8 = x2 - x1;
var _local7 = y2 - y1;
var _local12 = getL3(_local8, _local7);
var _local9 = floor(_local12 / d);
_local8 = _local8 / _local9;
_local7 = _local7 / _local9;
_local6.moveTo(x1, y1);
_local6.lineStyle(1, 16777215);
var _local2 = 1;
while (_local2 < _local9) {
var _local4 = (x1 + (_local8 * _local2)) + ((rand() - 0.5) * d);
var _local3 = (y1 + (_local7 * _local2)) + ((rand() - 0.5) * d);
_local6.lineTo(_local4, _local3);
_local2++;
}
_local6.lineTo(x2, y2);
}
function randLine2() {
var _local5 = currMc.getPointA();
var _local2 = 0;
var _local11 = _local5.length;
var _local10 = currMc._x;
var _local9 = currMc._y;
var _local7 = _local5[0][0] + _local10;
var _local6 = _local5[0][1] + _local9;
var _local8 = mcLight;
_local8.moveTo(_local7, _local6);
while (_local2 < _local11) {
_local7 = _local5[_local2][0] + _local10;
_local6 = _local5[_local2][1] + _local9;
var _local4 = _local7 + ((rand() - 0.5) * 10);
var _local3 = _local6 + ((rand() - 0.5) * 10);
_local8.lineTo(_local4, _local3);
_local2++;
}
}
function stDrawLight() {
aFun.push("drawLight");
}
function drawLight() {
var _local5 = mcLight;
_local5.clear();
var _local4 = LEVEL.role.stick.p;
var _local3 = _local4._x;
var _local2 = _local4._y;
if (!_local4) {
return(undefined);
}
var _local7 = getCoordG2(_local4, _local3, _local2);
_local3 = _local7.x;
_local2 = _local7.y;
var _local8 = _xmouse;
var _local6 = _ymouse;
randLine(_local5, _local3, _local2, _local8, _local6, 5);
randLine(_local5, _local3, _local2, _local8, _local6, 15);
randLine2();
randLine2();
}
function stopDrawLight() {
mcLight.clear();
killArrayElem(aFun, "drawLight");
}
function lossEnergy() {
_root.energy = _root.energy - 1;
if (_root.energy < 0) {
_root.energy = 0;
}
}
function energyManage() {
energyIncrease();
var _local3 = _root.mcLayout.mcBar.energy.bar;
_local3._yscale = (_root.energy / _root.maxEnergy) * _root.maxEnergy;
}
function energyIncrease() {
_root.energy = _root.energy + (0.5 + (_root.nLevel * 0.01));
if (_root.energy > _root.maxEnergy) {
_root.energy = _root.maxEnergy;
}
}
function energyAddLen() {
var _local3 = _root.mcLayout.mcBar.energy.bg;
var _local4 = _root.mcLayout.mcBar.energy;
if (_root.maxEnergy < 150) {
if (_root.money >= _root.pu1Money) {
_root.money = _root.money - _root.pu1Money;
_root.maxEnergy = _root.maxEnergy + 10;
maxDotNum = maxDotNum + 2;
_root.maxDotNum = _root.maxDotNum + 2;
_local3._yscale = _root.maxEnergy;
_local4._y = _local4._y + 13.2;
}
}
}
function addEnergy() {
_root.energy = _root.energy + 50;
if (_root.energy > _root.maxEnergy) {
if (_root.money >= _root.pu2Money) {
_root.money = _root.money - _root.pu2Money;
_root.energy = _root.maxEnergy;
}
}
}
function addPower() {
if (_root.power < _root.maxPower) {
if (_root.money >= _root.pu2Money) {
_root.money = _root.money - _root.pu2Money;
_root.power = _root.power + 1;
}
}
var _local2 = _root.mcLayout.mcBar.powerBar;
_local2.gotoAndStop(_root.power);
}
function stLightKill() {
if (_root.money >= _root.pu4Money) {
_root.money = _root.money - _root.pu4Money;
aFun.push("lightKill");
lightKillInter = 0;
aKill = LEVEL.aEnemy.slice();
var _local4 = LEVEL.mcHelper;
for (var _local5 in _local4) {
var _local3 = _local4[_local5];
_local3.killed = false;
}
}
}
function stopLightKill() {
mcLight.clear();
killArrayElem(aFun, "lightKill");
aKill = null;
}
function lightKill() {
var _local10 = mcLight;
_local10.clear();
if (_root.bPause) {
return(undefined);
}
var _local12 = LEVEL.role.stick.p;
var _local8 = _local12._x;
var _local6 = _local12._y;
var _local13 = getCoordG2(_local12, _local8, _local6);
_local8 = _local13.x;
_local6 = _local13.y;
var _local11 = aKill.length;
var _local3 = 0;
var _local9 = aKill[0];
var _local7 = _local9._x;
var _local5 = _local9._y;
randLine(_local10, _local8, _local6, _local7, _local5, 5);
randLine(_local10, _local8, _local6, _local7, _local5, 15);
while (_local3 < _local11) {
var _local4 = aKill[_local3];
if (_local3 < (_local11 - 1)) {
_local9 = aKill[_local3 + 1];
_local8 = _local4._x;
_local6 = _local4._y;
_local7 = _local9._x;
_local5 = _local9._y;
randLine(_local10, _local8, _local6, _local7, _local5, 5);
randLine(_local10, _local8, _local6, _local7, _local5, 15);
}
_local4.die();
_local3++;
}
lightKillInter++;
if (lightKillInter == 8) {
stopLightKill();
}
}
}
Symbol 1408 MovieClip [__Packages.global.GlobalFun] Frame 0
class global.GlobalFun
{
function GlobalFun () {
initFun();
}
function initFun() {
_global.initGlobalFun = function (_mc) {
var _local2 = _mc;
_local2.turnTo = _global.turnTo;
_local2.kill = _global.kill;
_local2.nextDepth = _global.nextDepth;
_local2.atMc = _global.atMc;
_local2.atMc2 = _global.atMc2;
_local2.newMc = _global.newMc;
_local2.killInter = _global.killInter;
_local2.killArrayElem = _global.killArrayElem;
_local2.funManage = _global.funManage;
_local2.funManage2 = _global.funManage2;
_local2.fixUI2 = _global.fixUI2;
_local2.oddsManage = _global.oddsManage;
_local2.frame2Time = _global.frame2Time;
_local2.time2Frame = _global.time2Frame;
_local2.changeColor = _global.changeColor;
_local2.newFPS = _global.newFPS;
_local2.drawManage = _global.drawManage;
_local2.newMasker = _global.newMasker;
_local2.keyManage = _global.keyManage;
_local2.car2Flash = _global.car2Flash;
_local2.flash2Car = _global.flash2Car;
_local2.car2Polar = _global.car2Polar;
_local2.polar2Car = _global.polar2Car;
_local2.getCoordG = _global.getCoordG;
_local2.getCoordG2 = _global.getCoordG2;
_local2.getCoordL = _global.getCoordL;
_local2.randPole = _global.randPole;
_local2.rand = _global.rand;
_local2.intRand = _global.intRand;
_local2.floor = _global.floor;
_local2.abs = _global.abs;
_local2.getDis = _global.getDis;
_local2.getL2 = _global.getL2;
_local2.getL3 = _global.getL3;
_local2.sinD = _global.sinD;
_local2.cosD = _global.cosD;
_local2.atan2D = _global.atan2D;
_local2.asinD = _global.asinD;
_local2.acosD = _global.acosD;
_local2.tanD = _global.tanD;
_local2.d2r = _global.d2r;
_local2.r2d = _global.r2d;
_local2.fixAng = _global.fixAng;
_local2.getAng = _global.getAng;
_local2.getAng2 = _global.getAng2;
_local2.getOutAng = _global.getOutAng;
_local2.getRo = _global.getRo;
_local2.classRo = _global.classRo;
_local2.classRo2 = _global.classRo2;
};
_global.turnTo = function (_sFrame) {
var _local2 = _root;
_local2.gotoAndStop(_sFrame);
};
_global.kill = function (_mc) {
_mc.removeMovieClip();
if (_mc) {
_mc.swapDepths(0);
_mc.removeMovieClip();
}
};
_global.nextDepth = function (_mc) {
var _local1 = _mc.getNextHighestDepth();
return(_local1);
};
_global.atMc = function (_dir, _mc, _newName) {
var _local2 = _dir.getNextHighestDepth();
if (!_newName) {
_newName = _mc;
}
var _local1 = _dir.attachMovie(_mc, _newName, _local2);
return(_local1);
};
_global.atMc2 = function (_dir, _mc, _newName) {
var _local1 = _dir.getNextHighestDepth();
if (!_newName) {
_newName = _mc;
}
var _local2 = _dir.attachMovie(_mc, _newName + _local1, _local1);
return(_local2);
};
_global.newMc = function (_dir, _mc) {
var _local2 = _dir.getNextHighestDepth();
var _local1 = _dir.createEmptyMovieClip(_mc, _local2);
return(_local1);
};
_global.newMc2 = function (_dir, _mc) {
var _local1 = _dir.getNextHighestDepth();
var _local2 = _dir.createEmptyMovieClip(_mc + _local1, _local1);
return(_local2);
};
_global.killInter = function (_dir, _aInter) {
_dir.onUnload = function () {
for (var _local1 in _aInter) {
clearInterval(_dir[_aInter[_local1]]);
}
};
};
_global.killArrayElem = function (_a, _elem) {
var _local6 = _elem;
var _local2 = _a;
var _local5 = _local2.length;
var _local1 = 0;
var _local4 = 0;
var _local3 = false;
while (_local1 < _local5) {
if (_local6 == _local2[_local1]) {
_local4 = _local1;
_local3 = true;
break;
}
_local1++;
}
if (_local3) {
_local2.splice(_local4, 1);
}
};
_global.funManage = function (_dir, _aFun) {
var _local3 = _dir;
var _local2 = _aFun;
for (var _local5 in _local2) {
var _local1 = _local2[_local5];
for (var _local4 in _local1) {
_local3[_local1[_local4]]();
}
}
};
_global.funManage2 = function (_dir, _aFun) {
var _local6 = _dir;
var _local5 = _aFun;
for (var _local8 in _local5) {
var _local4 = _local5[_local8];
for (var _local7 in _local4) {
var _local2 = _local6[_local4[_local7]];
var _local3 = _local2.aFun;
this.funManage(_local2, [_local3]);
}
}
};
_global.fixUI2 = function () {
_root.reserved.swapDepths(-2);
_root.focusManager.swapDepths(-1);
};
_global.oddsManage = function (_dir, _aOdds, _aFun) {
var _local8 = _aOdds.length;
var _local6 = Math.random();
var _local7 = 0;
var _local2 = 0;
while (_local2 < _local8) {
var _local3 = 0;
var _local4 = _aOdds[_local2];
var _local1 = 0;
while (_local1 < _local2) {
_local3 = _local3 + _aOdds[_local1];
_local1++;
}
_local4 = _local4 + _local3;
if (_local6 >= _local3) {
if (_local6 < _local4) {
_local7 = _local2;
break;
}
}
_local2++;
}
return(_dir[_aFun[_local7]]());
};
_global.frame2Time = function (_nFrames, _FPS) {
var _local1 = (_nFrames / _FPS) * 1000;
return(_local1);
};
_global.time2Frame = function (_T, _FPS) {
var _local1 = (_T / 1000) * _FPS;
return(_local1);
};
_global.changeColor = function (_mc, _colorTrans) {
var _local1 = new Color(_mc);
_local1.setTransform(_colorTrans);
};
_global.newFPS = function (_vis) {
var mcFPS = this.newMc(_root, "mcFPS");
if (_vis == undefined) {
_vis = true;
}
if (_vis) {
mcFPS.createTextField("FPSTextField", this.nextDepth(mcFPS), 20, 10, 50, 20);
}
var fps = 0;
mcFPS.onEnterFrame = function () {
fps++;
};
mcFPS.calcFPS = function () {
if (_vis) {
mcFPS.FPSTextField.text = String("FPS: " + fps);
}
fps = 0;
};
setInterval(mcFPS, "calcFPS", 1000);
};
_global.drawManage = function (_mc, aLineStyle, aCoord, aFillColor, baseName) {
var _local7 = _mc;
_local7.lineStyle(aLineStyle[0], aLineStyle[1], aLineStyle[2]);
var _local4 = aCoord[0][0];
var _local3 = aCoord[0][1];
_local7.moveTo(_local4, _local3);
if (aFillColor) {
if (typeof(aFillColor[0]) == "number") {
_local7.beginFill(aFillColor[0], aFillColor[1]);
} else {
_local7.beginBitmapFill(aFillColor[0], aFillColor[1], aFillColor[2], aFillColor[3]);
}
}
var _local5 = 1;
var _local11 = aCoord.length;
while (_local5 < _local11) {
if (baseName) {
var _local2 = this.newMc2(_local7, baseName);
_local2.cacheAsBitmap = true;
_local2.lineStyle(aLineStyle[0], aLineStyle[1], aLineStyle[2]);
_local2.moveTo(_local4, _local3);
}
_local4 = aCoord[_local5][0];
_local3 = aCoord[_local5][1];
_local7.lineTo(_local4, _local3);
if (_local2) {
_local2.lineTo(_local4, _local3);
}
_local5++;
}
if (aFillColor) {
_local7.endFill();
}
};
_global.newMasker = function (aColor, _dir, w, h, L) {
if (!aColor) {
aColor = [0, 100];
}
if (!_dir) {
_dir = _root;
}
if (!w) {
w = Stage.width;
}
if (!h) {
h = Stage.height;
}
if (!L) {
L = 500;
}
this.kill(_dir[_dir._name + "Masker"]);
var _local7 = this.newMc(_dir, _dir._name + "Masker");
var _local12 = [[-L, -L], [w + L, -L], [w + L, 0], [-L, 0]];
var _local11 = [[-L, h], [w + L, h], [w + L, h + L], [-L, h + L]];
var _local10 = [[-L, -L], [0, -L], [0, h + L], [-L, h + L]];
var _local9 = [[w, -L], [w + L, -L], [w + L, h + L], [w, h + L]];
this.drawManage(_local7, [1, 0, 0], _local12, [aColor[0], aColor[1]]);
this.drawManage(_local7, [1, 0, 0], _local11, [aColor[0], aColor[1]]);
this.drawManage(_local7, [1, 0, 0], _local10, [aColor[0], aColor[1]]);
this.drawManage(_local7, [1, 0, 0], _local9, [aColor[0], aColor[1]]);
};
_global.keyManage = function (_dir, aKey, aFun, aExtFun) {
var keyManager = this.newMc(_dir, _dir._name + "KeyManager");
for (var _local4 in aKey) {
var _local2 = aKey[_local4];
keyManager["bDown" + _local2] = false;
}
var len = aKey.length;
keyManager.onEnterFrame = function () {
var _local2 = 0;
while (_local2 < len) {
var _local1 = aKey[_local2];
if (Key.isDown(_local1)) {
if (!keyManager["bDown" + _local1]) {
_dir[aFun[_local2][0]]();
keyManager["bDown" + _local1] = true;
}
_dir[aFun[_local2][1]]();
}
if (!Key.isDown(_local1)) {
if (keyManager["bDown" + _local1]) {
_dir[aFun[_local2][2]]();
keyManager["bDown" + _local1] = false;
}
}
_local2++;
}
_dir[aExtFun]();
};
};
_global.classMenu = function (_dir, aMenu, aFun, aExtFun) {
var _local4 = aMenu.length;
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = _dir[aMenu[_local3]];
_local2.onRollOver = function () {
this.gotoAndPlay(2);
_dir[aExtFun[0]]();
};
_local2.onRollOut = function () {
this.gotoAndPlay(this._totalframes - this._currentframe);
_dir[aExtFun[1]]();
};
if (aFun) {
_local2.id = _local3;
_local2.onPress = function () {
_dir[aFun[this.id]]();
};
}
_local3++;
}
};
_global.classMenu2 = function (_dir, aMenu, aExtFun) {
var len = aMenu.length;
var _local6 = this.newMc2(_dir, "mcHit");
_local6.onEnterFrame = function () {
var _local3 = 0;
while (_local3 < len) {
var _local2 = _dir[aMenu[_local3]];
var _local4 = _local2.hitTest(_root._xmouse, _root._ymouse, true);
if (_local4) {
if (!_local2.bHited) {
_local2.gotoAndPlay(2);
_dir[aExtFun[0]]();
_local2.bHited = true;
}
} else if (_local2.bHited) {
_local2.gotoAndPlay(_local2._totalframes - _local2._currentframe);
_dir[aExtFun[1]]();
_local2.bHited = false;
}
_local3++;
}
};
};
_global.randPlay = function (_mc) {
if (!_mc.bInited) {
_mc.gotoAndPlay(this.intRand(_mc._totalframes));
_mc.bInited = true;
}
};
_global.car2Flash = function (_o) {
_o._y = _o._y * -1;
_o._rotation = _o._rotation * -1;
};
_global.flash2Car = function (_o) {
return(this.car2Flash(_o));
};
_global.car2Polar = function (x, y) {
var _local2 = Math.sqrt((x * x) + (y * y));
var _local5 = this.atan2D(y, x);
return({r:_local2, a:_local5});
};
_global.polar2Car = function (len, ang) {
var _local3 = len * this.cosD(ang);
var _local2 = len * this.sinD(ang);
return({x:_local3, y:_local2});
};
_global.getCoordG = function (_mc) {
var _local1 = {x:_mc._x, y:_mc._y};
_mc._parent.localToGlobal(_local1);
return(_local1);
};
_global.getCoordG2 = function (_mc, xx, yy) {
var _local1 = {x:xx, y:yy};
_mc.localToGlobal(_local1);
return(_local1);
};
_global.getCoordL = function (_mc, xx, yy) {
var _local1 = {x:xx, y:yy};
_mc._parent.globalToLocal(_local1);
return(_local1);
};
_global.randPole = function () {
var _local1 = ((Math.random() > 0.5) ? 1 : -1);
return(_local1);
};
_global.rand = function (_n) {
if (!_n) {
_n = 1;
}
var _local2 = Math.random() * _n;
return(_local2);
};
_global.intRand = function (_n) {
var _local1 = Math.floor(Math.random() * _n);
return(_local1);
};
_global.floor = function (_n) {
var _local1 = Math.floor(_n);
return(_local1);
};
_global.abs = function (_n) {
var _local1 = Math.abs(_n);
return(_local1);
};
_global.getDis = function (x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
return(_local3);
};
_global.getL2 = function (l1, l3) {
var _local1 = Math.sqrt((l3 * l3) - (l1 * l1));
return(_local1);
};
_global.getL3 = function (l1, l2) {
var _local1 = Math.sqrt((l1 * l1) + (l2 * l2));
return(_local1);
};
_global.sinD = function (_angle) {
var _local1 = Math.sin((_angle * 3.141593) / 180);
return(_local1);
};
_global.cosD = function (_angle) {
var _local1 = Math.cos((_angle * 3.141593) / 180);
return(_local1);
};
_global.atan2D = function (y, x) {
var _local1 = Math.atan2(y, x) * 57.29578;
return(_local1);
};
_global.asinD = function (_ratio) {
var _local1 = Math.asin(_ratio) * 57.29578;
return(_local1);
};
_global.acosD = function (_ratio) {
var _local1 = Math.acos(_ratio) * 57.29578;
return(_local1);
};
_global.tanD = function (_angle) {
var _local1 = Math.tan((_angle * 3.141593) / 180);
return(_local1);
};
_global.d2r = function (_angle) {
var _local1 = _angle * 0.017453;
return(_local1);
};
_global.r2d = function (_radian) {
var _local1 = _radian * 57.29578;
return(_local1);
};
_global.fixAng = function (_ang) {
var _local1 = _ang % 360;
var _local2 = (((_local1 % 360) < 0) ? (_local1 + 360) : (_local1));
return(_local2);
};
_global.getAng = function (x1, y1, x2, y2) {
var _local1 = Math.atan2(y2 - y1, x2 - x1) * 57.29578;
return(_local1);
};
_global.getAng2 = function (_a1, _a2) {
var _local4 = this.fixAng(_a1);
var _local3 = this.fixAng(_a2);
var _local2 = this.abs(_local3 - _local4);
if (_local2 > 180) {
_local2 = 360 - _local2;
}
_local2 = this.fixAng(_local2);
return(_local2);
};
_global.getOutAng = function (_lineAng, _inAng) {
var _local1 = (_lineAng * 2) - _inAng;
return(_local1);
};
_global.getRo = function (_a1, _a2, _mod, _r, _m) {
var _local7 = this.fixAng(_a1);
var _local2 = this.fixAng(_a2);
var _local5 = _r;
var _local6 = _local7 - _local2;
var _local3 = this.abs(_local6);
if (_local3 < _m) {
return(_local2);
}
var _local4 = _local3 / _local6;
if (_local3 > 180) {
_local3 = 360 - _local3;
_local4 = -_local4;
}
if (_mod == 1) {
_local2 = _local2 + ((_local4 * _local3) * _local5);
} else {
_local2 = _local2 + (_local4 * _local5);
}
_local2 = this.fixAng(_local2);
return(_local2);
};
_global.classRo = function (xx, yy, _ang, _ox, _oy) {
var _local8 = xx;
var _local7 = yy;
var _local2 = _ang;
var _local6 = _ox;
var _local5 = _oy;
_local8 = _local8 - _local6;
_local7 = _local7 - _local5;
var _local4 = (this.cosD(_local2) * _local8) - (this.sinD(_local2) * _local7);
var _local3 = (this.cosD(_local2) * _local7) + (this.sinD(_local2) * _local8);
_local4 = _local4 + _local6;
_local3 = _local3 + _local5;
return({x:_local4, y:_local3});
};
_global.classRo2 = function (xx, yy, _mc, offsetAng) {
var _local5 = xx;
var _local4 = yy;
var _local2 = this.atan2D(_local4, _local5);
if (_mc) {
if (!offsetAng) {
offsetAng = 0;
}
_mc._rotation = _local2 + offsetAng;
}
return(_local2);
};
}
}
Symbol 15 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 21 Button
on (release) {
gotoAndStop (1);
}
Symbol 31 Button
on (release) {
gotoAndStop ("submited");
}
Symbol 36 Button
on (release) {
viewHighscore();
}
Symbol 37 MovieClip Frame 1
stop();
_global.game_name = _game_name;
var highscore = eval (score_var);
_global.viewHighscore = function () {
getURL ("http://www.freeworldgroup.com/score/index.asp?game=" + game_name, "_blank");
};
if (highscore <= 0) {
this._visible = false;
}
trace(game_name);
trace(highscore);
trace("http://www.freeworldgroup.com/score/index.asp?game=" + game_name);
Symbol 37 MovieClip Frame 3
function sendData() {
send_var.game = game_name;
send_var.score = highscore;
send_var.name = name_txt.text;
if (send_var.name == "") {
send_var.name = "guest" + int(Math.random() * 1000);
}
send_var.sendAndLoad("http://www.freeworldgroup.com/score/score.asp", load_var, "POST");
gotoAndStop ("sending");
_parent.btContinue._x = -200;
}
stop();
gold_txt.text = highscore;
send_var = new LoadVars();
load_var = new LoadVars();
ok_btn.onRelease = sendData;
load_var.onLoad = function () {
gotoAndStop ("done");
};
Instance of Symbol 17 MovieClip in Symbol 37 MovieClip Frame 3
on (release) {
}
Symbol 42 MovieClip [sceneMasker] Frame 1
bound_n = 500;
stage_width_n = stageW;
stage_height_n = stageH;
top_mask._width = stage_width_n + (2 * bound_n);
top_mask._height = bound_n;
bottom_mask._width = stage_width_n + (2 * bound_n);
bottom_mask._height = bound_n;
left_mask._width = bound_n;
left_mask._height = stage_height_n + (2 * bound_n);
right_mask._width = bound_n;
right_mask._height = stage_height_n + (2 * bound_n);
top_mask._x = -1 * bound_n;
top_mask._y = -1 * bound_n;
bottom_mask._x = -1 * bound_n;
bottom_mask._y = stage_height_n;
left_mask._x = -1 * bound_n;
left_mask._y = -1 * bound_n;
right_mask._x = stage_width_n;
right_mask._y = -1 * bound_n;
this._x = 0;
this._y = 0;
Symbol 58 MovieClip Frame 18
stop();
Symbol 63 MovieClip Frame 20
stop();
Symbol 65 MovieClip [headAnim] Frame 51
stop();
_root.mcOver.play();
Symbol 97 MovieClip Frame 1
function randLine(_mc, x1, y1, x2, y2, d) {
var _local5 = _mc;
var _local7 = x2 - x1;
var _local6 = y2 - y1;
var _local11 = getL3(_local7, _local6);
var _local8 = floor(_local11 / d);
_local7 = _local7 / _local8;
_local6 = _local6 / _local8;
_local5.moveTo(x1, y1);
_local5.lineStyle(1, 16777215);
var _local1 = 1;
while (_local1 < _local8) {
var _local3 = (x1 + (_local7 * _local1)) + ((rand() - 0.5) * d);
var _local2 = (y1 + (_local6 * _local1)) + ((rand() - 0.5) * d);
_local5.lineTo(_local3, _local2);
_local1++;
}
_local5.lineTo(x2, y2);
}
function onEnterFrame() {
if (dir == 1) {
x2 = x2 + 5;
if (x2 > 600) {
dir = -1;
}
} else {
x2 = x2 - 5;
if (x2 < 0) {
dir = 1;
}
}
mcLight.clear();
randLine(mcLight, x1, y1, x2, y2, 5);
randLine(mcLight, x1, y1, x2, y2, 15);
}
var mcLight = newMc(this, "mcLight");
x1 = 288;
y1 = 280;
x2 = 0;
y2 = -10;
dir = 1;
Instance of Symbol 37 MovieClip in Symbol 128 MovieClip [mcEnd] Frame 40
//component parameters
onClipEvent (construct) {
_game_name = "castle_draw";
score_var = "_root.score";
}
Symbol 128 MovieClip [mcEnd] Frame 54
stop();
_root.mcLevel.showMouse();
_root.bPause = true;
btContinue.onPress = function () {
_root.continueGame();
};
btRetry.onPress = function () {
_root.tryAgain();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 10
stop();
Symbol 188 MovieClip Frame 1
bt1.onPress = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
_root.mcLevel.mcDraw.energyAddLen();
};
bt2.onPress = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
_root.mcLevel.mcDraw.addPower();
};
bt3.onPress = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
_root.mcLevel.role.addBlood();
};
bt4.onPress = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
_root.mcLevel.mcDraw.stLightKill();
};
bt5.onPress = function () {
trace(_root.bAllowMenu);
if (!_root.bAllowMenu) {
return(undefined);
}
_root.mcLevel.addHelper();
};
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 2
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 2
stop();
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 2
stop();
Symbol 208 MovieClip Frame 1
if (!_parent.flash_start) {
gotoAndStop (10);
}
Symbol 208 MovieClip Frame 10
stop();
Symbol 209 MovieClip Frame 9
stop();
_parent.flash_start = true;
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 2
stop();
Symbol 215 MovieClip Frame 1
stop();
Symbol 215 MovieClip Frame 2
stop();
Symbol 217 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 2
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 2
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 10
function quality_init() {
switch (_quality) {
case "LOW" :
bt4.gotoAndStop(2);
return;
case "MEDIUM" :
bt3.gotoAndStop(2);
return;
case "HIGH" :
bt2.gotoAndStop(2);
return;
case "BEST" :
bt1.gotoAndStop(2);
}
}
function bt_init() {
bt1.gotoAndStop(1);
bt2.gotoAndStop(1);
bt3.gotoAndStop(1);
bt4.gotoAndStop(1);
}
stop();
quality_init();
bt1.bt.onPress = function () {
bt_init();
_quality = "BEST";
quality_init();
bt1.gotoAndStop(2);
};
bt2.bt.onPress = function () {
bt_init();
_quality = "HIGH";
quality_init();
bt2.gotoAndStop(2);
};
bt3.bt.onPress = function () {
bt_init();
_quality = "MEDIUM";
quality_init();
bt3.gotoAndStop(2);
};
bt4.bt.onPress = function () {
bt_init();
_quality = "LOW";
quality_init();
bt4.gotoAndStop(2);
};
Symbol 221 MovieClip Frame 1
hit = false;
opend = false;
onEnterFrame = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
dcHitMenu();
dcMenu();
};
dcHitMenu = function () {
var _local2 = btQuality.hitTest(_root._xmouse, _root._ymouse, false);
if (_local2) {
hit = true;
} else {
hit = false;
}
};
dcMenu = function () {
if (hit && (!opend)) {
qualityMenu.gotoAndPlay(1);
btQuality.gotoAndStop(2);
opend = true;
}
if (!hit) {
if (opend) {
qualityMenu.gotoAndPlay(11);
opend = false;
}
btQuality.gotoAndStop(1);
}
};
if (!_root.bMusicOn) {
btMusic.gotoAndStop(2);
}
if (!_root.bSoundOn) {
btSound.gotoAndStop(2);
}
btMusic.onPress = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
btMusic.play();
_root.bMusicOn = !_root.bMusicOn;
_root.initMusic();
};
btSound.onPress = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
btSound.play();
_root.bSoundOn = !_root.bSoundOn;
_root.initSD();
};
Instance of Symbol 195 MovieClip "btMusic" in Symbol 221 MovieClip Frame 1
on (release) {
_root.setMusic(this);
}
Instance of Symbol 202 MovieClip "btSound" in Symbol 221 MovieClip Frame 1
on (release) {
_root.setSound(this);
}
Symbol 226 MovieClip Frame 1
btMenu.onPress = function () {
if (!_root.bAllowMenu) {
return(undefined);
}
_root.bAllowMenu = false;
_root.bPause = true;
atMc(_root, "mcMenu");
};
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 10
stop();
Symbol 244 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 1
powerBar.gotoAndStop(_root.power);
Symbol 247 MovieClip Frame 1
stop();
if (_root.bNoted != 1) {
this.gotoAndPlay("start");
_root.bNoted = true;
} else {
this.gotoAndPlay("start");
}
Symbol 247 MovieClip Frame 10
_root.bAllowMenu = true;
_root.activeGame();
Symbol 247 MovieClip Frame 20
kill(this);
Symbol 248 MovieClip [mcLayout] Frame 1
function showMouse() {
_root.mcLevel.hitMenu();
pauseBG.gotoAndPlay(2);
}
function hideMouse() {
_root.mcLevel.outMenu();
pauseBG.gotoAndPlay(pauseBG._totalframes - pauseBG._currentframe);
}
var bg = mcBar.energy.bg;
var mcEnergy = mcBar.energy;
bg._yscale = _root.maxEnergy;
mcEnergy._y = mcEnergy._y + ((_root.maxEnergy - 100) * 1.2);
classMenu2(this, ["btLayout"], ["showMouse", "hideMouse"]);
Symbol 254 MovieClip [mcMenu] Frame 20
stop();
_root.mcLevel.showMouse();
_root.bPause = true;
btReturn.onPress = function () {
_root.bAllowMenu = true;
_root.bPause = false;
this._parent.removeMovieClip();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 261 MovieClip [mcOver] Frame 1
stop();
Symbol 261 MovieClip [mcOver] Frame 3
stop();
_root.mcLevel.showMouse();
_root.bPause = true;
btContinue.onPress = function () {
_root.continueGame();
};
btRetry.onPress = function () {
_root.tryAgain();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Instance of Symbol 37 MovieClip in Symbol 261 MovieClip [mcOver] Frame 3
//component parameters
onClipEvent (construct) {
_game_name = "castle_draw";
score_var = "_root.score";
}
Symbol 262 MovieClip [mcOverNormal] Frame 1
stop();
Symbol 262 MovieClip [mcOverNormal] Frame 22
stop();
_root.mcLevel.showMouse();
_root.bPause = true;
btRetry.onPress = function () {
_root.retry();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 273 MovieClip [mcPass] Frame 22
stop();
_root.mcLevel.showMouse();
_root.bPause = true;
btRetry.onPress = function () {
_root.nextLevel();
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 276 MovieClip [mcPause] Frame 11
stop();
Symbol 278 MovieClip Frame 1
_visible = false;
Symbol 287 MovieClip Frame 1
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
mc = this._parent;
bar.bar._xscale = mc.getBlood();
Symbol 292 MovieClip Frame 61
this._parent.stopSwoon();
Symbol 307 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 315 MovieClip Frame 1
function onEnterFrame() {
if (!_root.bPause) {
this.gotoAndPlay(intRand(20) + 1);
delete this.onEnterFrame;
}
}
stop();
Symbol 315 MovieClip Frame 78
function onEnterFrame() {
if (!_root.bPause) {
this.play();
delete this.onEnterFrame;
}
}
stop();
Symbol 315 MovieClip Frame 83
var mcArrow = _root.mcLevel.mcArrow;
var arrow = atMc2(mcArrow, "arrow");
var coord = getCoordG(this);
arrow._x = coord.x;
arrow._y = coord.y;
if (this._parent._parent._xscale == 100) {
arrow._rotation = this._rotation + 180;
} else {
arrow._rotation = this._rotation * -1;
}
Symbol 316 MovieClip Frame 1
function onEnterFrame() {
var _local6 = _root.mcLevel;
var _local4 = _local6.role._x;
var _local3 = _local6.role._y;
var _local5 = getCoordL(this, _local4, _local3);
_local4 = _local5.x;
_local3 = _local5.y;
classRo2(_local4, _local3, upBody, 180);
}
Symbol 320 MovieClip [bowman2] Frame 1
#initclip 28
Object.registerClass("bowman2", Enemy);
#endinitclip
stop();
Symbol 320 MovieClip [bowman2] Frame 10
stop();
Symbol 320 MovieClip [bowman2] Frame 20
stop();
Symbol 320 MovieClip [bowman2] Frame 30
stop();
Symbol 342 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 350 MovieClip Frame 1
function onEnterFrame() {
if (!_root.bPause) {
this.gotoAndPlay(intRand(20) + 1);
delete this.onEnterFrame;
}
}
stop();
Symbol 350 MovieClip Frame 78
function onEnterFrame() {
if (!_root.bPause) {
this.play();
delete this.onEnterFrame;
}
}
stop();
Symbol 350 MovieClip Frame 83
var mcArrow = _root.mcLevel.mcArrow;
var arrow = atMc2(mcArrow, "arrow");
var coord = getCoordG(this);
arrow._x = coord.x;
arrow._y = coord.y;
if (this._parent._parent._xscale == 100) {
arrow._rotation = this._rotation + 180;
} else {
arrow._rotation = this._rotation * -1;
}
Symbol 351 MovieClip Frame 1
function onEnterFrame() {
var _local6 = _root.mcLevel;
var _local4 = _local6.role._x;
var _local3 = _local6.role._y;
var _local5 = getCoordL(this, _local4, _local3);
_local4 = _local5.x;
_local3 = _local5.y;
classRo2(_local4, _local3, upBody, 180);
}
Symbol 355 MovieClip [bowman1] Frame 1
#initclip 9
Object.registerClass("bowman1", Enemy);
#endinitclip
stop();
Symbol 355 MovieClip [bowman1] Frame 10
stop();
Symbol 355 MovieClip [bowman1] Frame 20
stop();
Symbol 355 MovieClip [bowman1] Frame 30
stop();
Symbol 377 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 385 MovieClip Frame 1
function onEnterFrame() {
if (!_root.bPause) {
this.gotoAndPlay(intRand(20) + 1);
delete this.onEnterFrame;
}
}
stop();
Symbol 385 MovieClip Frame 78
function onEnterFrame() {
if (!_root.bPause) {
this.play();
delete this.onEnterFrame;
}
}
stop();
Symbol 385 MovieClip Frame 83
var mcArrow = _root.mcLevel.mcArrow;
var arrow = atMc2(mcArrow, "arrow");
var coord = getCoordG(this);
arrow._x = coord.x;
arrow._y = coord.y;
if (this._parent._parent._xscale == 100) {
arrow._rotation = this._rotation + 180;
} else {
arrow._rotation = this._rotation * -1;
}
Symbol 386 MovieClip Frame 1
function onEnterFrame() {
var _local6 = _root.mcLevel;
var _local4 = _local6.role._x;
var _local3 = _local6.role._y;
var _local5 = getCoordL(this, _local4, _local3);
_local4 = _local5.x;
_local3 = _local5.y;
classRo2(_local4, _local3, upBody, 180);
}
Symbol 390 MovieClip [bowman3] Frame 1
#initclip 10
Object.registerClass("bowman3", Enemy);
#endinitclip
stop();
Symbol 390 MovieClip [bowman3] Frame 10
stop();
Symbol 390 MovieClip [bowman3] Frame 20
stop();
Symbol 390 MovieClip [bowman3] Frame 30
stop();
Symbol 412 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 420 MovieClip Frame 1
function onEnterFrame() {
if (!_root.bPause) {
this.gotoAndPlay(intRand(20) + 1);
delete this.onEnterFrame;
}
}
stop();
Symbol 420 MovieClip Frame 78
function onEnterFrame() {
if (!_root.bPause) {
this.play();
delete this.onEnterFrame;
}
}
stop();
Symbol 420 MovieClip Frame 83
var mcArrow = _root.mcLevel.mcArrow;
var arrow = atMc2(mcArrow, "arrow");
var coord = getCoordG(this);
arrow._x = coord.x;
arrow._y = coord.y;
if (this._parent._parent._xscale == 100) {
arrow._rotation = this._rotation + 180;
} else {
arrow._rotation = this._rotation * -1;
}
Symbol 421 MovieClip Frame 1
function onEnterFrame() {
var _local6 = _root.mcLevel;
var _local4 = _local6.role._x;
var _local3 = _local6.role._y;
var _local5 = getCoordL(this, _local4, _local3);
_local4 = _local5.x;
_local3 = _local5.y;
classRo2(_local4, _local3, upBody, 180);
}
Symbol 425 MovieClip [bowman4] Frame 1
#initclip 11
Object.registerClass("bowman4", Enemy);
#endinitclip
stop();
Symbol 425 MovieClip [bowman4] Frame 10
stop();
Symbol 425 MovieClip [bowman4] Frame 20
stop();
Symbol 425 MovieClip [bowman4] Frame 30
stop();
Symbol 434 MovieClip Frame 1
_root.sdFist.start();
Symbol 434 MovieClip Frame 7
kill(this._parent);
Symbol 435 MovieClip [arrow] Frame 1
stop();
Symbol 435 MovieClip [arrow] Frame 10
stop();
Symbol 457 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 483 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 488 MovieClip Frame 1
this._parent._parent.hitAim();
_root.sdFist.start();
Symbol 488 MovieClip Frame 8
stop();
Symbol 502 MovieClip Frame 42
stop();
Symbol 526 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 527 MovieClip [man11] Frame 1
#initclip 12
Object.registerClass("man11", Enemy);
#endinitclip
stop();
Symbol 527 MovieClip [man11] Frame 10
stop();
Symbol 527 MovieClip [man11] Frame 20
stop();
Symbol 527 MovieClip [man11] Frame 30
stop();
Symbol 527 MovieClip [man11] Frame 40
stop();
Symbol 527 MovieClip [man11] Frame 50
stop();
Symbol 527 MovieClip [man11] Frame 60
stop();
Symbol 549 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 575 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 600 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 601 MovieClip [man12] Frame 1
#initclip 13
Object.registerClass("man12", Enemy);
#endinitclip
stop();
Symbol 601 MovieClip [man12] Frame 10
stop();
Symbol 601 MovieClip [man12] Frame 20
stop();
Symbol 601 MovieClip [man12] Frame 30
stop();
Symbol 601 MovieClip [man12] Frame 40
stop();
Symbol 601 MovieClip [man12] Frame 50
stop();
Symbol 601 MovieClip [man12] Frame 60
stop();
Symbol 623 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 649 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 678 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 679 MovieClip [man13] Frame 1
#initclip 14
Object.registerClass("man13", Enemy);
#endinitclip
stop();
Symbol 679 MovieClip [man13] Frame 10
stop();
Symbol 679 MovieClip [man13] Frame 20
stop();
Symbol 679 MovieClip [man13] Frame 30
stop();
Symbol 679 MovieClip [man13] Frame 40
stop();
Symbol 679 MovieClip [man13] Frame 50
stop();
Symbol 679 MovieClip [man13] Frame 60
stop();
Symbol 701 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 727 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 750 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 751 MovieClip [man14] Frame 1
#initclip 15
Object.registerClass("man14", Enemy);
#endinitclip
stop();
Symbol 751 MovieClip [man14] Frame 10
stop();
Symbol 751 MovieClip [man14] Frame 20
stop();
Symbol 751 MovieClip [man14] Frame 30
stop();
Symbol 751 MovieClip [man14] Frame 40
stop();
Symbol 751 MovieClip [man14] Frame 50
stop();
Symbol 751 MovieClip [man14] Frame 60
stop();
Symbol 773 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 799 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 827 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 828 MovieClip [man21] Frame 1
#initclip 16
Object.registerClass("man21", Enemy);
#endinitclip
stop();
Symbol 828 MovieClip [man21] Frame 10
stop();
Symbol 828 MovieClip [man21] Frame 20
stop();
Symbol 828 MovieClip [man21] Frame 30
stop();
Symbol 828 MovieClip [man21] Frame 40
stop();
Symbol 828 MovieClip [man21] Frame 50
stop();
Symbol 828 MovieClip [man21] Frame 60
stop();
Symbol 850 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 876 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 900 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 901 MovieClip [man22] Frame 1
#initclip 17
Object.registerClass("man22", Enemy);
#endinitclip
stop();
Symbol 901 MovieClip [man22] Frame 10
stop();
Symbol 901 MovieClip [man22] Frame 20
stop();
Symbol 901 MovieClip [man22] Frame 30
stop();
Symbol 901 MovieClip [man22] Frame 40
stop();
Symbol 901 MovieClip [man22] Frame 50
stop();
Symbol 901 MovieClip [man22] Frame 60
stop();
Symbol 923 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 949 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 973 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 974 MovieClip [man23] Frame 1
#initclip 18
Object.registerClass("man23", Enemy);
#endinitclip
stop();
Symbol 974 MovieClip [man23] Frame 10
stop();
Symbol 974 MovieClip [man23] Frame 20
stop();
Symbol 974 MovieClip [man23] Frame 30
stop();
Symbol 974 MovieClip [man23] Frame 40
stop();
Symbol 974 MovieClip [man23] Frame 50
stop();
Symbol 974 MovieClip [man23] Frame 60
stop();
Symbol 996 MovieClip Frame 17
stop();
kill(this._parent);
Symbol 1022 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 1048 MovieClip Frame 101
stop();
var headAnim = atMc(_root, "headAnim");
headAnim._x = this._parent._x;
headAnim._y = this._parent._y;
if (_root.mcOver) {
headAnim.swapDepths(_root.mcOver);
}
Symbol 1049 MovieClip [man24] Frame 1
#initclip 19
Object.registerClass("man24", Enemy);
#endinitclip
stop();
Symbol 1049 MovieClip [man24] Frame 10
stop();
Symbol 1049 MovieClip [man24] Frame 20
stop();
Symbol 1049 MovieClip [man24] Frame 30
stop();
Symbol 1049 MovieClip [man24] Frame 40
stop();
Symbol 1049 MovieClip [man24] Frame 50
stop();
Symbol 1049 MovieClip [man24] Frame 60
stop();
Symbol 1070 MovieClip Frame 16
stop();
kill(this._parent);
Symbol 1088 MovieClip Frame 13
stop();
kill(this._parent);
Symbol 1099 MovieClip [Spider1] Frame 1
#initclip 20
Object.registerClass("Spider1", Enemy);
#endinitclip
stop();
Symbol 1099 MovieClip [Spider1] Frame 10
stop();
Symbol 1099 MovieClip [Spider1] Frame 20
stop();
Symbol 1099 MovieClip [Spider1] Frame 30
stop();
Symbol 1099 MovieClip [Spider1] Frame 40
stop();
Symbol 1099 MovieClip [Spider1] Frame 50
stop();
Symbol 1119 MovieClip Frame 15
stop();
kill(this._parent);
Symbol 1120 MovieClip [helperDrop] Frame 1
#initclip 21
Object.registerClass("helperDrop", RoleDrop);
#endinitclip
stop();
Symbol 1120 MovieClip [helperDrop] Frame 10
stop();
Symbol 1123 MovieClip [stone] Frame 1
#initclip 22
Object.registerClass("stone", Ball);
#endinitclip
Symbol 1159 MovieClip Frame 1
function onEnterFrame() {
if (!_root.bPause) {
this.gotoAndPlay(intRand(20) + 1);
delete this.onEnterFrame;
}
}
stop();
Symbol 1159 MovieClip Frame 81
function onEnterFrame() {
if (!_root.bPause) {
this.play();
delete this.onEnterFrame;
}
}
stop();
Symbol 1159 MovieClip Frame 96
var LEVEL = _root.mcLevel;
var stone = atMc2(LEVEL.mcDraw, "stone");
stone._x = this._parent.aimx;
stone._y = 175;
stone.size = 18;
stone.initFrame();
LEVEL.mcDraw.addBall(stone._name);
Symbol 1160 MovieClip [helper] Frame 1
#initclip 23
Object.registerClass("helper", Helper);
#endinitclip
stop();
Symbol 1160 MovieClip [helper] Frame 10
stop();
Symbol 1178 MovieClip Frame 17
stop();
_root.mcOver.play();
Symbol 1179 MovieClip [roleDrop] Frame 1
#initclip 24
Object.registerClass("roleDrop", RoleDrop);
#endinitclip
stop();
Symbol 1179 MovieClip [roleDrop] Frame 10
stop();
Symbol 1187 MovieClip [role] Frame 1
#initclip 25
Object.registerClass("role", Role);
#endinitclip
Symbol 1187 MovieClip [role] Frame 10
stop();
Symbol 1188 MovieClip [ball] Frame 1
#initclip 26
Object.registerClass("ball", Ball);
#endinitclip
Symbol 1191 MovieClip [mcDraw] Frame 1
#initclip 27
Object.registerClass("mcDraw", Draw);
#endinitclip
Symbol 1223 MovieClip [mcLevel] Frame 1
function levelInit() {
newMc(this, "mcHelper");
atMc(this, "role");
newMc(this, "mcEnemy");
atMc(this, "mcCastle");
atMc(this, "mcDraw");
atMc(this, "popo");
newMc(this, "mcArrow");
role._x = 290;
role._y = 175;
Mouse.hide();
startDrag (this.popo, true);
}
function showMouse() {
Mouse.show();
popo._visible = false;
}
function hideMouse() {
Mouse.hide();
popo._visible = true;
}
function hitMenu() {
if (!_root.bAllowMenu) {
return(undefined);
}
showMouse();
_root.pauseGame();
}
function outMenu() {
if (!_root.bAllowMenu) {
return(undefined);
}
hideMouse();
_root.activeGame();
}
function onEnterFrame() {
if (_root.bPause) {
return(undefined);
}
funManage(this, [aFun]);
}
function initColorFun() {
aCFun = new Array();
var _local5 = _root.nLevel - 1;
var _local3 = aColor[_local5];
var _local2 = 0;
var _local4 = _local3.length;
while (_local2 < _local4) {
aCFun.push("setC" + _local3[_local2]);
_local2++;
}
}
function getColor() {
var _local5 = _root.nLevel - 1;
var _local3 = aCOdds[_local5];
var _local6 = _local3.length;
var _local4 = oddsManage(this, _local3, aCFun);
return(_local4);
}
function setC1() {
return(1);
}
function setC2() {
return(2);
}
function setC3() {
return(3);
}
function setC4() {
return(4);
}
function stAddEnemy() {
enemyInter = setInterval(this, "enemyManage", 0);
}
function enemyManage() {
var _local5 = _root.nLevel - 1;
var _local3 = aEOdds[_local5];
if (_root.nLevel >= 4) {
oddsManage(this, _local3, ["addMan1", "addMan2", "addBowman", "addSpider"]);
} else if (_root.nLevel == 3) {
oddsManage(this, _local3, ["addMan1", "addMan2", "addBowman"]);
} else if (_root.nLevel == 2) {
oddsManage(this, _local3, ["addMan1", "addMan2", "addBowman"]);
} else if (_root.nLevel == 1) {
oddsManage(this, _local3, ["addMan1", "addMan2"]);
}
var _local4 = t1 + rand(t2);
clearInterval(enemyInter);
if (enemyNum < _root.aimNum) {
enemyInter = setInterval(this, "enemyManage", _local4);
}
}
function addEnemy(_type, c) {
if (_root.bPause) {
return(undefined);
}
var _local3 = atMc2(this, _type + c);
var _local4 = randPole();
var _local6 = ((_local4 == 1) ? 0 : 600) - (_local4 * 50);
var _local5 = 523;
_local3._x = _local6;
_local3._y = _local5;
_local3.initType(_type, "mv", c);
_local3.initDir(_local4);
addEnemyA(_local3);
enemyNum = enemyNum + 1;
}
function addMan1() {
var _local1 = getColor();
addEnemy("man1", _local1);
}
function addMan2() {
var _local1 = getColor();
addEnemy("man2", _local1);
}
function addBowman() {
var _local1 = getColor();
if (nBownam < maxBownam) {
addEnemy("bowman", _local1);
nBownam = nBownam + 1;
} else {
addEnemy("man1", _local1);
}
}
function addSpider() {
var _local1 = 1;
addEnemy("spider", _local1);
}
function addEnemyA(mc) {
aEnemy.push(mc);
}
function killEnemyA(name) {
killArrayElem(this.aEnemy, name);
}
function initHelper() {
var _local4 = _root.helperNum;
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = atMc2(mcHelper, "helper");
_local2._x = 500;
_local2._y = 178;
aHelper.push(_local2);
_local3++;
}
}
function addHelper() {
if (_root.money >= _root.pu5Money) {
if (aHelperCoord.length > 0) {
_root.money = _root.money - _root.pu5Money;
var _local2 = atMc2(mcHelper, "helper");
_local2._x = 500;
_local2._y = 178;
aHelper.push(_local2);
_root.helperNum = _root.helperNum + 1;
}
}
}
function arrowMv() {
for (var _local8 in mcArrow) {
var _local2 = mcArrow[_local8];
var _local5 = _local2._rotation;
_local2._x = _local2._x + (arrowV * cosD(_local5));
_local2._y = _local2._y + (arrowV * sinD(_local5));
var _local6 = _local2.hitTest(role.hitA);
if (_local6) {
if (!_local2.bKill) {
role.lossBlood(_local2, _root.arrowBlood);
_local2.gotoAndStop("kill");
_local2.bKill = true;
}
}
for (var _local7 in mcHelper) {
var _local3 = mcHelper[_local7];
var _local4 = _local2.hitTest(_local3);
if (_local4) {
if (!_local2.bKill) {
_local3.lossBlood();
_local2.gotoAndStop("kill");
_local2.bKill = true;
}
}
}
}
}
var df = (new flash.filters.DropShadowFilter(5, 90, 0, 0.3, 5, 5));
levelInit();
hideMouse();
aFun = new Array("arrowMv");
aEnemy = new Array();
killer = null;
enemyNum = 0;
maxBownam = 6;
nBownam = 0;
aColor = new Array();
aColor.push([1]);
aColor.push([2]);
aColor.push([3]);
aColor.push([4]);
aColor.push([1, 2]);
aColor.push([1, 2]);
aColor.push([1, 2]);
aColor.push([1, 2]);
aColor.push([1, 2]);
aColor.push([1, 2, 3]);
aColor.push([1, 2, 3]);
aColor.push([2, 3]);
aColor.push([2, 3, 4]);
aColor.push([2, 3, 4]);
aColor.push([2, 3, 4]);
aColor.push([3, 4]);
aColor.push([3, 4]);
aColor.push([3, 4]);
aColor.push([3, 4]);
aColor.push([4]);
aCOdds = new Array();
aCOdds.push([1]);
aCOdds.push([1]);
aCOdds.push([1]);
aCOdds.push([1]);
aCOdds.push([1, 2]);
aCOdds.push([0.8, 0.2]);
aCOdds.push([0.7, 0.3]);
aCOdds.push([0.6, 0.4]);
aCOdds.push([0.5, 0.5]);
aCOdds.push([0.2, 0.6, 0.2]);
aCOdds.push([0.1, 0.5, 0.4]);
aCOdds.push([0.5, 0.5]);
aCOdds.push([0.4, 0.5, 0.1]);
aCOdds.push([0.3, 0.5, 0.2]);
aCOdds.push([0.2, 0.5, 0.3]);
aCOdds.push([0.5, 0.5]);
aCOdds.push([0.4, 0.6]);
aCOdds.push([0.3, 0.7]);
aCOdds.push([0.2, 0.8]);
aCOdds.push([1]);
aEOdds = new Array();
aEOdds.push([0.5, 0.5]);
aEOdds.push([0.4, 0.4, 0.2]);
aEOdds.push([0.3, 0.4, 0.3]);
aEOdds.push([0.2, 0.3, 0.3, 0.2]);
aEOdds.push([0.2, 0.3, 0.3, 0.2]);
aEOdds.push([0.2, 0.3, 0.3, 0.2]);
aEOdds.push([0.2, 0.3, 0.3, 0.2]);
aEOdds.push([0.2, 0.3, 0.3, 0.2]);
aEOdds.push([0.2, 0.2, 0.3, 0.3]);
aEOdds.push([0.2, 0.2, 0.3, 0.3]);
aEOdds.push([0.2, 0.2, 0.3, 0.3]);
aEOdds.push([0.2, 0.2, 0.3, 0.3]);
aEOdds.push([0.2, 0.2, 0.3, 0.3]);
aEOdds.push([0.2, 0.2, 0.3, 0.3]);
aEOdds.push([0.2, 0.2, 0.3, 0.3]);
aEOdds.push([0.15, 0.2, 0.3, 0.35]);
aEOdds.push([0.15, 0.1, 0.4, 0.35]);
aEOdds.push([0.15, 0.1, 0.4, 0.35]);
aEOdds.push([0.15, 0.1, 0.4, 0.35]);
aEOdds.push([0.15, 0.1, 0.4, 0.35]);
initColorFun();
stAddEnemy();
var t1 = (1000 - (_root.nLevel * 50));
var t2 = (1000 - (_root.nLevel * 50));
if (t1 <= 300) {
t1 = 400;
}
if (t2 <= 100) {
t1 = 200;
}
var aHelperCoord = new Array([90, 2], [130, 1], [170, 2], [210, 1], [250, 2], [290, 1], [335, 2], [380, 1], [422, 2], [465, 1], [505, 2]);
var aHelper = new Array();
initHelper();
var arrowV = 10;
Symbol 1228 MovieClip Frame 1
stop();
Symbol 1292 MovieClip Frame 340
_root.play();
Symbol 1295 Button
on (release) {
gotoAndPlay (7);
}
Symbol 1325 Button
on (release) {
_root.gameStart();
}
Symbol 1326 Button
on (release) {
turnTo("instructions");
}
Symbol 1327 Button
on (release) {
viewHighscore();
}
Symbol 1328 MovieClip Frame 73
stop();
btPlay.onPress = function () {
_root.gameStart();
};
btInstructions.onPress = function () {
turnTo("instructions");
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btSetting.onPress = function () {
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 1331 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", _blank);
}
Symbol 1335 Button
on (release) {
gotoAndPlay ("credits_frame");
}
Symbol 1349 Button
on (release) {
bStart = true;
this.gotoAndPlay("skip");
}
Symbol 1368 MovieClip Frame 66
stop();
Symbol 1371 MovieClip Frame 15
stop();
Symbol 1372 MovieClip Frame 467
function randLine2() {
var _local1 = 0;
var _local4 = aPoint.length;
var _local3 = 0;
var _local2 = 0;
mc.moveTo(x, y);
while (_local1 < (_local4 - 1)) {
x1 = aPoint[_local1][0] + _local3;
y1 = aPoint[_local1][1] + _local2;
x2 = aPoint[_local1 + 1][0] + _local3;
y2 = aPoint[_local1 + 1][1] + _local2;
randLine(mc, x1, y1, x2, y2, 5);
randLine(mc, x1, y1, x2, y2, 15);
_local1++;
}
}
function randLine(_mc, x1, y1, x2, y2, d) {
var _local5 = _mc;
var _local7 = x2 - x1;
var _local6 = y2 - y1;
var _local11 = getL3(_local7, _local6);
var _local8 = floor(_local11 / d);
_local7 = _local7 / _local8;
_local6 = _local6 / _local8;
_local5.moveTo(x1, y1);
_local5.lineStyle(1, 16777215);
var _local1 = 1;
while (_local1 < _local8) {
var _local3 = (x1 + (_local7 * _local1)) + ((rand() - 0.5) * d);
var _local2 = (y1 + (_local6 * _local1)) + ((rand() - 0.5) * d);
_local5.lineTo(_local3, _local2);
_local1++;
}
_local5.lineTo(x2, y2);
}
function onEnterFrame() {
mc.clear();
randLine2();
}
var aPoint = new Array([443, 61], [404, 38], [342.6, 48], [336, 105], [386, 111], [428, 80]);
mc.lineStyle(1, 16777215);
Symbol 1372 MovieClip Frame 535
delete this.onEnterFrame;
kill(mc);
Symbol 1372 MovieClip Frame 585
if (bStart) {
turnTo("init_game");
} else {
gotoAndPlay (1);
}
Symbol 1373 Button
on (release) {
turnTo("main_menu");
}
Symbol 1377 MovieClip Frame 1
randPlay(this);
Symbol 1381 MovieClip Frame 1
randPlay(this);
Symbol 1388 Button
on (release) {
_root.gotoAndPlay("main_menu");
}
Symbol 1390 MovieClip Frame 15
stop();
Symbol 1400 MovieClip Frame 15
stop();