Frame 1
musicOn = true;
play();
Frame 2
stop();
Loading.checkLoadProgress(this, loadBar_mc, "title");
function fnInit() {
if (!BGPanel.getInited()) {
BGPanel.init(mgObjHolder_mc);
}
if (!BGPanel.getInited()) {
FarBGPanel.init(bgObjHolder_mc);
}
if (!Dragon.getInited()) {
Dragon.init(dragon_mc, bonusDisplay_mc, dragonXMin_mc._x, dragonXMax_mc._x, dragonYMin_mc._y, dragonYMax_mc._y);
}
Dragon.resetForLevel();
if (!GameControl.getInited()) {
GameControl.init(this, msgs_mc, pausePlayToggle_mc, quitBtn_mc, submitHS_mc, endDelay_mc);
}
GameControl.setOnGameScreen(true);
if (!GameStats.getInited()) {
GameStats.init(this, score_txt, time_txt, damageDisplay_mc);
}
GameStats.displayDamage();
GameStats.displayScore();
GameStats.displayTime();
if (!Help.getInited()) {
Help.init(helpBtn_mc, msgs_mc);
}
if (!LevelMaker.getInited()) {
LevelMaker.init(bgObjHolder_mc, mgObjHolder_mc, inBtwnObjHolder_mc, fgObjHolder_mc, staticFg_mc);
}
LevelMaker.makeNew();
if (!Scroller.getInited()) {
Scroller.init(fastScroll_mc, dragonLeftLock_mc._x, dragonRightLock_mc._x);
}
if (Help.needHelp()) {
Help.displayHelp();
} else {
GameControl.resumeGame();
}
}
function fsdPlayAgain() {
GameControl.playAgain();
}
var eventID = "jetix_prmf_battleworms";
var playerScore;
System.security.allowDomain("www.disney.go.com");
System.security.allowDomain("disney.go.com");
System.security.allowDomain("psc.disney.go.com");
System.security.allowDomain("apsc.disney.go.com");
System.security.allowDomain("scores.disney.go.com");
Frame 3
mu = new Sound(AudioIntroMusic_MC);
mu.attachSound("introMusic");
mu.setVolume(40);
if (musicOn) {
mu.start(0, 999);
}
stop();
start_btn.onRelease = function () {
gotoAndStop ("intro");
};
Frame 5
GameStats.resetForNewGame();
stop();
instructions_btn.onRelease = function () {
gotoAndStop ("base");
};
start_btn.onRelease = function () {
Help.skipHelp();
gotoAndStop ("base");
};
Frame 8
junk = new Sound();
junk.attachSound("");
junk.setVolume(100);
mu.stop();
mu = new Sound(AudioMainMusic_MC);
mu.attachSound("mainMusic");
mu.setVolume(65);
if (musicOn) {
mu.start(0, 999);
}
fnInit();
stop();
Frame 13
AudioMusicEnd_MC.gotoAndPlay("goodEnd");
stop();
Frame 18
AudioMusicEnd_MC.gotoAndPlay("badEnd");
stop();
Symbol 98 MovieClip [scrolling_burnedHut] Frame 2
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 28
stop();
Symbol 1818 MovieClip [__Packages.Loading] Frame 0
class Loading
{
static var TARGET, LOADBAR, LOADED_FRAME;
function Loading () {
}
static function checkLoadProgress(target, loadBarClip, loadedFrame) {
TARGET = target;
LOADBAR = loadBarClip;
LOADED_FRAME = loadedFrame;
TARGET.onEnterFrame = function () {
var _local2 = this.getBytesLoaded();
var _local3 = this.getBytesTotal();
var _local4 = Loading.LOADBAR._totalframes - 1;
var _local5 = 1 + Math.floor((_local2 * _local4) / _local3);
Loading.LOADBAR.gotoAndStop(_local5);
if (_local2 == _local3) {
this.gotoAndStop(Loading.LOADED_FRAME);
this.onEnterFrame = function () {
};
}
};
}
}
Symbol 1819 MovieClip [__Packages.GameControl] Frame 0
class GameControl
{
static var MSGS_CLIP, QUIT_BTN_CLIP, MAIN, PAUSE_PLAY_TOGGLE, SUBMIT_SCORE_CLIP, DELAY_CLIP;
function GameControl () {
}
static function changeLevel() {
clearCurrentLevel();
setUpNextLevel();
}
static function clearCurrentLevel() {
LevelMaker.clearAll();
Scroller.clearAll();
}
static function clickQuitBtn() {
pauseGame();
MSGS_CLIP.gotoAndStop("quit_dialog");
QUIT_BTN_CLIP.gotoAndStop("disabled");
quitDialogShowing = true;
if (Help.getHelpShowing()) {
Help.enableHelpBtn();
}
}
static function completeLevel() {
Dragon.pauseMe();
Scroller.pauseMe();
GameStats.pauseTimer();
if (GameStats.getLevel() == GameStats.getMaxLevels()) {
if ((GameStats.getVillagersRescued() == 0) && (GameStats.getScore() == 0)) {
GameStats.setGameWon(false);
} else {
GameStats.calculateBonusPoints();
GameStats.setGameWon(true);
}
fireIris();
} else {
inLevelTrans = true;
MSGS_CLIP.gotoAndPlay("end_lev_" + GameStats.getLevel());
}
}
static function cutToEndScreen() {
endTransition = false;
clearCurrentLevel();
if (GameStats.getGameWon()) {
MAIN.gotoAndStop("win");
} else {
MAIN.gotoAndStop("lose");
}
setOnGameScreen(false);
}
static function enableQuitBtn() {
QUIT_BTN_CLIP.gotoAndStop("active");
quitDialogShowing = false;
}
static function endLevel1Intro() {
MSGS_CLIP.gotoAndStop("base");
inLevelTrans = false;
resumeGame();
}
static function endLevelTrans() {
MSGS_CLIP.gotoAndStop("base");
inLevelTrans = false;
resumeGame();
}
static function fireIris() {
if (GameStats.getGameWon()) {
MAIN.iris_mc.gotoAndPlay("win");
} else {
MAIN.iris_mc.gotoAndPlay("lose");
}
endTransition = true;
}
static function getGameOn() {
return(gameOn);
}
static function getInited() {
return(inited);
}
static function getQuitDialogShowing() {
return(quitDialogShowing);
}
static function init(main, msgsClip, pausePlayToggle, quitBtnClip, submitScoreClip, delayClip) {
MAIN = main;
MSGS_CLIP = msgsClip;
PAUSE_PLAY_TOGGLE = pausePlayToggle;
QUIT_BTN_CLIP = quitBtnClip;
SUBMIT_SCORE_CLIP = submitScoreClip;
DELAY_CLIP = delayClip;
}
static function jumpToLevel(newlev) {
pauseGame();
clearCurrentLevel();
GameStats.setLevel(newlev);
if (newlev == 1) {
level1IntroSeen = false;
}
SUBMIT_SCORE_CLIP.gotoAndStop("base");
MAIN.fnInit();
MAIN.levelChange_mc.gotoAndStop("lev" + newlev);
}
static function pauseGame() {
gameOn = false;
Dragon.pauseMe();
Scroller.pauseMe();
GameStats.pauseTimer();
PAUSE_PLAY_TOGGLE.gotoAndStop("game_off");
if (inLevelTrans) {
MSGS_CLIP.stop();
if (levelTransResumeFrame == null) {
levelTransResumeFrame = MSGS_CLIP._currentframe;
}
}
}
static function playAgain() {
level1IntroSeen = false;
if (onGameScreen) {
clearCurrentLevel();
}
GameStats.resetForNewGame();
SUBMIT_SCORE_CLIP.gotoAndStop("base");
if (onGameScreen) {
MAIN.fnInit();
} else {
MAIN.gotoAndStop("base");
}
}
static function resumeGame() {
if (inLevelTrans) {
MSGS_CLIP.gotoAndPlay(levelTransResumeFrame);
levelTransResumeFrame = null;
} else if (level1IntroSeen) {
MSGS_CLIP.gotoAndStop("base");
Scroller.resumeMe();
GameStats.resumeTimer();
Dragon.resumeMe();
} else {
inLevelTrans = true;
level1IntroSeen = true;
MSGS_CLIP.gotoAndPlay("intro_lev1");
}
if (!Help.getViewed()) {
Help.setViewed(true);
}
if (Help.getHelpShowing()) {
Help.enableHelpBtn();
}
if (quitDialogShowing) {
enableQuitBtn();
}
PAUSE_PLAY_TOGGLE.gotoAndStop("game_on");
gameOn = true;
}
static function setOnGameScreen(val) {
onGameScreen = val;
}
static function setUpNextLevel() {
Dragon.resetForLevel();
GameStats.nextLevel();
LevelMaker.makeNew();
}
static function submitScore() {
SUBMIT_SCORE_CLIP.gotoAndStop("submit");
if (onGameScreen) {
MSGS_CLIP.gotoAndStop("base");
}
}
static function tooMuchDamage() {
_root.AudioSFX2_MC.gotoAndPlay("eog");
Dragon.pauseMe();
Scroller.pauseMe();
GameStats.pauseTimer();
DELAY_CLIP.gotoAndPlay("go");
}
static var endTransition = false;
static var gameOn = false;
static var inited = false;
static var inLevelTrans = false;
static var level1IntroSeen = false;
static var levelTransResumeFrame = null;
static var onGameScreen = false;
static var quitDialogShowing = false;
}
Symbol 1820 MovieClip [__Packages.LevelMaker] Frame 0
class LevelMaker
{
static var objCount, FG_HOLDER_CLIP, leftDist, rightDist, BG_HOLDER_CLIP, MG_HOLDER_CLIP, INBTWN_HOLDER_CLIP, STATIC_FG_CLIP, obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10, obj11, obj12, obj13, obj14, obj15, obj16, obj17, obj18, obj19, obj20, obj21, obj22, obj23, obj24, obj25, obj26, obj27, obj28, obj29, obj30, obj31, obj32, obj33, obj34, obj35, obj36, obj37, obj38, obj39, obj40, obj41, obj42, obj43, obj44, obj45, obj46, obj47, obj48, obj49, obj50, obj51, obj52, obj53, obj54, obj55, obj56, obj57, obj58, obj59, obj60, obj61, obj62, obj63, obj64, obj65, obj66, obj67, obj68, obj69, obj70, obj71, obj72, obj73, obj74, obj75, obj76, obj77, obj78, obj79, obj80, obj81, obj82, obj83, obj84, obj85, obj86, obj87, obj88, obj89, obj90, obj91, obj92, obj93, obj94, obj95, obj96, obj97, obj98, obj99, obj100, obj101, obj102, obj103, obj104, obj105, obj106, obj107, obj108, obj109, obj110, obj111, obj112, obj113, obj114, obj115, obj116, obj117, obj118, obj119, obj120, obj121, obj122, obj123, obj124, obj125, obj126, obj127, obj128, obj129, obj130, obj131, obj132, obj133, obj134, obj135, obj136, obj137, obj138, obj139, obj140, obj141, obj142, obj143, obj144, obj145, obj146, obj147, obj148, obj149, obj150, obj151, obj152, obj153, obj154, obj155, obj156, obj157, obj158, obj159, obj160;
function LevelMaker () {
}
static function addFireball(dir, globalCoordsObj) {
objCount++;
LevelMaker["obj" + objCount] = new Fireball(FG_HOLDER_CLIP, globalCoordsObj.x + leftDist, globalCoordsObj.y, "obj" + String(objCount), dir);
objs_array.push(LevelMaker["obj" + objCount]);
}
static function addHorizLaser(dir, globalCoordsObj) {
objCount++;
LevelMaker["obj" + objCount] = new HorizLaser(FG_HOLDER_CLIP, globalCoordsObj.x + leftDist, globalCoordsObj.y, "obj" + String(objCount), dir);
objs_array.push(LevelMaker["obj" + objCount]);
}
static function addToOffScreenArray(obj, side) {
if (side == "left") {
offScreenLeftObjs_array.push(obj);
} else {
offScreenRightObjs_array.push(obj);
}
}
static function bgPanelMovedOffScreen(panelObj) {
var _local1 = 0;
_local1 = 0;
while (_local1 < bgPanels_array.length) {
if (bgPanels_array[_local1] == panelObj) {
var _local2 = panelObj.getClipDepth();
panelObj.removeClip();
delete LevelMaker["bgPanel" + _local2];
bgPanels_array.splice(_local1, 1);
break;
}
_local1++;
}
}
static function checkForNewClips(shiftDir) {
var _local2;
var _local1 = 0;
if (shiftDir == "left") {
_local1 = 0;
while (_local1 < offScreenRightObjs_array.length) {
_local2 = offScreenRightObjs_array[_local1];
if (_local2.canCreateClip(leftDist, rightDist)) {
_local2.createClip();
offScreenRightObjs_array.splice(_local1, 1);
_local1--;
}
_local1++;
}
} else {
_local1 = 0;
while (_local1 < offScreenLeftObjs_array.length) {
_local2 = offScreenLeftObjs_array[_local1];
if (_local2.canCreateClip(leftDist, rightDist)) {
_local2.createClip();
offScreenLeftObjs_array.splice(_local1, 1);
_local1--;
}
_local1++;
}
}
}
static function clearAll() {
var _local1 = 0;
var _local2;
var _local3;
_local1 = 0;
while (_local1 < bgPanels_array.length) {
_local2 = bgPanels_array[_local1];
_local3 = _local2.getClipDepth();
_local2.removeClip();
delete LevelMaker["bgPanel" + _local3];
_local1++;
}
bgPanels_array.splice(0);
bgPanelOrder_array.splice(0);
_local1 = 0;
while (_local1 < farBgPanels_array.length) {
_local2 = farBgPanels_array[_local1];
_local3 = _local2.getClipDepth();
_local2.removeClip();
delete LevelMaker["bgPanel" + _local3];
_local1++;
}
farBgPanels_array.splice(0);
farBgPanelOrder_array.splice(0);
var _local4;
_local1 = 0;
while (_local1 < objs_array.length) {
_local2 = objs_array[_local1];
_local4 = _local2.getLevelMakerRefName();
_local2.removeClip();
delete LevelMaker[_local4];
_local1++;
}
objs_array.splice(0);
offScreenLeftObjs_array.splice(0);
offScreenRightObjs_array.splice(0);
}
static function createNewBGPanel(side) {
if (side == "right") {
var _local2 = bgPanels_array[bgPanels_array.length - 1].getPanelOrderIndex();
var _local1 = _local2 + 1;
if (_local1 == (bgPanelOrder_array.length - 1)) {
var _local3 = "end";
} else {
var _local3 = "middle";
}
LevelMaker["bgPanel" + (_local1 + 1)] = new BGPanel(bgPanelOrder_array[_local1], _local1, _local3, false, "right");
bgPanels_array.push(LevelMaker["bgPanel" + (_local1 + 1)]);
} else {
var _local2 = bgPanels_array[0].getPanelOrderIndex();
var _local1 = _local2 - 1;
if (_local1 == 0) {
var _local3 = "start";
} else {
var _local3 = "middle";
}
LevelMaker["bgPanel" + (_local1 + 1)] = new BGPanel(bgPanelOrder_array[_local1], _local1, _local3, false, "left");
bgPanels_array.unshift(LevelMaker["bgPanel" + (_local1 + 1)]);
}
}
static function createNewFarBGPanel(side) {
if (side == "right") {
var _local2 = farBgPanels_array[farBgPanels_array.length - 1].getPanelOrderIndex();
var _local1 = _local2 + 1;
if (_local1 == (farBgPanelOrder_array.length - 1)) {
var _local3 = "end";
} else {
var _local3 = "middle";
}
LevelMaker["farBgPanel" + (_local1 + 1)] = new FarBGPanel(farBgPanelOrder_array[_local1], _local1, _local3, false, "right");
farBgPanels_array.push(LevelMaker["farBgPanel" + (_local1 + 1)]);
} else {
var _local2 = farBgPanels_array[0].getPanelOrderIndex();
var _local1 = _local2 - 1;
if (_local1 == 0) {
var _local3 = "start";
} else {
var _local3 = "middle";
}
LevelMaker["farBgPanel" + (_local1 + 1)] = new FarBGPanel(farBgPanelOrder_array[_local1], _local1, _local3, false, "left");
farBgPanels_array.unshift(LevelMaker["farBgPanel" + (_local1 + 1)]);
}
}
static function farBgPanelMovedOffScreen(panelObj) {
var _local1 = 0;
_local1 = 0;
while (_local1 < farBgPanels_array.length) {
if (farBgPanels_array[_local1] == panelObj) {
var _local2 = panelObj.getClipDepth();
panelObj.removeClip();
delete LevelMaker["farBgPanel" + _local2];
farBgPanels_array.splice(_local1, 1);
break;
}
_local1++;
}
}
static function getBGPanelsArrayLength() {
return(bgPanels_array.length);
}
static function getBGPanelViaIndex(index) {
return(bgPanels_array[index]);
}
static function getFarBGPanelsArrayLength() {
return(farBgPanels_array.length);
}
static function getFarBGPanelViaIndex(index) {
return(farBgPanels_array[index]);
}
static function getInited() {
return(inited);
}
static function getLeftDist() {
return(leftDist);
}
static function getRightDist() {
return(rightDist);
}
static function init(bgObjClip, mgObjClip, inBtwnClip, fgObjClip, staticFgClip) {
BG_HOLDER_CLIP = bgObjClip;
MG_HOLDER_CLIP = mgObjClip;
INBTWN_HOLDER_CLIP = inBtwnClip;
FG_HOLDER_CLIP = fgObjClip;
STATIC_FG_CLIP = staticFgClip;
}
static function makeLevel1() {
bgPanelOrder_array.push("bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1");
bgPanelOrder_array.push("bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1");
bgPanelOrder_array.push("bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1", "bg1_lev1");
farBgPanelOrder_array.push("farBg1_lev1", "farBg1_lev1", "farBg1_lev1", "farBg1_lev1", "farBg1_lev1");
farBgPanelOrder_array.push("farBg1_lev1", "farBg1_lev1", "farBg1_lev1", "farBg1_lev1", "farBg1_lev1");
farBgPanelOrder_array.push("farBg1_lev1", "farBg1_lev1", "farBg1_lev1");
obj1 = new GroundFreeVillager(MG_HOLDER_CLIP, 87, 321, "obj1");
obj2 = new GroundFreeVillager(MG_HOLDER_CLIP, 317, 321, "obj2");
obj3 = new TreePlatform(MG_HOLDER_CLIP, 449, 296, "obj3", "1", "mid");
obj4 = new GroundWormVillager(MG_HOLDER_CLIP, 543, 329, "obj4");
obj5 = new GroundWormLaser(FG_HOLDER_CLIP, 543, 329, "obj5", obj4);
obj6 = new GroundFreeVillager(MG_HOLDER_CLIP, 640, 312, "obj6");
obj7 = new GroundFreeVillager(MG_HOLDER_CLIP, 757, 330, "obj7");
obj8 = new TreePlatform(MG_HOLDER_CLIP, 859, 308, "obj8", "1", "high");
obj9 = new GroundWormVillager(MG_HOLDER_CLIP, 989, 302, "obj9");
obj10 = new GroundWormLaser(FG_HOLDER_CLIP, 989, 302, "obj10", obj9);
obj11 = new TreePlatform(MG_HOLDER_CLIP, 1113, 308, "obj11", "1", "mid");
obj12 = new GroundWormVillager(MG_HOLDER_CLIP, 1219, 319, "obj12");
obj13 = new GroundWormLaser(FG_HOLDER_CLIP, 1219, 319, "obj13", obj12);
obj14 = new HealthKit(MG_HOLDER_CLIP, 1314, 91, "obj14");
obj15 = new GroundFreeVillager(MG_HOLDER_CLIP, 1330, 328, "obj15");
obj16 = new TreePlatform(MG_HOLDER_CLIP, 1453, 311, "obj16", "1", "low");
obj17 = new GroundFreeVillager(MG_HOLDER_CLIP, 1550, 328, "obj17");
obj18 = new GroundWormVillager(MG_HOLDER_CLIP, 1689, 318, "obj18");
obj19 = new GroundWormLaser(FG_HOLDER_CLIP, 1689, 318, "obj19", obj18);
obj20 = new TreePlatform(MG_HOLDER_CLIP, 1814, 313, "obj20", "1", "mid");
obj21 = new GroundFreeVillager(MG_HOLDER_CLIP, 1900, 335, "obj21");
obj22 = new TreePlatform(MG_HOLDER_CLIP, 1984, 309, "obj22", "1", "high");
obj23 = new GroundWormVillager(MG_HOLDER_CLIP, 2092, 329, "obj23");
obj24 = new GroundWormLaser(FG_HOLDER_CLIP, 2092, 329, "obj24", obj23);
obj25 = new GroundWormVillager(MG_HOLDER_CLIP, 2238, 326, "obj25");
obj26 = new GroundWormLaser(FG_HOLDER_CLIP, 2238, 326, "obj26", obj25);
obj27 = new TreePlatform(MG_HOLDER_CLIP, 2366, 308, "obj27", "1", "low");
obj28 = new GroundFreeVillager(MG_HOLDER_CLIP, 2449, 333, "obj28");
obj29 = new GroundWormVillager(MG_HOLDER_CLIP, 2597, 309, "obj29");
obj30 = new GroundWormLaser(FG_HOLDER_CLIP, 2597, 309, "obj30", obj29);
obj31 = new GroundFreeVillager(MG_HOLDER_CLIP, 2719, 339, "obj31");
obj32 = new HealthKit(MG_HOLDER_CLIP, 2799, 192, "obj32");
obj33 = new GroundWormVillager(MG_HOLDER_CLIP, 2895, 339, "obj33");
obj34 = new GroundWormLaser(FG_HOLDER_CLIP, 2895, 339, "obj34", obj33);
obj35 = new TreePlatform(MG_HOLDER_CLIP, 3019, 325, "obj35", "1", "high");
obj36 = new GroundWormVillager(MG_HOLDER_CLIP, 3127, 328, "obj36");
obj37 = new GroundWormLaser(FG_HOLDER_CLIP, 3127, 328, "obj37", obj36);
obj38 = new GroundFreeVillager(MG_HOLDER_CLIP, 3269, 318, "obj38");
obj39 = new InvincibilityBonus(MG_HOLDER_CLIP, 3405, 243, "obj39");
obj40 = new GroundWormVillager(MG_HOLDER_CLIP, 3407, 328, "obj40");
obj41 = new GroundWormLaser(FG_HOLDER_CLIP, 3407, 328, "obj41", obj40);
obj42 = new GroundWormVillager(MG_HOLDER_CLIP, 3497, 328, "obj42");
obj43 = new GroundWormLaser(FG_HOLDER_CLIP, 3497, 328, "obj43", obj42);
obj44 = new GroundFreeVillager(MG_HOLDER_CLIP, 3639, 338, "obj44");
obj45 = new TreePlatform(MG_HOLDER_CLIP, 3764, 308, "obj45", "1", "mid");
obj46 = new GroundFreeVillager(MG_HOLDER_CLIP, 3869, 338, "obj46");
obj47 = new GroundFreeVillager(MG_HOLDER_CLIP, 3993, 311, "obj47");
obj48 = new HealthKit(MG_HOLDER_CLIP, 4013, 111, "obj48");
obj49 = new GroundWormVillager(MG_HOLDER_CLIP, 4107, 308, "obj49");
obj50 = new GroundWormLaser(FG_HOLDER_CLIP, 4107, 308, "obj50", obj49);
obj51 = new GroundFreeVillager(MG_HOLDER_CLIP, 4222, 328, "obj51");
obj52 = new GroundWormVillager(MG_HOLDER_CLIP, 4359, 332, "obj52");
obj53 = new GroundWormLaser(FG_HOLDER_CLIP, 4359, 332, "obj53", obj52);
obj54 = new GroundWormVillager(MG_HOLDER_CLIP, 4486, 301, "obj54");
obj55 = new GroundWormLaser(FG_HOLDER_CLIP, 4486, 301, "obj55", obj54);
obj56 = new GroundFreeVillager(MG_HOLDER_CLIP, 4606, 324, "obj56");
obj57 = new GroundWormVillager(MG_HOLDER_CLIP, 4676, 334, "obj57");
obj58 = new GroundWormLaser(FG_HOLDER_CLIP, 4676, 334, "obj58", obj57);
obj59 = new TreePlatform(MG_HOLDER_CLIP, 4768, 315, "obj59", "1", "high");
obj60 = new GroundFreeVillager(MG_HOLDER_CLIP, 4856, 329, "obj60");
obj61 = new GroundFreeVillager(MG_HOLDER_CLIP, 4950, 309, "obj61");
obj62 = new HealthKit(MG_HOLDER_CLIP, 4990, 229, "obj62");
obj63 = new GroundFreeVillager(MG_HOLDER_CLIP, 5054, 329, "obj63");
obj64 = new TreePlatform(MG_HOLDER_CLIP, 5168, 319, "obj64", "1", "high");
obj65 = new GroundWormVillager(MG_HOLDER_CLIP, 5286, 330, "obj65");
obj66 = new GroundWormLaser(FG_HOLDER_CLIP, 5286, 330, "obj66", obj65);
obj67 = new GroundFreeVillager(MG_HOLDER_CLIP, 5418, 312, "obj67");
obj68 = new GroundWormVillager(MG_HOLDER_CLIP, 5556, 327, "obj68");
obj69 = new GroundWormLaser(FG_HOLDER_CLIP, 5556, 327, "obj69");
obj70 = new TreePlatform(MG_HOLDER_CLIP, 5663, 302, "obj70", "1", "low");
obj71 = new GroundWormVillager(MG_HOLDER_CLIP, 5776, 322, "obj71");
obj72 = new GroundWormLaser(FG_HOLDER_CLIP, 5776, 322, "obj72", obj71);
obj73 = new GroundFreeVillager(MG_HOLDER_CLIP, 5873, 302, "obj73");
obj74 = new HealthKit(MG_HOLDER_CLIP, 5932, 205, "obj74");
obj75 = new GroundFreeVillager(MG_HOLDER_CLIP, 5990, 322, "obj75");
obj76 = new GroundWormVillager(MG_HOLDER_CLIP, 6197, 323, "obj76");
obj77 = new GroundWormLaser(FG_HOLDER_CLIP, 6197, 323, "obj77", obj76);
obj78 = new TreePlatform(MG_HOLDER_CLIP, 6257, 305, "obj78", "1", "mid");
obj79 = new GroundFreeVillager(MG_HOLDER_CLIP, 6327, 333, "obj79");
obj80 = new GroundWormVillager(MG_HOLDER_CLIP, 6455, 313, "obj80");
obj81 = new GroundWormLaser(FG_HOLDER_CLIP, 6455, 313, "obj81", obj80);
obj82 = new GroundWormVillager(MG_HOLDER_CLIP, 6565, 326, "obj82");
obj83 = new GroundWormLaser(FG_HOLDER_CLIP, 6565, 326, "obj83", obj82);
obj84 = new TreePlatform(MG_HOLDER_CLIP, 6670, 312, "obj84", "1", "high");
obj85 = new GroundWormVillager(MG_HOLDER_CLIP, 6745, 328, "obj85");
obj86 = new GroundWormLaser(FG_HOLDER_CLIP, 6745, 328, "obj86", obj85);
obj87 = new GroundFreeVillager(MG_HOLDER_CLIP, 6889, 322, "obj87");
obj88 = new GroundWormVillager(MG_HOLDER_CLIP, 6995, 319, "obj88");
obj89 = new GroundWormLaser(FG_HOLDER_CLIP, 6995, 319, "obj89", obj88);
obj90 = new TreePlatform(MG_HOLDER_CLIP, 7105, 309, "obj90", "1", "mid");
obj91 = new GroundWormVillager(MG_HOLDER_CLIP, 7186, 327, "obj91");
obj92 = new GroundWormLaser(FG_HOLDER_CLIP, 7186, 327, "obj92", obj91);
obj93 = new TreePlatform(MG_HOLDER_CLIP, 7265, 299, "obj93", "1", "mid");
obj94 = new GroundWormVillager(MG_HOLDER_CLIP, 7346, 323, "obj94");
obj95 = new GroundWormLaser(FG_HOLDER_CLIP, 7346, 323, "obj95", obj94);
obj96 = new TreePlatform(MG_HOLDER_CLIP, 7418, 311, "obj96", "1", "mid");
obj97 = new GroundWormVillager(MG_HOLDER_CLIP, 7515, 330, "obj97");
obj98 = new GroundWormLaser(FG_HOLDER_CLIP, 7515, 330, "obj98", obj97);
obj99 = new GroundFreeVillager(MG_HOLDER_CLIP, 7603, 314, "obj99");
obj100 = new GroundFreeVillager(MG_HOLDER_CLIP, 7732, 332, "obj100");
obj101 = new TreePlatform(MG_HOLDER_CLIP, 7865, 308, "obj101", "1", "high");
obj102 = new GroundWormVillager(MG_HOLDER_CLIP, 7930, 330, "obj102");
obj103 = new GroundWormLaser(FG_HOLDER_CLIP, 7930, 330, "obj103", obj102);
obj104 = new TreePlatform(MG_HOLDER_CLIP, 8035, 299, "obj104", "1", "mid");
obj105 = new GroundFreeVillager(MG_HOLDER_CLIP, 8110, 322, "obj105");
obj106 = new TreePlatform(MG_HOLDER_CLIP, 8196, 308, "obj106", "1", "high");
obj107 = new GroundWormVillager(MG_HOLDER_CLIP, 8306, 325, "obj107");
obj108 = new GroundWormLaser(FG_HOLDER_CLIP, 8306, 325, "obj108", obj107);
obj109 = new HealthKit(MG_HOLDER_CLIP, 8422, 242, "obj109");
obj110 = new GroundFreeVillager(MG_HOLDER_CLIP, 8422, 309, "obj110");
obj111 = new GroundFreeVillager(MG_HOLDER_CLIP, 8542, 325, "obj111");
obj112 = new TreePlatform(MG_HOLDER_CLIP, 8646, 308, "obj112", "1", "mid");
obj113 = new GroundWormVillager(MG_HOLDER_CLIP, 8756, 327, "obj113");
obj114 = new GroundWormLaser(FG_HOLDER_CLIP, 8756, 327, "obj114", obj113);
obj115 = new GroundFreeVillager(MG_HOLDER_CLIP, 8912, 309, "obj115");
obj116 = new GroundFreeVillager(MG_HOLDER_CLIP, 9092, 319, "obj116");
obj117 = new GroundWormVillager(MG_HOLDER_CLIP, 9206, 330, "obj117");
obj118 = new GroundWormLaser(FG_HOLDER_CLIP, 9206, 330, "obj118", obj117);
obj119 = new TreePlatform(MG_HOLDER_CLIP, 9266, 316, "obj119", "1", "high");
obj120 = new TreePlatform(MG_HOLDER_CLIP, 9335, 309, "obj120", "1", "mid");
obj121 = new GroundWormVillager(MG_HOLDER_CLIP, 9390, 329, "obj121");
obj122 = new GroundWormLaser(FG_HOLDER_CLIP, 9390, 329, "obj122", obj121);
obj123 = new GroundWormVillager(MG_HOLDER_CLIP, 9480, 319, "obj123");
obj124 = new GroundWormLaser(FG_HOLDER_CLIP, 9480, 319, "obj124", obj123);
obj125 = new HealthKit(MG_HOLDER_CLIP, 9602, 192, "obj125");
obj126 = new GroundFreeVillager(MG_HOLDER_CLIP, 9633, 300, "obj126");
obj127 = new GroundWormVillager(MG_HOLDER_CLIP, 9850, 329, "obj127");
obj128 = new GroundWormLaser(FG_HOLDER_CLIP, 9850, 329, "obj128", obj127);
obj129 = new TreePlatform(MG_HOLDER_CLIP, 9889, 305, "obj129", "1", "high");
obj130 = new GroundFreeVillager(MG_HOLDER_CLIP, 10058, 323, "obj130");
obj131 = new InvincibilityBonus(MG_HOLDER_CLIP, 10163, 297, "obj131");
obj132 = new GroundFreeVillager(MG_HOLDER_CLIP, 10247, 332, "obj132");
obj133 = new TreePlatform(MG_HOLDER_CLIP, 10404, 305, "obj133", "1", "high");
obj134 = new GroundFreeVillager(MG_HOLDER_CLIP, 10502, 328, "obj134");
obj135 = new HealthKit(MG_HOLDER_CLIP, 10586, 74, "obj135");
obj136 = new TreePlatform(MG_HOLDER_CLIP, 10610, 305, "obj136", "1", "low");
obj137 = new GroundWormVillager(MG_HOLDER_CLIP, 10730, 322, "obj137");
obj138 = new GroundWormLaser(FG_HOLDER_CLIP, 10730, 322, "obj138", obj137);
obj139 = new TreePlatform(MG_HOLDER_CLIP, 10862, 309, "obj139", "1", "high");
obj140 = new GroundWormVillager(MG_HOLDER_CLIP, 10970, 325, "obj140");
obj141 = new GroundWormLaser(FG_HOLDER_CLIP, 10970, 325, "obj141", obj140);
obj142 = new TreePlatform(MG_HOLDER_CLIP, 11074, 308, "obj142", "1", "mid");
obj143 = new GroundFreeVillager(MG_HOLDER_CLIP, 11176, 326, "obj143");
obj144 = new HealthKit(MG_HOLDER_CLIP, 11323, 81, "obj144");
obj145 = new GroundWormVillager(MG_HOLDER_CLIP, 11371, 304, "obj145");
obj146 = new GroundWormLaser(FG_HOLDER_CLIP, 11371, 304, "obj146", obj145);
obj147 = new GroundFreeVillager(MG_HOLDER_CLIP, 11544, 309, "obj147");
objCount = 147;
var _local1 = 1;
_local1 = 1;
while (_local1 <= objCount) {
objs_array.push(LevelMaker["obj" + _local1]);
_local1++;
}
}
static function makeLevel2() {
bgPanelOrder_array.push("bg1_lev2", "bg1_lev2", "bg1_lev2", "bg1_lev2", "bg1_lev2", "bg1_lev2");
bgPanelOrder_array.push("bg1_lev2", "bg1_lev2", "bg1_lev2", "bg1_lev2");
farBgPanelOrder_array.push("farBg1_lev2", "farBg1_lev2", "farBg1_lev2", "farBg1_lev2", "farBg1_lev2");
farBgPanelOrder_array.push("farBg1_lev2", "farBg1_lev2", "farBg1_lev2", "farBg1_lev2", "farBg1_lev2");
farBgPanelOrder_array.push("farBg1_lev2", "farBg1_lev2", "farBg1_lev2", "farBg1_lev2", "farBg1_lev2");
farBgPanelOrder_array.push("farBg1_lev2", "farBg1_lev2", "farBg1_lev2", "farBg1_lev2");
obj1 = new BurnedHut(MG_HOLDER_CLIP, 202, 264, "obj1");
obj2 = new GroundFreeVillager(MG_HOLDER_CLIP, 298, 322, "obj2");
obj3 = new TreePlatform(MG_HOLDER_CLIP, 391, 293, "obj3", "2", "high");
obj4 = new HutWormVillager(MG_HOLDER_CLIP, 514, 325, "obj4");
obj5 = new HutWormVillager(MG_HOLDER_CLIP, 670, 307, "obj5");
obj6 = new HealthKit(MG_HOLDER_CLIP, 715, 103, "obj6");
obj7 = new HutWormVillager(MG_HOLDER_CLIP, 831, 269, "obj7");
obj8 = new BurnedHut(MG_HOLDER_CLIP, 934, 289, "obj8");
obj9 = new InvincibilityBonus(MG_HOLDER_CLIP, 989, 177, "obj9");
obj10 = new GroundFreeVillager(MG_HOLDER_CLIP, 1022, 327, "obj10");
obj11 = new TreePlatform(MG_HOLDER_CLIP, 1091, 261, "obj11", "2", "mid");
obj12 = new HutWormVillager(MG_HOLDER_CLIP, 1231, 273, "obj12");
obj13 = new TreePlatform(MG_HOLDER_CLIP, 1349, 275, "obj13", "2", "mid");
obj14 = new HutWormVillager(MG_HOLDER_CLIP, 1492, 311, "obj14");
obj15 = new HealthKit(MG_HOLDER_CLIP, 1586, 188, "obj15");
obj16 = new GroundFreeVillager(MG_HOLDER_CLIP, 1593, 318, "obj16");
obj17 = new GroundFreeVillager(MG_HOLDER_CLIP, 1658, 280, "obj17");
obj18 = new TreePlatform(MG_HOLDER_CLIP, 1941, 300, "obj18", "2", "high");
obj19 = new TreePlatform(MG_HOLDER_CLIP, 2071, 297, "obj19", "2", "mid");
obj20 = new HutWormVillager(MG_HOLDER_CLIP, 2215, 320, "obj20");
obj21 = new HutWormVillager(MG_HOLDER_CLIP, 2437, 295, "obj21");
obj22 = new HealthKit(MG_HOLDER_CLIP, 2490, 108, "obj22");
obj23 = new TreePlatform(MG_HOLDER_CLIP, 2610, 282, "obj23", "2", "mid");
obj24 = new InvincibilityBonus(MG_HOLDER_CLIP, 2753, 99, "obj24");
obj25 = new HutWormVillager(MG_HOLDER_CLIP, 2803, 303, "obj25");
obj26 = new HutWormVillager(MG_HOLDER_CLIP, 2994, 287, "obj26");
obj27 = new InvincibilityBonus(MG_HOLDER_CLIP, 3113, 276, "obj27");
obj28 = new TreePlatform(MG_HOLDER_CLIP, 3222, 279, "obj28", "2", "mid");
obj29 = new GroundFreeVillager(MG_HOLDER_CLIP, 3328, 315, "obj29");
obj30 = new TreePlatform(MG_HOLDER_CLIP, 3382, 289, "obj30", "2", "high");
obj31 = new HutWormVillager(MG_HOLDER_CLIP, 3564, 260, "obj31");
obj32 = new BurnedHut(MG_HOLDER_CLIP, 3670, 274, "obj32");
obj33 = new GroundFreeVillager(MG_HOLDER_CLIP, 3734, 315, "obj33");
obj34 = new TreePlatform(MG_HOLDER_CLIP, 3809, 295, "obj34", "2", "mid");
obj35 = new HealthKit(MG_HOLDER_CLIP, 3920, 88, "obj35");
obj36 = new HutWormVillager(MG_HOLDER_CLIP, 4022, 275, "obj36");
obj37 = new TreePlatform(MG_HOLDER_CLIP, 4147, 257, "obj37", "2", "mid");
obj38 = new GroundFreeVillager(MG_HOLDER_CLIP, 4203, 318, "obj38");
obj39 = new HutWormVillager(MG_HOLDER_CLIP, 4334, 321, "obj39");
obj40 = new HealthKit(MG_HOLDER_CLIP, 4471, 204, "obj40");
obj41 = new TreePlatform(MG_HOLDER_CLIP, 4615, 250, "obj41", "2", "low");
obj42 = new TreePlatform(MG_HOLDER_CLIP, 4778, 296, "obj42", "2", "high");
obj43 = new HutWormVillager(MG_HOLDER_CLIP, 4946, 266, "obj43");
obj44 = new GroundFreeVillager(MG_HOLDER_CLIP, 5001, 327, "obj44");
obj45 = new HutWormVillager(MG_HOLDER_CLIP, 5108, 294, "obj45");
obj46 = new HealthKit(MG_HOLDER_CLIP, 5271, 155, "obj46");
obj47 = new TreePlatform(MG_HOLDER_CLIP, 5406, 297, "obj47", "2", "high");
obj48 = new HutWormVillager(MG_HOLDER_CLIP, 5550, 309, "obj48");
obj49 = new GroundFreeVillager(MG_HOLDER_CLIP, 5675, 319, "obj49");
obj50 = new BurnedHut(MG_HOLDER_CLIP, 5752, 256, "obj50");
obj51 = new GroundWormVillager(MG_HOLDER_CLIP, 5925, 314, "obj51");
obj52 = new GroundWormLaser(FG_HOLDER_CLIP, 5925, 314, "obj52", obj51);
obj53 = new BurnedHut(MG_HOLDER_CLIP, 6002, 264, "obj53");
obj54 = new GroundFreeVillager(MG_HOLDER_CLIP, 6098, 322, "obj54");
obj55 = new TreePlatform(MG_HOLDER_CLIP, 6171, 293, "obj55", "2", "high");
obj56 = new HutWormVillager(MG_HOLDER_CLIP, 6314, 325, "obj56");
obj57 = new TreePlatform(MG_HOLDER_CLIP, 6467, 257, "obj57", "2", "mid");
obj58 = new GroundFreeVillager(MG_HOLDER_CLIP, 6523, 318, "obj58");
obj59 = new HutWormVillager(MG_HOLDER_CLIP, 6654, 321, "obj59");
obj60 = new HealthKit(MG_HOLDER_CLIP, 6760, 94, "obj60");
obj61 = new GroundWormVillager(MG_HOLDER_CLIP, 6794, 288, "obj61");
obj62 = new GroundWormLaser(FG_HOLDER_CLIP, 6794, 288, "obj62", obj61);
obj63 = new TreePlatform(MG_HOLDER_CLIP, 6935, 250, "obj63", "2", "low");
obj64 = new GroundFreeVillager(MG_HOLDER_CLIP, 7026, 283, "obj64");
obj65 = new GroundFreeVillager(MG_HOLDER_CLIP, 7083, 321, "obj65");
obj66 = new GroundWormVillager(MG_HOLDER_CLIP, 7152, 282, "obj66");
obj67 = new GroundWormLaser(FG_HOLDER_CLIP, 7152, 282, "obj67", obj66);
obj68 = new BurnedHut(MG_HOLDER_CLIP, 7261, 300, "obj68");
obj69 = new TreePlatform(MG_HOLDER_CLIP, 7383, 280, "obj69", "2", "mid");
obj70 = new GroundWormVillager(MG_HOLDER_CLIP, 7484, 329, "obj70");
obj71 = new GroundWormLaser(FG_HOLDER_CLIP, 7484, 329, "obj71", obj70);
obj72 = new HutWormVillager(MG_HOLDER_CLIP, 7630, 307, "obj72");
obj73 = new HealthKit(MG_HOLDER_CLIP, 7675, 103, "obj73");
obj74 = new HutWormVillager(MG_HOLDER_CLIP, 7793, 269, "obj74");
obj75 = new BurnedHut(MG_HOLDER_CLIP, 7894, 289, "obj75");
obj76 = new InvincibilityBonus(MG_HOLDER_CLIP, 7949, 177, "obj76");
obj77 = new GroundFreeVillager(MG_HOLDER_CLIP, 7982, 327, "obj77");
obj78 = new TreePlatform(MG_HOLDER_CLIP, 8051, 261, "obj78", "2", "mid");
obj79 = new GroundWormVillager(MG_HOLDER_CLIP, 8181, 318, "obj79");
obj80 = new GroundWormLaser(FG_HOLDER_CLIP, 8181, 318, "obj80", obj79);
obj81 = new TreePlatform(MG_HOLDER_CLIP, 8278, 296, "obj81", "2", "high");
obj82 = new HutWormVillager(MG_HOLDER_CLIP, 8430, 266, "obj82");
obj83 = new GroundFreeVillager(MG_HOLDER_CLIP, 8481, 327, "obj83");
obj84 = new HutWormVillager(MG_HOLDER_CLIP, 8588, 294, "obj84");
obj85 = new HealthKit(MG_HOLDER_CLIP, 8681, 156, "obj85");
obj86 = new BurnedHut(MG_HOLDER_CLIP, 8767, 287, "obj86");
obj87 = new InvincibilityBonus(MG_HOLDER_CLIP, 8848, 149, "obj87");
obj88 = new GroundWormVillager(MG_HOLDER_CLIP, 8853, 312, "obj88");
obj89 = new GroundWormLaser(FG_HOLDER_CLIP, 8853, 312, "obj89", obj88);
obj90 = new TreePlatform(MG_HOLDER_CLIP, 8943, 273, "obj90", "2", "low");
obj91 = new GroundWormVillager(MG_HOLDER_CLIP, 9096, 293, "obj91");
obj92 = new GroundWormLaser(FG_HOLDER_CLIP, 9096, 293, "obj92", obj91);
obj93 = new GroundFreeVillager(MG_HOLDER_CLIP, 9155, 339, "obj93");
obj94 = new TreePlatform(MG_HOLDER_CLIP, 9237, 282, "obj94", "2", "mid");
obj95 = new HutWormVillager(MG_HOLDER_CLIP, 9381, 273, "obj95");
obj96 = new TreePlatform(MG_HOLDER_CLIP, 9499, 275, "obj96", "2", "mid");
obj97 = new HutWormVillager(MG_HOLDER_CLIP, 9642, 311, "obj97");
obj98 = new HealthKit(MG_HOLDER_CLIP, 9748, 188, "obj98");
obj99 = new GroundFreeVillager(MG_HOLDER_CLIP, 9753, 318, "obj99");
obj100 = new GroundFreeVillager(MG_HOLDER_CLIP, 9838, 280, "obj100");
obj101 = new GroundWormVillager(MG_HOLDER_CLIP, 9912, 319, "obj101");
obj102 = new GroundWormLaser(FG_HOLDER_CLIP, 9912, 319, "obj102", obj101);
obj103 = new TreePlatform(MG_HOLDER_CLIP, 10036, 297, "obj103", "2", "high");
obj104 = new HutWormVillager(MG_HOLDER_CLIP, 10190, 309, "obj104");
obj105 = new GroundFreeVillager(MG_HOLDER_CLIP, 10315, 319, "obj105");
obj106 = new BurnedHut(MG_HOLDER_CLIP, 10392, 256, "obj106");
obj107 = new HutWormVillager(MG_HOLDER_CLIP, 10540, 282, "obj107");
obj108 = new HealthKit(MG_HOLDER_CLIP, 10553, 92, "obj108");
obj109 = new GroundFreeVillager(MG_HOLDER_CLIP, 10590, 315, "obj109");
obj110 = new InvincibilityBonus(MG_HOLDER_CLIP, 10655, 133, "obj110");
obj111 = new HutWormVillager(MG_HOLDER_CLIP, 10698, 320, "obj111");
obj112 = new TreePlatform(MG_HOLDER_CLIP, 10816, 271, "obj112", "2", "mid");
obj113 = new GroundWormVillager(MG_HOLDER_CLIP, 10882, 324, "obj113");
obj114 = new GroundWormLaser(FG_HOLDER_CLIP, 10882, 324, "obj114", obj113);
obj115 = new HutWormVillager(MG_HOLDER_CLIP, 10993, 291, "obj115");
obj116 = new GroundWormVillager(MG_HOLDER_CLIP, 11087, 317, "obj117");
obj117 = new GroundWormLaser(FG_HOLDER_CLIP, 11087, 317, "obj117", obj116);
obj118 = new TreePlatform(MG_HOLDER_CLIP, 11186, 300, "obj118", "2", "high");
obj119 = new GroundWormVillager(MG_HOLDER_CLIP, 11250, 322, "obj119");
obj120 = new GroundWormLaser(FG_HOLDER_CLIP, 11250, 322, "obj120", obj119);
obj121 = new TreePlatform(MG_HOLDER_CLIP, 11316, 297, "obj121", "2", "mid");
obj122 = new GroundWormVillager(MG_HOLDER_CLIP, 11415, 319, "obj122");
obj123 = new GroundWormLaser(FG_HOLDER_CLIP, 11415, 319, "obj123", obj122);
objCount = 123;
var _local1 = 1;
_local1 = 1;
while (_local1 <= objCount) {
objs_array.push(LevelMaker["obj" + _local1]);
_local1++;
}
}
static function makeLevel3() {
bgPanelOrder_array.push("bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3");
bgPanelOrder_array.push("bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3");
bgPanelOrder_array.push("bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3", "bg1_lev3");
farBgPanelOrder_array.push("farBg1_lev3", "farBg1_lev3", "farBg1_lev3", "farBg1_lev3", "farBg1_lev3");
farBgPanelOrder_array.push("farBg1_lev3", "farBg1_lev3", "farBg1_lev3", "farBg1_lev3", "farBg1_lev3");
farBgPanelOrder_array.push("farBg1_lev3", "farBg1_lev3", "farBg1_lev3", "farBg1_lev3", "farBg1_lev3");
obj1 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 185, 353, "obj1");
obj2 = new TunnelWormLgTop(MG_HOLDER_CLIP, 365, 42, "obj2");
obj3 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 412, 349, "obj3");
obj4 = new Ladder(INBTWN_HOLDER_CLIP, 494, 61, "obj4");
obj5 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 603, 351, "obj5", "left");
obj6 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 626, 46, "obj6");
obj7 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 764, 356, "obj7");
obj8 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 780, 30, "obj8", "left");
obj9 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 823, 30, "obj9", "right");
obj10 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 868, 357, "obj10", "right");
obj11 = new TunnelWormSmTop(MG_HOLDER_CLIP, 968, 38, "obj11");
obj12 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 1025, 356, "obj12");
obj13 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 1052, 38, "obj13");
obj14 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 1124, 24, "obj14");
obj15 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 1129, 351, "obj15");
obj16 = new Ladder(INBTWN_HOLDER_CLIP, 1212, 63, "obj16");
obj17 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 1284, 357, "obj17");
obj18 = new TunnelWormMedTop(MG_HOLDER_CLIP, 1329, 46, "obj18");
obj19 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 1389, 42, "obj19", "right");
obj20 = new HealthKit(MG_HOLDER_CLIP, 1400, 305, "obj20");
obj21 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 1516, 357, "obj21");
obj22 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 1633, 349, "obj22");
obj23 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 1643, 40, "obj23");
obj24 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 1778, 357, "obj24");
obj25 = new InvincibilityBonus(MG_HOLDER_CLIP, 1788, 200, "obj25");
obj26 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 1854, 355, "obj26", "right");
obj27 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 1860, 34, "obj27", "left");
obj28 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 1923, 35, "obj28");
obj29 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 1991, 357, "obj29");
obj30 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 2052, 37, "obj30");
obj31 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 2112, 35, "obj31");
obj32 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 2132, 356, "obj32");
obj33 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 2173, 37, "obj33");
obj34 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 2214, 357, "obj34", "right");
obj35 = new HealthKit(MG_HOLDER_CLIP, 2218, 107, "obj35");
obj36 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 2274, 35, "obj36");
obj37 = new TunnelWormSmTop(MG_HOLDER_CLIP, 2381, 52, "obj37");
obj38 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 2506, 349, "obj38", "left");
obj39 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 2545, 37, "obj39", "right");
obj40 = new HealthKit(MG_HOLDER_CLIP, 2589, 316, "obj40");
obj41 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 2685, 354, "obj41");
obj42 = new TunnelWormMedTop(MG_HOLDER_CLIP, 2765, 49, "obj42");
obj43 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 2767, 358, "obj43");
obj44 = new Ladder(INBTWN_HOLDER_CLIP, 2853, 58, "obj44");
obj45 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 2867, 350, "obj45");
obj46 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 2949, 352, "obj46");
obj47 = new TunnelWormLgTop(MG_HOLDER_CLIP, 3082, 57, "obj47");
obj48 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 3082, 332, "obj48");
obj49 = new Ladder(INBTWN_HOLDER_CLIP, 3191, 60, "obj49");
obj50 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 3262, 348, "obj50");
obj51 = new TunnelWormSmTop(MG_HOLDER_CLIP, 3286, 60, "obj51");
obj52 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 3364, 47, "obj52");
obj53 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 3364, 346, "obj53");
obj54 = new HealthKit(MG_HOLDER_CLIP, 3461, 305, "obj54");
obj55 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 3535, 352, "obj55", "right");
obj56 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 3673, 40, "obj56");
obj57 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 3773, 354, "obj57");
obj58 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 3901, 352, "obj58", "right");
obj59 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 3913, 52, "obj59");
obj60 = new HealthKit(MG_HOLDER_CLIP, 3939, 211, "obj60");
obj61 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 4013, 39, "obj61");
obj62 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 4106, 355, "obj62");
obj63 = new InvincibilityBonus(MG_HOLDER_CLIP, 4206, 264, "obj63");
obj64 = new TunnelWormSmTop(MG_HOLDER_CLIP, 4208, 40, "obj64");
obj65 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 4331, 361, "obj65");
obj66 = new Ladder(INBTWN_HOLDER_CLIP, 4341, 54, "obj66");
obj67 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 4423, 345, "obj67");
obj68 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 4473, 359, "obj68");
obj69 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 4500, 36, "obj69", "right");
obj70 = new HealthKit(MG_HOLDER_CLIP, 4610, 276, "obj70");
obj71 = new TunnelWormLgTop(MG_HOLDER_CLIP, 4626, 46, "obj71");
obj72 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 4713, 345, "obj72");
obj73 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 4733, 52, "obj73");
obj74 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 4816, 40, "obj74");
obj75 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 4828, 349, "obj75");
obj76 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 4937, 354, "obj76", "right");
obj77 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 4962, 39, "obj77", "left");
obj78 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 5053, 40, "obj78");
obj79 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 5095, 354, "obj79", "right");
obj80 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 5159, 52, "obj80");
obj81 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 5376, 34, "obj81");
obj82 = new HealthKit(MG_HOLDER_CLIP, 5446, 293, "obj82");
obj83 = new TunnelWormLgTop(MG_HOLDER_CLIP, 5483, 36, "obj83");
obj84 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 5569, 358, "obj84");
obj85 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 5671, 350, "obj85");
obj86 = new Ladder(INBTWN_HOLDER_CLIP, 5711, 54, "obj86");
obj87 = new HealthKit(MG_HOLDER_CLIP, 5863, 277, "obj87");
obj88 = new TunnelWormSmTop(MG_HOLDER_CLIP, 5929, 47, "obj88");
obj89 = new Ladder(INBTWN_HOLDER_CLIP, 6016, 56, "obj89");
obj90 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 6146, 355, "obj90");
obj91 = new InvincibilityBonus(MG_HOLDER_CLIP, 6170, 92, "obj91");
obj92 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 6250, 353, "obj92");
obj93 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 6335, 36, "obj93");
obj94 = new TunnelWormLgTop(MG_HOLDER_CLIP, 6465, 60, "obj94");
obj95 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 6465, 330, "obj95");
obj96 = new HealthKit(MG_HOLDER_CLIP, 6572, 196, "obj96");
obj97 = new TunnelWormLgTop(MG_HOLDER_CLIP, 6676, 60, "obj97");
obj98 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 6676, 330, "obj98");
obj99 = new HealthKit(MG_HOLDER_CLIP, 6783, 196, "obj99");
obj100 = new TunnelWormLgTop(MG_HOLDER_CLIP, 6887, 60, "obj100");
obj101 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 6887, 330, "obj101");
obj102 = new Ladder(INBTWN_HOLDER_CLIP, 7007, 58, "obj102");
obj103 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 7118, 37, "obj103");
obj104 = new TunnelWormSmTop(MG_HOLDER_CLIP, 7237, 50, "obj104");
obj105 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 7356, 47, "obj105");
obj106 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 7455, 345, "obj106");
obj107 = new HealthKit(MG_HOLDER_CLIP, 7622, 294, "obj107");
obj108 = new Ladder(INBTWN_HOLDER_CLIP, 7777, 54, "obj108");
obj109 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 7803, 359, "obj109");
obj110 = new HealthKit(MG_HOLDER_CLIP, 7854, 294, "obj110");
obj111 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 7929, 359, "obj111");
obj112 = new TunnelWormSmTop(MG_HOLDER_CLIP, 7937, 49, "obj112");
obj113 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 8005, 333, "obj113");
obj114 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 8076, 359, "obj114");
obj115 = new Ladder(INBTWN_HOLDER_CLIP, 8184, 68, "obj115");
obj116 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 8286, 353, "obj116");
obj117 = new InvincibilityBonus(MG_HOLDER_CLIP, 8396, 283, "obj117");
obj118 = new TunnelWormLgTop(MG_HOLDER_CLIP, 8437, 59, "obj118");
obj119 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 8517, 350, "obj119");
obj120 = new HealthKit(MG_HOLDER_CLIP, 8566, 207, "obj120");
obj121 = new TunnelWormSmBtm(MG_HOLDER_CLIP, 8620, 339, "obj121");
obj122 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 8642, 55, "obj122");
obj123 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 8723, 349, "obj123", "right");
obj124 = new VillagerSmallStalactite(MG_HOLDER_CLIP, 8755, 55, "obj124");
obj125 = new TunnelWormLgTop(MG_HOLDER_CLIP, 8905, 44, "obj125");
obj126 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 9054, 348, "obj126");
obj127 = new TunnelWormSmTop(MG_HOLDER_CLIP, 9196, 55, "obj127");
obj128 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 9221, 349, "obj128");
obj129 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 9325, 52, "obj129", "left");
obj130 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 9341, 359, "obj130");
obj131 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 9444, 357, "obj131");
obj132 = new Ladder(INBTWN_HOLDER_CLIP, 9459, 58, "obj132");
obj133 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 9576, 359, "obj133");
obj134 = new TunnelWormSmTop(MG_HOLDER_CLIP, 9625, 38, "obj134");
obj135 = new HealthKit(MG_HOLDER_CLIP, 9638, 319, "obj135");
obj136 = new TunnelWormLgTop(MG_HOLDER_CLIP, 9774, 45, "obj136");
obj137 = new TunnelWormSmBtm(MG_HOLDER_CLIP, 9820, 340, "obj137");
obj138 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 9890, 43, "obj138", "right");
obj139 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 9913, 359, "obj139");
obj140 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 10037, 42, "obj140");
obj141 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 10097, 361, "obj141", "left");
obj142 = new TunnelLoopWormTop(MG_HOLDER_CLIP, 10154, 32, "obj142", "right");
obj143 = new InvincibilityBonus(MG_HOLDER_CLIP, 10171, 141, "obj143");
obj144 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 10177, 359, "obj144");
obj145 = new VillagerLargeStalactite(MG_HOLDER_CLIP, 10323, 40, "obj145");
obj146 = new TunnelLoopWormBtm(MG_HOLDER_CLIP, 10328, 350, "obj146", "left");
obj147 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 10430, 359, "obj147");
obj148 = new Ladder(INBTWN_HOLDER_CLIP, 10556, 63, "obj148");
obj149 = new TunnelWormMedBtm(MG_HOLDER_CLIP, 10606, 361, "obj149");
obj150 = new VillagerSmallStalagmite(MG_HOLDER_CLIP, 10712, 358, "obj150");
obj151 = new TunnelWormLgTop(MG_HOLDER_CLIP, 10753, 33, "obj151");
obj152 = new HealthKit(MG_HOLDER_CLIP, 10753, 302, "obj152");
obj153 = new TunnelWormSmBtm(MG_HOLDER_CLIP, 10852, 360, "obj153");
obj154 = new Ladder(INBTWN_HOLDER_CLIP, 10941, 63, "obj154");
obj155 = new TunnelWormSmTop(MG_HOLDER_CLIP, 11063, 56, "obj155");
obj156 = new VillagerLargeStalagmite(MG_HOLDER_CLIP, 11085, 350, "obj156");
obj157 = new HealthKit(MG_HOLDER_CLIP, 11217, 314, "obj157");
obj158 = new TunnelWormMedTop(MG_HOLDER_CLIP, 11290, 46, "obj158");
obj159 = new TunnelWormLgBtm(MG_HOLDER_CLIP, 11369, 351, "obj159");
obj160 = new Ladder(INBTWN_HOLDER_CLIP, 11390, 61, "obj160");
objCount = 160;
var _local1 = 1;
_local1 = 1;
while (_local1 <= objCount) {
objs_array.push(LevelMaker["obj" + _local1]);
_local1++;
}
}
static function makeNew() {
resetViewableCoords();
var _local2 = GameStats.getLevel();
STATIC_FG_CLIP.gotoAndStop("lev" + _local2);
switch (_local2) {
case 1 :
makeLevel1();
break;
case 2 :
makeLevel2();
break;
default :
makeLevel3();
}
var _local1 = 0;
_local1 = 0;
while (_local1 < objs_array.length) {
if (!objs_array[_local1].getClipExists()) {
addToOffScreenArray(objs_array[_local1], "right");
}
_local1++;
}
renderInitialBGs();
Scroller.pauseActiveObjs();
}
static function renderInitialBGs() {
bgPanels_array.splice(0);
var _local1 = 0;
var _local2;
_local1 = 0;
while (_local1 < bgPanelOrder_array.length) {
switch (_local1) {
case 0 :
_local2 = "start";
break;
case bgPanelOrder_array.length - 1 :
_local2 = "end";
break;
default :
_local2 = "middle";
}
LevelMaker["bgPanel" + (_local1 + 1)] = new BGPanel(bgPanelOrder_array[_local1], _local1, _local2, true, null);
bgPanels_array.push(LevelMaker["bgPanel" + (_local1 + 1)]);
var _local3 = bgPanels_array[_local1].getHolderScopeBoundCoords("right");
if (_local3.x >= BGPanel.getHolderRightBound()) {
break;
}
_local1++;
}
farBgPanels_array.splice(0);
_local1 = 0;
while (_local1 < farBgPanelOrder_array.length) {
switch (_local1) {
case 0 :
_local2 = "start";
break;
case farBgPanelOrder_array.length - 1 :
_local2 = "end";
break;
default :
_local2 = "middle";
}
LevelMaker["farBgPanel" + (_local1 + 1)] = new FarBGPanel(farBgPanelOrder_array[_local1], _local1, _local2, true, null);
farBgPanels_array.push(LevelMaker["farBgPanel" + (_local1 + 1)]);
var _local3 = farBgPanels_array[_local1].getHolderScopeBoundCoords("right");
if (_local3.x >= BGPanel.getHolderRightBound()) {
break;
}
_local1++;
}
}
static function resetViewableCoords() {
var _local1 = new Object();
_local1.x = Dragon.getClipX();
_local1.y = 0;
MG_HOLDER_CLIP.globalToLocal(_local1);
leftDist = -(_local1.x - MG_HOLDER_CLIP.leftBound_mc._x);
rightDist = MG_HOLDER_CLIP.rightBound_mc._x - _local1.x;
}
static function scrollingObjDone(obj) {
var _local1 = 0;
_local1 = 0;
while (_local1 < objs_array.length) {
if (objs_array[_local1] == obj) {
objs_array.splice(_local1, 1);
break;
}
_local1++;
}
if (obj.getBaseClipName() == "groundWormVillager") {
var _local2 = GroundWormVillager(obj).getPartnerObj();
_local2.partnerRemoved();
_local1 = 0;
while (_local1 < objs_array.length) {
if (objs_array[_local1] == _local2) {
objs_array.splice(_local1, 1);
break;
}
_local1++;
}
}
}
static function updateViewableCoords(distChange) {
leftDist = leftDist + distChange;
rightDist = rightDist + distChange;
if (distChange > 0) {
checkForNewClips("left");
} else {
checkForNewClips("right");
}
}
static var bgPanels_array = [];
static var bgPanelOrder_array = [];
static var farBgPanels_array = [];
static var farBgPanelOrder_array = [];
static var inited = false;
static var objs_array = [];
static var offScreenLeftObjs_array = [];
static var offScreenRightObjs_array = [];
}
Symbol 1821 MovieClip [__Packages.ScrollingObj] Frame 0
class ScrollingObj
{
var HOLDER_CLIP, clipExists, xPos, yPos, levelMakerRefName, leftBoundOffset, rightBoundOffset, baseClipName, clip, leftAlignX, clipState, xMin, xMax;
function ScrollingObj (clip, xCoord, yCoord, refName) {
HOLDER_CLIP = clip;
clipExists = false;
xPos = xCoord;
yPos = yCoord;
levelMakerRefName = refName;
setPositionVars();
}
static function getNextDepth() {
if (nextDepth >= MAX_DEPTH) {
nextDepth = RESET_DEPTH;
} else {
nextDepth++;
}
return(nextDepth);
}
function bodyContactWithDragon(laserHitCheck) {
var _local4 = false;
var _local2 = getContactHitClip();
if (_local2) {
var _local3 = Dragon.getHitClip();
if (laserHitCheck) {
_local3 = Dragon.getLaserHitClip();
}
if (_local2.hitTest(_local3)) {
_local4 = true;
}
}
return(_local4);
}
function canCreateClip(leftDist, rightDist) {
var _local2 = false;
if ((xPos - leftBoundOffset) <= rightDist) {
if ((xPos + rightBoundOffset) >= leftDist) {
_local2 = true;
}
}
return(_local2);
}
function canDeflectFireball() {
return(true);
}
function checkCreateClip() {
if (canCreateClip(LevelMaker.getLeftDist(), LevelMaker.getRightDist())) {
createClip();
}
}
function contactWithDragon(laserHitCheck) {
var _local4 = false;
var _local2 = getHitClip();
if (_local2) {
var _local3 = Dragon.getHitClip();
if (laserHitCheck) {
_local3 = Dragon.getLaserHitClip();
}
if (_local2.hitTest(_local3)) {
_local4 = true;
}
}
return(_local4);
}
function createClip() {
var _local2 = getNextDepth();
var _local3 = (baseClipName + "_mc_depth") + _local2;
HOLDER_CLIP.attachMovie("scrolling_" + baseClipName, _local3, _local2);
clip = HOLDER_CLIP[_local3];
clip.objRef = this;
var _local4 = xPos - LevelMaker.getLeftDist();
clip._x = leftAlignX + _local4;
clip._y = yPos;
clipExists = true;
Scroller.addObject(this);
}
function getBaseClipName() {
return(baseClipName);
}
function getClipExists() {
return(clipExists);
}
function getClipState() {
return(clipState);
}
function getClipX() {
return(clip._x);
}
function getContactHitClip() {
var _local2 = null;
if (clip.anim_mc.contactHitArea_mc) {
_local2 = clip.anim_mc.contactHitArea_mc;
}
return(_local2);
}
function getDestroyHitClip() {
var _local2 = null;
if (clip.anim_mc.destroyHitArea_mc) {
_local2 = clip.anim_mc.destroyHitArea_mc;
}
return(_local2);
}
function getHitClip() {
var _local2 = null;
if (clip.hitArea_mc) {
_local2 = clip.hitArea_mc;
} else if (clip.anim_mc.hitArea_mc) {
_local2 = clip.anim_mc.hitArea_mc;
}
return(_local2);
}
function hitByFireball() {
}
function getLevelMakerRefName() {
return(levelMakerRefName);
}
function moveMe(dist) {
var _local2 = true;
clip._x = clip._x + dist;
if (clip._x <= xMin) {
_local2 = false;
removeClip("left");
} else if (clip._x >= xMax) {
_local2 = false;
removeClip("right");
}
return(_local2);
}
function pauseMe() {
}
function removeClip(side) {
clip.removeMovieClip();
clipExists = false;
if (side) {
if (clipState == "empty") {
LevelMaker.scrollingObjDone(this);
} else {
LevelMaker.addToOffScreenArray(this, side);
}
}
}
function resumeMe() {
}
function setPositionVars() {
HOLDER_CLIP.attachMovie("scrolling_" + baseClipName, "test_mc", nextDepth + 1);
var _local2 = HOLDER_CLIP.test_mc.getBounds();
leftBoundOffset = HOLDER_CLIP.test_mc._x - _local2.xMin;
rightBoundOffset = _local2.xMax - HOLDER_CLIP.test_mc._x;
xMin = HOLDER_CLIP.leftBound_mc._x - rightBoundOffset;
xMax = HOLDER_CLIP.rightBound_mc._x + leftBoundOffset;
leftAlignX = HOLDER_CLIP.leftBound_mc._x;
HOLDER_CLIP.test_mc.removeMovieClip();
}
static var MAX_DEPTH = 6000;
static var RESET_DEPTH = 5000;
static var nextDepth = RESET_DEPTH;
}
Symbol 1822 MovieClip [__Packages.Dragon] Frame 0
class Dragon
{
static var dir, injured, CLIP, POWER_UP_DISPLAY_CLIP, currentPowerUp, CLIP_X_MAX, CLIP_X_MIN, motion, passenger, colorObj, CLIP_Y_MIN, CLIP_Y_MAX, clipState;
function Dragon () {
}
static function attack() {
var _local1 = getDragonHeadClip();
_local1.gotoAndPlay("attack");
var _local2 = new Object();
_local2.x = _local1.fireballMarker_mc._x;
_local2.y = _local1.fireballMarker_mc._y;
_local1.localToGlobal(_local2);
LevelMaker.addFireball(dir, _local2);
}
static function beginInjuryTime() {
injured = true;
CLIP.flasher_mc.gotoAndPlay("injury_time");
}
static function destroyWorm() {
GameStats.incrWormsDestroyed();
GameStats.updateScore(Dragon["POINTS_PER_WORM_LEV_" + GameStats.getLevel()]);
}
static function endInjuryTime() {
injured = false;
CLIP.flasher_mc.gotoAndStop("base");
}
static function endPowerUp() {
POWER_UP_DISPLAY_CLIP.gotoAndStop("base");
removeTint();
currentPowerUp = null;
}
static function getClipX() {
return(CLIP._x);
}
static function getClipXMax() {
return(CLIP_X_MAX);
}
static function getClipXMin() {
return(CLIP_X_MIN);
}
static function getCurrentPowerUp() {
return(currentPowerUp);
}
static function getDir() {
return(dir);
}
static function getDragonHeadClip() {
var _local1;
if (CLIP.anim_mc.dragonHead_mc) {
_local1 = CLIP.anim_mc.dragonHead_mc;
} else if (CLIP.anim_mc.subAnim_mc.dragonHead_mc) {
_local1 = CLIP.anim_mc.subAnim_mc.dragonHead_mc;
}
return(_local1);
}
static function getHitClip() {
var _local1 = CLIP;
if (CLIP.hitArea_mc) {
_local1 = CLIP.hitArea_mc;
} else if (CLIP.anim_mc.hitArea_mc) {
_local1 = CLIP.anim_mc.hitArea_mc;
}
return(_local1);
}
static function getLaserHitClip() {
var _local1;
if (CLIP.anim_mc.subAnim_mc.laserHitArea_mc) {
_local1 = CLIP.anim_mc.subAnim_mc.laserHitArea_mc;
} else if (CLIP.anim_mc.laserHitArea_mc) {
_local1 = CLIP.anim_mc.laserHitArea_mc;
}
return(_local1);
}
static function getMotion() {
return(motion);
}
static function getPassengerHitClip() {
var _local1 = CLIP;
if (CLIP.passengerHitArea_mc) {
_local1 = CLIP.passengerHitArea_mc;
} else if (CLIP.anim_mc.passengerHitArea_mc) {
_local1 = CLIP.anim_mc.passengerHitArea_mc;
}
return(_local1);
}
static function getInited() {
return(inited);
}
static function getPassenger() {
return(passenger);
}
static function getVillagerClip() {
var _local1;
if (CLIP.villager_mc) {
_local1 = CLIP.villager_mc;
} else if (CLIP.anim_mc.villager_mc) {
_local1 = CLIP.anim_mc.villager_mc;
}
return(_local1);
}
static function hitByLaser() {
if (currentPowerUp != "invincibility") {
if (!injured) {
beginInjuryTime();
GameStats.updateDamage(DAMAGE_PER_LASER);
}
}
}
static function hitByWorm() {
if (currentPowerUp != "invincibility") {
if (!injured) {
beginInjuryTime();
GameStats.updateDamage(DAMAGE_PER_WORM);
}
}
}
static function init(clip, bonusClip, xMin, xMax, yMin, yMax) {
CLIP = clip;
colorObj = new Color(CLIP);
CLIP_X_MIN = xMin;
CLIP_X_MAX = xMax;
CLIP_Y_MIN = yMin;
CLIP_Y_MAX = yMax;
POWER_UP_DISPLAY_CLIP = bonusClip;
attackKeyListener.onKeyDown = function () {
if (!Dragon.attackKeyPressed) {
if (Key.isDown(32)) {
Dragon.attackKeyPressed = true;
Dragon.attack();
}
}
};
attackKeyListener.onKeyUp = function () {
if (Dragon.attackKeyPressed) {
if (!Key.isDown(32)) {
Dragon.attackKeyPressed = false;
}
}
};
vertMoveKeyListener.onKeyDown = function () {
var _local1 = false;
if (!Dragon.downKeyPressed) {
if (Key.isDown(40)) {
_local1 = true;
Dragon.downKeyPressed = true;
Dragon.startVertMove("down");
}
}
if (!_local1) {
if (!Dragon.upKeyPressed) {
if (Key.isDown(38)) {
Dragon.upKeyPressed = true;
Dragon.startVertMove("up");
}
}
}
};
vertMoveKeyListener.onKeyUp = function () {
var _local1 = false;
if (Dragon.downKeyPressed) {
if (!Key.isDown(40)) {
Dragon.downKeyPressed = false;
_local1 = true;
}
}
if (Dragon.upKeyPressed) {
if (!Key.isDown(38)) {
Dragon.upKeyPressed = false;
_local1 = true;
}
}
if (_local1 == true) {
if ((!Dragon.downKeyPressed) && (!Dragon.upKeyPressed)) {
Dragon.stopVertMove();
}
}
};
inited = true;
}
static function moveClipHorizontally(dist) {
var _local1 = dist;
if (dist < 0) {
if ((CLIP._x + dist) < CLIP_X_MIN) {
_local1 = CLIP_X_MIN - CLIP._x;
if (("idle_" + dir) != clipState) {
motion = "idle";
setClipState("idle_" + dir);
}
}
} else if ((CLIP._x + dist) > CLIP_X_MAX) {
_local1 = CLIP_X_MAX - CLIP._x;
if (("idle_" + dir) != clipState) {
motion = "idle";
setClipState("idle_" + dir);
}
}
CLIP._x = CLIP._x + _local1;
}
static function pauseMe() {
Key.removeListener(attackKeyListener);
Key.removeListener(vertMoveKeyListener);
stopVertMove();
if (CLIP.anim_mc) {
CLIP.anim_mc.stop();
if (CLIP.anim_mc.subAnim_mc) {
if (CLIP.anim_mc.subAnim_mc.animating) {
CLIP.anim_mc.subAnim_mc.stop();
}
}
}
if (injured) {
CLIP.flasher_mc.stop();
}
if (currentPowerUp != null) {
POWER_UP_DISPLAY_CLIP.timer_mc.stop();
}
}
static function pickUpHealthKit(health) {
GameStats.reverseDamage(health);
}
static function pickUpVillager(villagerType) {
passenger = villagerType;
updateVillagerClip();
}
static function powerUp(bonusType) {
POWER_UP_DISPLAY_CLIP.gotoAndStop(bonusType);
POWER_UP_DISPLAY_CLIP.timer_mc.gotoAndPlay(1);
currentPowerUp = bonusType;
if (bonusType == "invincibility") {
CLIP.flasher_mc.gotoAndPlay("invincibility_loop");
}
}
static function releaseVillager() {
passenger = "none";
updateVillagerClip();
GameStats.incrVillagersRescued();
GameStats.updateScore(Dragon["POINTS_PER_VILLAGER_LEV_" + GameStats.getLevel()]);
}
static function removeTint() {
var _local1 = new Object();
_local1.ra = 100;
_local1.rb = 0;
_local1.ga = 100;
_local1.gb = 0;
_local1.ba = 100;
_local1.bb = 0;
_local1.aa = 100;
_local1.ab = 0;
colorObj.setTransform(_local1);
}
static function resetForLevel() {
currentPowerUp = null;
POWER_UP_DISPLAY_CLIP.gotoAndStop("base");
dir = "right";
motion = "idle";
passenger = "none";
updateVillagerClip();
injured = false;
CLIP.flasher_mc.gotoAndStop("base");
CLIP._alpha = 100;
removeTint();
CLIP._x = CLIP_X_MIN;
CLIP._y = CLIP_Y_MIN + ((CLIP_Y_MAX - CLIP_Y_MIN) / 2);
setClipState((motion + "_") + dir);
resetKeyVars();
if (!GameControl.getGameOn()) {
pauseMe();
}
}
static function resetKeyVars() {
attackKeyPressed = false;
downKeyPressed = false;
upKeyPressed = false;
}
static function resumeMe() {
resetKeyVars();
Key.addListener(attackKeyListener);
Key.addListener(vertMoveKeyListener);
if (CLIP.anim_mc) {
CLIP.anim_mc.play();
if (CLIP.anim_mc.subAnim_mc) {
if (CLIP.anim_mc.subAnim_mc.animating) {
CLIP.anim_mc.subAnim_mc.play();
}
}
}
if (injured) {
CLIP.flasher_mc.play();
}
if (currentPowerUp != null) {
POWER_UP_DISPLAY_CLIP.timer_mc.play();
}
}
static function setClipState(newState) {
var _local1 = String(clipState).substring(String(clipState).indexOf("_") + 1);
var _local4 = String(newState).substring(String(newState).indexOf("_") + 1);
var _local3 = String(clipState).substring(0, String(clipState).indexOf("_"));
var _local2 = String(clipState).substring(0, String(clipState).indexOf("_"));
clipState = newState;
if (motion == "idle") {
CLIP.subAnimPlaying = true;
}
CLIP.gotoAndStop(clipState);
if (_local1 != _local4) {
CLIP.anim_mc.subAnim_mc.play();
}
if (_local1 == _local4) {
if (((_local3 == "idle") || (_local2 == "idle")) && (_local3 != _local2)) {
CLIP.anim_mc.subAnim_mc.play();
}
}
}
static function startHorizMove(newDir) {
dir = newDir;
motion = "fly";
setClipState("fly_" + newDir);
}
static function startVertMove(vertDir) {
CLIP.vertDir = vertDir;
CLIP.onEnterFrame = function () {
if (this.vertDir == "up") {
if ((this._y - Dragon.VERT_MOVE_INCR) < Dragon.CLIP_Y_MIN) {
this._y = Dragon.CLIP_Y_MIN;
Dragon.stopVertMove();
} else {
this._y = this._y - Dragon.VERT_MOVE_INCR;
}
} else if ((this._y + Dragon.VERT_MOVE_INCR) > Dragon.CLIP_Y_MAX) {
this._y = Dragon.CLIP_Y_MAX;
Dragon.stopVertMove();
} else {
this._y = this._y + Dragon.VERT_MOVE_INCR;
}
};
}
static function stopHorizMove() {
if ((!downKeyPressed) && (!upKeyPressed)) {
motion = "idle";
if (("idle_" + dir) != clipState) {
setClipState("idle_" + dir);
}
}
}
static function stopVertMove() {
CLIP.vertDir = null;
delete CLIP.onEnterFrame;
}
static function tintForInvincibility() {
var _local1 = new Object();
_local1.ra = 100;
_local1.rb = 102;
_local1.ga = 100;
_local1.gb = 153;
_local1.ba = 100;
_local1.bb = 255;
_local1.aa = 80;
_local1.ab = 0;
colorObj.setTransform(_local1);
}
static function updateVillagerClip() {
var _local1 = getVillagerClip();
_local1.gotoAndStop(passenger);
}
static var DAMAGE_PER_LASER = 20;
static var DAMAGE_PER_WORM = 20;
static var POINTS_PER_VILLAGER_LEV_1 = 175;
static var POINTS_PER_VILLAGER_LEV_2 = 250;
static var POINTS_PER_VILLAGER_LEV_3 = 350;
static var POINTS_PER_WORM_LEV_1 = 50;
static var POINTS_PER_WORM_LEV_2 = 75;
static var POINTS_PER_WORM_LEV_3 = 100;
static var VERT_MOVE_INCR = 9;
static var attackKeyPressed = false;
static var attackKeyListener = new Object();
static var downKeyPressed = false;
static var upKeyPressed = false;
static var vertMoveKeyListener = new Object();
static var inited = false;
}
Symbol 1823 MovieClip [__Packages.GameStats] Frame 0
class GameStats
{
static var bonusPoints, wormsDestroyed, villagersRescued, totalElapsedMs, timeToDisplay, damage, DAMAGE_DISPLAY_CLIP, score, SCORE_TXT, TIME_DISPLAY, attackReady, gameWon, inited, level, MAIN, pastElapsedMs, startTime;
function GameStats () {
}
static function calculateBonusPoints() {
bonusPoints = (villagersRescued * 10) + (wormsDestroyed * 20);
}
static function calculateTimeToDisplay() {
var _local5 = MAX_TIME_PER_LEVEL - totalElapsedMs;
var _local3 = Math.floor(_local5 / 60000);
var _local4 = _local5 % 60000;
var _local1 = Math.floor(_local4 / 1000);
if (_local1 == 0) {
var _local2 = Math.round((_local4 / 1000) * 100);
} else {
var _local2 = Math.round(((_local4 / 1000) % _local1) * 100);
}
if (_local2 == 100) {
_local1++;
var _local2 = 0;
}
if (_local1 == 60) {
_local3++;
_local1 = 0;
}
var _local8 = String(_local3);
if (_local3 < 10) {
_local8 = "0" + String(_local3);
}
var _local7 = String(_local1);
if (_local1 < 10) {
_local7 = "0" + String(_local1);
}
var _local6 = String(_local2);
if (_local2 < 10) {
_local6 = "0" + String(_local2);
}
if (_local1 < 0) {
timeToDisplay = "00:00:00";
} else {
timeToDisplay = (((_local8 + ":") + _local7) + ":") + _local6;
}
if (timeToDisplay == "00:00:00") {
GameControl.completeLevel();
}
}
static function displayDamage() {
if (damage == 0) {
DAMAGE_DISPLAY_CLIP.gotoAndStop(1);
} else if (damage >= MAX_DAMAGE) {
DAMAGE_DISPLAY_CLIP.gotoAndStop(DAMAGE_DISPLAY_CLIP._totalframes);
GameControl.tooMuchDamage();
} else {
var _local1 = 1 + Math.floor((damage * (DAMAGE_DISPLAY_CLIP._totalframes - 1)) / MAX_DAMAGE);
if (_local1 == 1) {
_local1 = 2;
}
DAMAGE_DISPLAY_CLIP.gotoAndStop(_local1);
}
}
static function displayScore() {
SCORE_TXT.text = String(score);
}
static function displayTime() {
TIME_DISPLAY.text = timeToDisplay;
}
static function getAttackReady() {
return(attackReady);
}
static function getGameWon() {
return(gameWon);
}
static function getInited() {
return(inited);
}
static function getLevel() {
return(level);
}
static function getMaxLevels() {
return(MAX_LEVELS);
}
static function getScore() {
return(score);
}
static function getScorePlusBonus() {
var _local1 = score + bonusPoints;
return(_local1);
}
static function getVillagersRescued() {
return(villagersRescued);
}
static function getWormsDestroyed() {
return(wormsDestroyed);
}
static function incrVillagersRescued() {
villagersRescued++;
}
static function incrWormsDestroyed() {
wormsDestroyed++;
}
static function init(main, scoreTxt, timeDisplay, damageClip) {
MAIN = main;
SCORE_TXT = scoreTxt;
TIME_DISPLAY = timeDisplay;
DAMAGE_DISPLAY_CLIP = damageClip;
}
static function nextLevel() {
level++;
resetForNewLevel();
displayDamage();
displayTime();
}
static function pauseTimer() {
delete MAIN.onEnterFrame;
pastElapsedMs = totalElapsedMs;
}
static function resetForNewGame() {
gameWon = false;
level = 1;
bonusPoints = 0;
score = 0;
villagersRescued = 0;
wormsDestroyed = 0;
resetForNewLevel();
}
static function resetForNewLevel() {
attackReady = true;
damage = 0;
pastElapsedMs = 0;
totalElapsedMs = 0;
calculateTimeToDisplay();
}
static function resumeTimer() {
startTime = getTimer();
MAIN.onEnterFrame = function () {
GameStats.totalElapsedMs = (getTimer() - GameStats.startTime) + GameStats.pastElapsedMs;
GameStats.calculateTimeToDisplay();
GameStats.displayTime();
};
}
static function reverseDamage(minusDamage) {
damage = damage - minusDamage;
if (damage < 0) {
damage = 0;
}
displayDamage();
}
static function setGameWon(newval) {
gameWon = newval;
}
static function setLevel(newlev) {
level = newlev;
resetForNewLevel();
displayDamage();
displayTime();
}
static function updateDamage(addDamage) {
damage = damage + addDamage;
displayDamage();
}
static function updateScore(points) {
score = score + points;
displayScore();
}
static var MAX_DAMAGE = 100;
static var MAX_LEVELS = 3;
static var MAX_TIME_PER_LEVEL = 90000;
}
Symbol 1824 MovieClip [__Packages.Scroller] Frame 0
class Scroller
{
static var SCROLLER, DRAGON_LEFT_LOCK_X, DRAGON_RIGHT_LOCK_X, SPEED;
function Scroller () {
}
static function addBGPanel(panel, position) {
if (position == "beginning") {
activeBGPanels_array.unshift(panel);
} else {
activeBGPanels_array.push(panel);
}
}
static function addFarBGPanel(panel, position) {
if (position == "beginning") {
activeFarBGPanels_array.unshift(panel);
} else {
activeFarBGPanels_array.push(panel);
}
}
static function addObject(obj) {
activeObjs_array.push(obj);
}
static function checkHorizMovementKeyPress() {
var _local1 = false;
if (!leftArrowPressed) {
if (Key.isDown(37)) {
_local1 = true;
leftArrowPressed = true;
if (Dragon.getMotion() == "idle") {
Dragon.startHorizMove("left");
}
startHorizMove("left");
}
}
if (!_local1) {
if (!rightArrowPressed) {
if (Key.isDown(39)) {
rightArrowPressed = true;
if (Dragon.getMotion() == "idle") {
Dragon.startHorizMove("right");
}
startHorizMove("right");
}
}
}
}
static function clearAll() {
activeObjs_array.splice(0);
activeBGPanels_array.splice(0);
activeFarBGPanels_array.splice(0);
}
static function getActiveObjsArray() {
return(activeObjs_array);
}
static function getHorizontalMovement() {
var _local1 = false;
if (rightArrowPressed || (leftArrowPressed)) {
_local1 = true;
}
return(_local1);
}
static function getInited() {
return(inited);
}
static function init(scrollerClip, leftLockX, rightLockX) {
SCROLLER = scrollerClip;
DRAGON_LEFT_LOCK_X = leftLockX;
DRAGON_RIGHT_LOCK_X = rightLockX;
horizMoveKeyListener.onKeyDown = function () {
Scroller.checkHorizMovementKeyPress();
};
horizMoveKeyListener.onKeyUp = function () {
if (Scroller.leftArrowPressed) {
if (!Key.isDown(37)) {
Scroller.leftArrowPressed = false;
}
}
if (Scroller.rightArrowPressed) {
if (!Key.isDown(39)) {
Scroller.rightArrowPressed = false;
}
}
if ((!Scroller.leftArrowPressed) && (!Scroller.rightArrowPressed)) {
Scroller.stopHorizMove();
}
};
}
static function killScroller() {
SCROLLER.dir = null;
delete SCROLLER.onEnterFrame;
}
static function moveSceneLeft(dist, rightMostBGPanelObj) {
var _local1 = 0;
_local1 = 0;
while (_local1 < activeBGPanels_array.length) {
activeBGPanels_array[_local1].moveMe(-dist);
_local1++;
}
var _local5 = activeBGPanels_array[0];
if (_local5.getX() < _local5.getXMin()) {
LevelMaker.bgPanelMovedOffScreen(_local5);
activeBGPanels_array.splice(0, 1);
}
if (rightMostBGPanelObj.getOrder() != "end") {
if (rightMostBGPanelObj.getX() < rightMostBGPanelObj.getRightAlignX()) {
LevelMaker.createNewBGPanel("right");
}
}
_local1 = 0;
while (_local1 < activeFarBGPanels_array.length) {
activeFarBGPanels_array[_local1].moveMe(-dist);
_local1++;
}
var _local4 = activeFarBGPanels_array[0];
if (_local4.getX() < _local4.getXMin()) {
LevelMaker.farBgPanelMovedOffScreen(_local4);
activeFarBGPanels_array.splice(0, 1);
}
var _local3 = activeFarBGPanels_array[activeFarBGPanels_array.length - 1];
if (_local3.getOrder() != "end") {
if (_local3.getX() < _local3.getRightAlignX()) {
LevelMaker.createNewFarBGPanel("right");
}
}
_local1 = 0;
while (_local1 < activeObjs_array.length) {
if (!activeObjs_array[_local1].moveMe(-dist)) {
activeObjs_array.splice(_local1, 1);
_local1--;
}
_local1++;
}
LevelMaker.updateViewableCoords(dist);
}
static function moveSceneRight(dist, leftMostBGPanelObj) {
var _local1 = 0;
_local1 = 0;
while (_local1 < activeBGPanels_array.length) {
activeBGPanels_array[_local1].moveMe(dist);
_local1++;
}
var _local3 = activeBGPanels_array.length - 1;
var _local4 = activeBGPanels_array[_local3];
if (_local4.getX() > _local4.getXMax()) {
LevelMaker.bgPanelMovedOffScreen(_local4);
activeBGPanels_array.splice(_local3);
}
if (leftMostBGPanelObj.getOrder() != "start") {
if (leftMostBGPanelObj.getX() > leftMostBGPanelObj.getLeftAlignX()) {
LevelMaker.createNewBGPanel("left");
}
}
_local1 = 0;
while (_local1 < activeFarBGPanels_array.length) {
activeFarBGPanels_array[_local1].moveMe(dist);
_local1++;
}
_local3 = activeFarBGPanels_array.length - 1;
var _local5 = activeFarBGPanels_array[_local3];
if (_local5.getX() > _local4.getXMax()) {
LevelMaker.farBgPanelMovedOffScreen(_local5);
activeFarBGPanels_array.splice(_local3);
}
var _local6 = activeFarBGPanels_array[0];
if (_local6.getX() > _local6.getLeftAlignX()) {
LevelMaker.createNewFarBGPanel("left");
}
_local1 = 0;
while (_local1 < activeObjs_array.length) {
if (!activeObjs_array[_local1].moveMe(dist)) {
activeObjs_array.splice(_local1, 1);
_local1--;
}
_local1++;
}
LevelMaker.updateViewableCoords(-dist);
}
static function pauseActiveObjs() {
var _local1 = 0;
_local1 = 0;
while (_local1 < activeObjs_array.length) {
activeObjs_array[_local1].pauseMe();
_local1++;
}
}
static function pauseMe() {
Key.removeListener(horizMoveKeyListener);
killScroller();
pauseActiveObjs();
}
static function resetKeyVars() {
leftArrowPressed = false;
rightArrowPressed = false;
}
static function resumeMe() {
var _local2 = true;
var _local4 = Dragon.getClipX();
var _local3 = Dragon.getDir();
if ((_local4 <= Dragon.getClipXMin()) && (_local3 == "left")) {
_local2 = false;
} else if ((_local4 >= Dragon.getClipXMax()) && (_local3 == "right")) {
_local2 = false;
}
if (_local2) {
Dragon.startHorizMove(Dragon.getDir());
}
startHorizMove(Dragon.getDir(), true);
Key.addListener(horizMoveKeyListener);
var _local1 = 0;
_local1 = 0;
while (_local1 < activeObjs_array.length) {
activeObjs_array[_local1].resumeMe();
_local1++;
}
}
static function startHorizMove(dir, slow) {
if (slow) {
SPEED = SLOW_SPEED;
} else {
SPEED = FAST_SPEED;
}
SCROLLER.dir = dir;
SCROLLER.onEnterFrame = function () {
var _local3 = Dragon.getClipX();
if (this.dir == "right") {
if (Dragon.getDir() == "left") {
Dragon.startHorizMove("right");
}
var _local5 = Scroller.activeBGPanels_array[Scroller.activeBGPanels_array.length - 1];
var _local9 = _local5.getOrder();
var _local12 = _local5.getX();
var _local8 = _local5.getRightAlignX();
var _local2 = Scroller.SPEED;
if (_local9 == "end") {
_local2 = _local12 - _local8;
}
if (_local3 < Scroller.DRAGON_LEFT_LOCK_X) {
if ((_local3 + Scroller.SPEED) > Scroller.DRAGON_LEFT_LOCK_X) {
var _local15 = Scroller.DRAGON_LEFT_LOCK_X - _local3;
var _local7 = Scroller.SPEED - _local15;
if (_local7 > _local2) {
_local15 = _local15 + (_local7 - _local2);
_local7 = _local2;
}
Dragon.moveClipHorizontally(_local15);
Scroller.moveSceneLeft(_local7, _local5);
} else {
Dragon.moveClipHorizontally(Scroller.SPEED);
}
} else if (_local3 == Scroller.DRAGON_LEFT_LOCK_X) {
if (Scroller.SPEED > _local2) {
var _local15 = Scroller.SPEED - _local2;
Dragon.moveClipHorizontally(_local15);
Scroller.moveSceneLeft(_local2, _local5);
} else {
Scroller.moveSceneLeft(Scroller.SPEED, _local5);
}
} else {
_local2 = Scroller.DIR_CHANGE_SPEED;
if (_local9 == "end") {
_local2 = _local12 - _local8;
}
if (_local2 > 0) {
var _local6 = Scroller.DIR_CHANGE_SPEED;
if (_local2 < _local6) {
_local6 = _local2;
}
var _local14 = _local3 - Scroller.DRAGON_LEFT_LOCK_X;
if (_local14 < _local6) {
_local6 = _local14;
}
if (_local6 > 0.5) {
Dragon.moveClipHorizontally(-_local6);
Scroller.moveSceneLeft(_local6, _local5);
} else {
Dragon.moveClipHorizontally(Scroller.SPEED);
}
} else {
Dragon.moveClipHorizontally(Scroller.SPEED);
}
}
} else {
if (Dragon.getDir() == "right") {
Dragon.startHorizMove("left");
}
var _local4 = Scroller.activeBGPanels_array[0];
var _local11 = _local4.getOrder();
var _local10 = _local4.getX();
var _local13 = _local4.getLeftAlignX();
var _local2 = Scroller.SPEED;
if (_local11 == "start") {
_local2 = _local13 - _local10;
}
if (_local3 > Scroller.DRAGON_RIGHT_LOCK_X) {
if ((_local3 - Scroller.SPEED) < Scroller.DRAGON_RIGHT_LOCK_X) {
var _local15 = _local3 - Scroller.DRAGON_RIGHT_LOCK_X;
var _local7 = Scroller.SPEED - _local15;
if (_local7 > _local2) {
_local15 = _local15 + (_local7 - _local2);
_local7 = _local2;
}
Dragon.moveClipHorizontally(-_local15);
Scroller.moveSceneRight(_local7, _local4);
} else {
Dragon.moveClipHorizontally(-Scroller.SPEED);
}
} else if (_local3 == Scroller.DRAGON_RIGHT_LOCK_X) {
if (Scroller.SPEED > _local2) {
var _local15 = Scroller.SPEED - _local2;
Dragon.moveClipHorizontally(-_local15);
Scroller.moveSceneRight(_local2, _local4);
} else {
Scroller.moveSceneRight(Scroller.SPEED, _local4);
}
} else {
_local2 = Scroller.DIR_CHANGE_SPEED;
if (_local11 == "start") {
_local2 = _local13 - _local10;
}
if (_local2 > 0) {
var _local6 = Scroller.DIR_CHANGE_SPEED;
if (_local2 < _local6) {
_local6 = _local2;
}
var _local14 = Scroller.DRAGON_RIGHT_LOCK_X - _local3;
if (_local14 < _local6) {
_local6 = _local14;
}
if (_local6 > 0.5) {
Dragon.moveClipHorizontally(_local6);
Scroller.moveSceneRight(_local6, _local4);
} else {
Dragon.moveClipHorizontally(-Scroller.SPEED);
}
} else {
Dragon.moveClipHorizontally(-Scroller.SPEED);
}
}
}
};
}
static function stopHorizMove() {
SPEED = SLOW_SPEED;
}
static var DIR_CHANGE_SPEED = 45;
static var FAST_SPEED = 17;
static var SLOW_SPEED = 9;
static var horizMoveKeyListener = new Object();
static var leftArrowPressed = false;
static var rightArrowPressed = false;
static var activeBGPanels_array = [];
static var activeFarBGPanels_array = [];
static var activeObjs_array = [];
static var inited = false;
}
Symbol 1825 MovieClip [__Packages.BGPanel] Frame 0
class BGPanel
{
static var HOLDER_CLIP, HOLDER_LEFT_BOUND, HOLDER_RIGHT_BOUND, inited;
var depth, clipName, panelOrderIndex, order, xMin, rightAlignX, xMax, leftAlignX;
function BGPanel (type, index, order, setup, side) {
if (type) {
depth = index + 1;
clipName = ((type + "_depth") + depth) + "_mc";
panelOrderIndex = index;
this.order = order;
HOLDER_CLIP.attachMovie(type, clipName, depth);
switch (order) {
case "start" :
if (setup) {
var _local4 = new Object();
_local4.x = HOLDER_CLIP.leftBound_mc._x;
_local4.y = HOLDER_CLIP.leftBound_mc._y;
HOLDER_CLIP.localToGlobal(_local4);
} else {
var _local10 = LevelMaker.getBGPanelViaIndex(0);
var _local4 = _local10.getGlobalBoundCoords("left");
}
break;
default :
if (setup) {
var _local10 = LevelMaker.getBGPanelViaIndex(LevelMaker.getBGPanelsArrayLength() - 1);
var _local4 = _local10.getGlobalBoundCoords("right");
} else if (side == "right") {
var _local10 = LevelMaker.getBGPanelViaIndex(LevelMaker.getBGPanelsArrayLength() - 1);
var _local4 = _local10.getGlobalBoundCoords("right");
} else {
var _local10 = LevelMaker.getBGPanelViaIndex(0);
var _local4 = _local10.getGlobalBoundCoords("left");
}
}
HOLDER_CLIP[clipName].globalToLocal(_local4);
if (setup || (side == "right")) {
var _local6 = HOLDER_CLIP[clipName].leftBound_mc._x;
var _local16 = HOLDER_CLIP[clipName].leftBound_mc._y;
} else {
var _local6 = HOLDER_CLIP[clipName].rightBound_mc._x;
var _local16 = HOLDER_CLIP[clipName].rightBound_mc._y;
}
var _local8 = _local4.x - _local6;
var _local7 = _local4.y - _local16;
HOLDER_CLIP[clipName]._x = HOLDER_CLIP[clipName]._x + _local8;
HOLDER_CLIP[clipName]._y = HOLDER_CLIP[clipName]._y + _local7;
var _local2 = new Object();
_local2.x = HOLDER_CLIP[clipName].rightBound_mc._x;
_local2.y = 0;
HOLDER_CLIP[clipName].localToGlobal(_local2);
HOLDER_CLIP.globalToLocal(_local2);
var _local12 = _local2.x - HOLDER_LEFT_BOUND;
xMin = HOLDER_CLIP[clipName]._x - _local12;
var _local11 = _local2.x - HOLDER_RIGHT_BOUND;
rightAlignX = HOLDER_CLIP[clipName]._x - _local11;
var _local3 = new Object();
_local3.x = HOLDER_CLIP[clipName].leftBound_mc._x;
_local3.y = 0;
HOLDER_CLIP[clipName].localToGlobal(_local3);
HOLDER_CLIP.globalToLocal(_local3);
var _local14 = HOLDER_RIGHT_BOUND - _local3.x;
xMax = HOLDER_CLIP[clipName]._x + _local14;
var _local9 = HOLDER_LEFT_BOUND - _local3.x;
leftAlignX = HOLDER_CLIP[clipName]._x + _local9;
if (setup || (side == "right")) {
Scroller.addBGPanel(this, "end");
} else {
Scroller.addBGPanel(this, "beginning");
}
}
}
static function getHolderRightBound() {
return(HOLDER_RIGHT_BOUND);
}
static function getInited() {
return(inited);
}
static function init(clip) {
HOLDER_CLIP = clip;
HOLDER_LEFT_BOUND = clip.leftBound_mc._x;
HOLDER_RIGHT_BOUND = clip.rightBound_mc._x;
}
function getClipDepth() {
return(depth);
}
function getGlobalBoundCoords(side) {
var _local2 = new Object();
var _local3 = HOLDER_CLIP[clipName][side + "Bound_mc"];
_local2.x = _local3._x;
_local2.y = _local3._y;
HOLDER_CLIP[clipName].localToGlobal(_local2);
return(_local2);
}
function getHolderScopeBoundCoords(side) {
var _local2 = getGlobalBoundCoords(side);
HOLDER_CLIP.globalToLocal(_local2);
return(_local2);
}
function getLeftAlignX() {
return(leftAlignX);
}
function getOrder() {
return(order);
}
function getPanelOrderIndex() {
return(panelOrderIndex);
}
function getRightAlignX() {
return(rightAlignX);
}
function getX() {
return(HOLDER_CLIP[clipName]._x);
}
function getXMax() {
return(xMax);
}
function getXMin() {
return(xMin);
}
function moveMe(dist) {
HOLDER_CLIP[clipName]._x = HOLDER_CLIP[clipName]._x + dist;
}
function removeClip() {
HOLDER_CLIP[clipName].removeMovieClip();
}
}
Symbol 1826 MovieClip [__Packages.FarBGPanel] Frame 0
class FarBGPanel extends BGPanel
{
static var HOLDER_CLIP, HOLDER_LEFT_BOUND, HOLDER_RIGHT_BOUND;
var depth, clipName, panelOrderIndex, order, xMin, rightAlignX, xMax, leftAlignX, speedPercentage;
function FarBGPanel (type, index, order, setup, side) {
super(null);
depth = index + 1;
clipName = ((type + "_depth") + depth) + "_mc";
panelOrderIndex = index;
this.order = order;
HOLDER_CLIP.attachMovie(type, clipName, depth);
switch (order) {
case "start" :
if (setup) {
var _local5 = new Object();
_local5.x = HOLDER_CLIP.leftBound_mc._x;
_local5.y = HOLDER_CLIP.leftBound_mc._y;
HOLDER_CLIP.localToGlobal(_local5);
} else {
var _local11 = LevelMaker.getFarBGPanelViaIndex(0);
var _local5 = _local11.getGlobalBoundCoords("left");
}
break;
default :
if (setup || (side == "right")) {
var _local11 = LevelMaker.getFarBGPanelViaIndex(LevelMaker.getFarBGPanelsArrayLength() - 1);
var _local5 = _local11.getGlobalBoundCoords("right");
} else {
var _local11 = LevelMaker.getFarBGPanelViaIndex(0);
var _local5 = _local11.getGlobalBoundCoords("left");
}
}
HOLDER_CLIP[clipName].globalToLocal(_local5);
if (setup || (side == "right")) {
var _local7 = HOLDER_CLIP[clipName].leftBound_mc._x;
var _local16 = HOLDER_CLIP[clipName].leftBound_mc._y;
} else {
var _local7 = HOLDER_CLIP[clipName].rightBound_mc._x;
var _local16 = HOLDER_CLIP[clipName].rightBound_mc._y;
}
var _local9 = _local5.x - _local7;
var _local8 = _local5.y - _local16;
HOLDER_CLIP[clipName]._x = HOLDER_CLIP[clipName]._x + _local9;
HOLDER_CLIP[clipName]._y = HOLDER_CLIP[clipName]._y + _local8;
var _local3 = new Object();
_local3.x = HOLDER_CLIP[clipName].rightBound_mc._x;
_local3.y = HOLDER_CLIP[clipName].rightBound_mc._y;
HOLDER_CLIP[clipName].localToGlobal(_local3);
HOLDER_CLIP.globalToLocal(_local3);
var _local13 = _local3.x - HOLDER_LEFT_BOUND;
xMin = HOLDER_CLIP[clipName]._x - _local13;
var _local12 = _local3.x - HOLDER_RIGHT_BOUND;
rightAlignX = HOLDER_CLIP[clipName]._x - _local12;
var _local4 = new Object();
_local4.x = HOLDER_CLIP[clipName].leftBound_mc._x;
_local4.y = HOLDER_CLIP[clipName].leftBound_mc._y;
HOLDER_CLIP[clipName].localToGlobal(_local4);
HOLDER_CLIP.globalToLocal(_local4);
var _local15 = HOLDER_RIGHT_BOUND - _local4.x;
xMax = HOLDER_CLIP[clipName]._x + _local15;
var _local10 = HOLDER_LEFT_BOUND - _local4.x;
leftAlignX = HOLDER_CLIP[clipName]._x + _local10;
if (setup || (side == "right")) {
Scroller.addFarBGPanel(this, "end");
} else {
Scroller.addFarBGPanel(this, "beginning");
}
speedPercentage = FarBGPanel[("LEV_" + GameStats.getLevel()) + "_SPEED_PERCENTAGE"];
}
static function init(clip) {
HOLDER_CLIP = clip;
HOLDER_LEFT_BOUND = clip.leftBound_mc._x;
HOLDER_RIGHT_BOUND = clip.rightBound_mc._x;
inited = true;
}
function getGlobalBoundCoords(side) {
var _local2 = new Object();
var _local3 = HOLDER_CLIP[clipName][side + "Bound_mc"];
_local2.x = _local3._x;
_local2.y = _local3._y;
HOLDER_CLIP[clipName].localToGlobal(_local2);
return(_local2);
}
function getX() {
return(HOLDER_CLIP[clipName]._x);
}
function moveMe(dist) {
HOLDER_CLIP[clipName]._x = HOLDER_CLIP[clipName]._x + (dist * speedPercentage);
}
function removeClip() {
HOLDER_CLIP[clipName].removeMovieClip();
}
static var LEV_1_SPEED_PERCENTAGE = 0.6;
static var LEV_2_SPEED_PERCENTAGE = 0.9;
static var LEV_3_SPEED_PERCENTAGE = 0.9;
static var inited = false;
}
Symbol 1827 MovieClip [__Packages.Fireball] Frame 0
class Fireball extends ScrollingObj
{
var clipState, dir, clip, xMin, xMax;
function Fireball (clip, xCoord, yCoord, refName, travelDir) {
super(clip, xCoord, yCoord, refName);
_root.AudioSFX_MC.gotoAndPlay("shoot");
clipState = "begin";
dir = travelDir;
createClip();
}
function checkForContact(beginX, endX) {
var _local11 = false;
var _local18 = Scroller.getActiveObjsArray();
var _local7 = new Array();
var _local5;
var _local16;
var _local3;
var _local4 = 0;
_local4 = 0;
while (_local4 < _local18.length) {
_local16 = false;
_local3 = _local18[_local4];
_local5 = _local3.getBaseClipName();
if ((((((((((_local5 == "groundWormVillager") || (_local5 == "hutWormVillager")) || (_local5 == "tunnelWormSmTop")) || (_local5 == "tunnelWormSmBtm")) || (_local5 == "tunnelWormMedTop")) || (_local5 == "tunnelWormMedBtm")) || (_local5 == "tunnelWormLgTop")) || (_local5 == "tunnelWormLgBtm")) || (_local5 == "tunnelLoopWormBtm")) || (_local5 == "tunnelLoopWormTop")) {
var _local13 = _local3.getClipState();
if ((((_local13 == "worm_appear") || (_local13 == "worm")) || (_local13 == "worm_shoot")) || (_local13 == "worm_flip")) {
_local16 = true;
}
}
if (_local16) {
_local7.push(_local3);
}
_local4++;
}
var _local14;
if (dir == "right") {
_local4 = 1;
while (_local4 < _local7.length) {
_local14 = _local7[_local4 - 1];
_local3 = _local7[_local4];
if (_local3.getClipX() < _local14.getClipX()) {
var _local17 = _local3;
_local7.splice(_local4, 1);
_local7.splice(_local4 - 1, 0, _local17);
_local4--;
}
_local4++;
}
} else {
_local4 = 1;
while (_local4 < _local7.length) {
_local14 = _local7[_local4 - 1];
_local3 = _local7[_local4];
if (_local3.getClipX() > _local14.getClipX()) {
var _local17 = _local3;
_local7.splice(_local4, 1);
_local7.splice(_local4 - 1, 0, _local17);
_local4--;
}
_local4++;
}
}
var _local9;
var _local8;
var _local12;
var _local2;
var _local10;
_local4 = 0;
while (_local4 < _local7.length) {
_local3 = _local7[_local4];
_local9 = false;
_local8 = false;
_local12 = false;
_local5 = _local3.getBaseClipName();
if (_local5 == "groundWormVillager") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
_local8 = true;
}
} else if (_local5 == "hutWormVillager") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if ((dir != HutWormVillager(_local3).getDir()) || (_local3.getClipState() == "worm_flip")) {
_local8 = true;
}
}
} else if (_local5 == "tunnelWormSmTop") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelWormSmTop(_local3).getDir()) {
_local8 = true;
}
}
} else if (_local5 == "tunnelWormSmBtm") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelWormSmBtm(_local3).getDir()) {
_local8 = true;
}
}
} else if (_local5 == "tunnelWormMedTop") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelWormMedTop(_local3).getDir()) {
_local8 = true;
}
}
} else if (_local5 == "tunnelWormMedBtm") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelWormMedBtm(_local3).getDir()) {
_local8 = true;
}
}
} else if (_local5 == "tunnelWormLgTop") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelWormLgTop(_local3).getDir()) {
_local8 = true;
}
}
} else if (_local5 == "tunnelWormLgBtm") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelWormLgBtm(_local3).getDir()) {
_local8 = true;
}
}
} else if (_local5 == "tunnelLoopWormBtm") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelLoopWormBtm(_local3).getDir()) {
_local8 = true;
}
}
} else if (_local5 == "tunnelLoopWormTop") {
_local9 = true;
if (_local3.getDestroyHitClip() != null) {
if (dir != TunnelLoopWormTop(_local3).getDir()) {
_local8 = true;
}
}
}
if (_local8) {
_local10 = _local3.getDestroyHitClip();
if (dir == "right") {
_local2 = beginX;
while (_local2 <= endX) {
if (_local10.hitTest(_local2, clip._y, true)) {
_local12 = true;
_local11 = true;
_local3.hitByFireball();
Dragon.destroyWorm();
explode(_local2);
_local2 = endX + 1;
} else {
_local2 = _local2 + 2;
}
}
} else {
_local2 = beginX;
while (_local2 >= endX) {
if (_local10.hitTest(_local2, clip._y, true)) {
_local12 = true;
_local11 = true;
_local3.hitByFireball();
Dragon.destroyWorm();
explode(_local2);
_local2 = endX - 1;
} else {
_local2 = _local2 - 2;
}
}
}
}
if (!_local12) {
if (_local9) {
_local10 = _local3.getHitClip();
if (_local10) {
if (dir == "right") {
_local2 = beginX;
while (_local2 <= endX) {
if (_local10.hitTest(_local2, clip._y, true)) {
_local11 = true;
if (ScrollingObj(_local3).canDeflectFireball()) {
iAmDeflected(_local2);
_local2 = endX + 1;
} else {
explode(_local2);
_local2 = endX + 1;
}
} else {
_local2 = _local2 + 2;
}
}
} else {
_local2 = beginX;
while (_local2 >= endX) {
if (_local10.hitTest(_local2, clip._y, true)) {
_local11 = true;
if (ScrollingObj(_local3).canDeflectFireball()) {
iAmDeflected(_local2);
_local2 = endX - 1;
} else {
explode(_local2);
_local2 = endX - 1;
}
} else {
_local2 = _local2 - 2;
}
}
}
}
}
}
_local4++;
}
return(_local11);
}
function createClip() {
super.createClip();
if (dir == "left") {
clip._xscale = -100;
}
clip.gotoAndStop(clipState);
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if (((_local2 == "impact") || (_local2 == "deflected")) || (_local2 == "empty")) {
this.onEnterFrame = function () {
};
} else {
var _local3 = Fireball.SPEED;
if (this.objRef.getDir() == "left") {
_local3 = -Fireball.SPEED;
}
var _local4 = this.objRef.clip._x;
this.objRef.clip._x = this.objRef.clip._x + _local3;
if (this.objRef.clip._x <= this.objRef.xMin) {
if (_local2 != "empty") {
this.objRef.clipState = "empty";
this.gotoAndStop("empty");
}
} else if (this.objRef.clip._x >= this.objRef.xMax) {
if (_local2 != "empty") {
this.objRef.clipState = "empty";
this.gotoAndStop("empty");
}
} else if (this.objRef.checkForContact(_local4, this.objRef.clip._x)) {
this.onEnterFrame = function () {
};
}
}
}
};
}
function endBeginAnim() {
clipState = "base";
clip.gotoAndStop(clipState);
}
function explode(impactX) {
clip._x = impactX;
clipState = "impact";
clip.gotoAndStop(clipState);
}
function getDir() {
return(dir);
}
function iAmDeflected(impactX) {
clip._x = impactX;
clipState = "deflected";
clip.gotoAndStop(clipState);
}
function iAmDone() {
clipState = "empty";
clip.gotoAndStop(clipState);
delete clip.onEnterFrame;
}
function moveMe(dist) {
var _local3 = clip._x;
var _local2 = true;
if (clipState == "empty") {
_local2 = false;
} else {
clip._x = clip._x + dist;
if (clip._x <= xMin) {
_local2 = false;
removeClip("left");
} else if (clip._x >= xMax) {
_local2 = false;
removeClip("right");
}
if (_local2) {
if ((clipState == "begin") || (clipState == "base")) {
checkForContact(_local3, clip._x);
}
}
}
return(_local2);
}
function pauseMe() {
if (((clipState == "begin") || (clipState == "deflected")) || (clipState == "impact")) {
clip.anim_mc.stop();
}
}
function removeClip(side) {
super.removeClip(side);
clipState = "empty";
}
function resumeMe() {
if (((clipState == "begin") || (clipState == "deflected")) || (clipState == "impact")) {
clip.anim_mc.play();
}
}
static var SPEED = 25;
var baseClipName = "fireball";
}
Symbol 1828 MovieClip [__Packages.HutWormVillager] Frame 0
class HutWormVillager extends ScrollingObj
{
var clipState, dir, rescued, checkCreateClip, clip, deathState, deathStateFrame;
function HutWormVillager (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "sitting";
}
dir = "left";
rescued = false;
checkCreateClip();
}
function beginNab() {
clipState = "pre_nab";
clip.gotoAndStop(clipState);
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormFlip() {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
clipState = "worm_flip";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (((clipState == "sitting") || (clipState == "wormhole")) || (clipState == "worm")) {
setWormTimer();
if (clipState == "worm") {
setDir(dir);
}
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if ((_local2 == "sitting") || (_local2 == "pre_nab")) {
if (!this.objRef.getRescued()) {
if (Dragon.getPassenger() == "none") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpVillager(this.objRef.getVillagerType());
this.objRef.getPickedUp();
if (_local2 == "sitting") {
this.onEnterFrame = function () {
};
}
}
}
}
} else if ((((_local2 == "worm_appear") || (_local2 == "worm")) || (_local2 == "worm_shoot")) || (_local2 == "worm_flip")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
if ((_local2 == "worm") || (_local2 == "worm_shoot")) {
var _local3 = this.objRef.getClipX();
var _local4 = Dragon.getClipX();
if (_local3 < _local4) {
if (this.objRef.getDir() == "left") {
this.objRef.beginWormFlip();
}
} else if (_local3 > _local4) {
if (this.objRef.getDir() == "right") {
this.objRef.beginWormFlip();
}
}
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormFlip() {
clipState = "worm";
clip.gotoAndStop(clipState);
if (dir == "right") {
dir = "left";
} else {
dir = "right";
}
setDir(dir);
setWormTimer();
}
function endWormNab() {
clipState = "wormhole";
clip.gotoAndStop(clipState);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function getDeathState() {
return(deathState);
}
function getDeathStateFrame() {
return(deathStateFrame);
}
function getDir() {
return(dir);
}
function getPickedUp() {
_root.AudioSFX_MC.gotoAndPlay("pickupGuy");
rescued = true;
if (clipState == "pre_nab") {
clip.anim_mc.villager_mc._visible = false;
} else {
clipState = "hut";
clip.gotoAndStop(clipState);
}
}
function getRescued() {
return(rescued);
}
function getVillagerType() {
return(villagerType);
}
function hitByFireball() {
deathState = clipState;
deathStateFrame = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "sitting" :
clip.wormTimer_mc.stop();
clip.anim_mc.stop();
break;
case "pre_nab" :
clip.anim_mc.stop();
clip.anim_mc.villager_mc.stop();
break;
case "nab" :
clip.anim_mc.stop();
break;
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.wormTimer_mc.stop();
break;
case "worm_flip" :
clip.anim_mc.stop();
break;
case "worm_shoot" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if ((clipState == "pre_nab") || (clipState == "nab")) {
clipState = "wormhole";
} else if (((clipState == "worm_appear") || (clipState == "worm_shoot")) || (clipState == "worm_flip")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "sitting" :
clip.wormTimer_mc.play();
clip.anim_mc.play();
break;
case "pre_nab" :
clip.anim_mc.play();
clip.anim_mc.villager_mc.play();
break;
case "nab" :
clip.anim_mc.play();
break;
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.wormTimer_mc.play();
break;
case "worm_flip" :
clip.anim_mc.play();
break;
case "worm_shoot" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = HutWormVillager["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - HutWormVillager["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = HutWormVillager["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = HutWormVillager["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - HutWormVillager["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = HutWormVillager["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
} else {
var _local3 = HutWormVillager["WORM_NAB_TIMER_MAX_LEV_" + _local2] - HutWormVillager["WORM_NAB_TIMER_MIN_LEV_" + _local2];
var _local4 = HutWormVillager["WORM_NAB_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_nab_loop");
}
}
function shootLaser() {
var _local2 = new Object();
_local2.x = clip.anim_mc.laserMarker_mc._x;
_local2.y = clip.anim_mc.laserMarker_mc._y;
clip.anim_mc.localToGlobal(_local2);
LevelMaker.addHorizLaser(dir, _local2);
}
function wormTakeover() {
if (rescued) {
endWormNab();
} else {
clipState = "nab";
clip.gotoAndStop(clipState);
}
}
static var WORM_APPEAR_TIMER_MIN_LEV_1 = 3;
static var WORM_APPEAR_TIMER_MAX_LEV_1 = 6;
static var WORM_APPEAR_TIMER_MIN_LEV_2 = 2;
static var WORM_APPEAR_TIMER_MAX_LEV_2 = 5;
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 4;
static var WORM_NAB_TIMER_MIN_LEV_1 = 10;
static var WORM_NAB_TIMER_MAX_LEV_1 = 25;
static var WORM_NAB_TIMER_MIN_LEV_2 = 7;
static var WORM_NAB_TIMER_MAX_LEV_2 = 20;
static var WORM_NAB_TIMER_MIN_LEV_3 = 5;
static var WORM_NAB_TIMER_MAX_LEV_3 = 15;
static var WORM_SHOOT_TIMER_MIN_LEV_1 = 3;
static var WORM_SHOOT_TIMER_MAX_LEV_1 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_2 = 2;
static var WORM_SHOOT_TIMER_MAX_LEV_2 = 5;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 4;
var baseClipName = "hutWormVillager";
var villagerType = "a";
}
Symbol 1829 MovieClip [__Packages.TunnelWormSmTop] Frame 0
class TunnelWormSmTop extends ScrollingObj
{
var clipState, dir, checkCreateClip, clip, deathState, deathStateFrame;
function TunnelWormSmTop (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
dir = "left";
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormFlip() {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
clipState = "worm_flip";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if ((clipState == "wormhole") || (clipState == "worm")) {
setWormTimer();
if (clipState == "worm") {
setDir(dir);
}
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if (((_local2 == "worm_appear") || (_local2 == "worm")) || (_local2 == "worm_shoot")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
var _local3 = this.objRef.getClipX();
var _local4 = Dragon.getClipX();
if (_local3 < _local4) {
if (this.objRef.getDir() == "left") {
this.objRef.beginWormFlip();
}
} else if (_local3 > _local4) {
if (this.objRef.getDir() == "right") {
this.objRef.beginWormFlip();
}
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormFlip() {
clipState = "worm";
clip.gotoAndStop(clipState);
if (dir == "right") {
dir = "left";
} else {
dir = "right";
}
setDir(dir);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function getDeathState() {
return(deathState);
}
function getDeathStateFrame() {
return(deathStateFrame);
}
function getDir() {
return(dir);
}
function hitByFireball() {
deathState = clipState;
deathStateFrame = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.wormTimer_mc.stop();
break;
case "worm_flip" :
clip.anim_mc.stop();
break;
case "worm_shoot" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (((clipState == "worm_appear") || (clipState == "worm_shoot")) || (clipState == "worm_flip")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.wormTimer_mc.play();
break;
case "worm_flip" :
clip.anim_mc.play();
break;
case "worm_shoot" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = TunnelWormSmTop["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - TunnelWormSmTop["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormSmTop["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = TunnelWormSmTop["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelWormSmTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormSmTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
}
function shootLaser() {
var _local2 = new Object();
_local2.x = clip.anim_mc.laserMarker_mc._x;
_local2.y = clip.anim_mc.laserMarker_mc._y;
clip.anim_mc.localToGlobal(_local2);
LevelMaker.addHorizLaser(dir, _local2);
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 6;
var baseClipName = "tunnelWormSmTop";
}
Symbol 1830 MovieClip [__Packages.TunnelWormSmBtm] Frame 0
class TunnelWormSmBtm extends ScrollingObj
{
var clipState, dir, checkCreateClip, clip, deathState, deathStateFrame;
function TunnelWormSmBtm (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
dir = "left";
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormFlip() {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
clipState = "worm_flip";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if ((clipState == "wormhole") || (clipState == "worm")) {
setWormTimer();
if (clipState == "worm") {
setDir(dir);
}
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local3 = this.objRef.getClipState();
if ((((_local3 == "worm_appear") || (_local3 == "worm")) || (_local3 == "worm_shoot")) || (_local3 == "worm_flip")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
if ((_local3 == "worm") || (_local3 == "worm_shoot")) {
var _local4 = this.objRef.getClipX();
var _local5 = Dragon.getClipX();
if (_local4 < _local5) {
if (this.objRef.getDir() == "left") {
this.objRef.beginWormFlip();
}
} else if (_local4 > _local5) {
if (this.objRef.getDir() == "right") {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
this.objRef.beginWormFlip();
}
}
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormFlip() {
clipState = "worm";
clip.gotoAndStop(clipState);
if (dir == "right") {
dir = "left";
} else {
dir = "right";
}
setDir(dir);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function getDeathState() {
return(deathState);
}
function getDeathStateFrame() {
return(deathStateFrame);
}
function getDir() {
return(dir);
}
function hitByFireball() {
deathState = clipState;
deathStateFrame = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.wormTimer_mc.stop();
break;
case "worm_flip" :
clip.anim_mc.stop();
break;
case "worm_shoot" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (((clipState == "worm_appear") || (clipState == "worm_shoot")) || (clipState == "worm_flip")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.wormTimer_mc.play();
break;
case "worm_flip" :
clip.anim_mc.play();
break;
case "worm_shoot" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = TunnelWormSmBtm["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - TunnelWormSmBtm["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormSmBtm["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = TunnelWormSmBtm["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelWormSmBtm["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormSmBtm["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
}
function shootLaser() {
var _local2 = new Object();
_local2.x = clip.anim_mc.laserMarker_mc._x;
_local2.y = clip.anim_mc.laserMarker_mc._y;
clip.anim_mc.localToGlobal(_local2);
LevelMaker.addHorizLaser(dir, _local2);
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 6;
var baseClipName = "tunnelWormSmBtm";
}
Symbol 1831 MovieClip [__Packages.TunnelWormMedTop] Frame 0
class TunnelWormMedTop extends ScrollingObj
{
var clipState, dir, checkCreateClip, clip, deathState, deathStateFrame;
function TunnelWormMedTop (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
dir = "left";
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormFlip() {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
clipState = "worm_flip";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if ((clipState == "wormhole") || (clipState == "worm")) {
setWormTimer();
if (clipState == "worm") {
setDir(dir);
}
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if (((_local2 == "worm_appear") || (_local2 == "worm")) || (_local2 == "worm_shoot")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
var _local3 = this.objRef.getClipX();
var _local4 = Dragon.getClipX();
if (_local3 < _local4) {
if (this.objRef.getDir() == "left") {
this.objRef.beginWormFlip();
}
} else if (_local3 > _local4) {
if (this.objRef.getDir() == "right") {
this.objRef.beginWormFlip();
}
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormFlip() {
clipState = "worm";
clip.gotoAndStop(clipState);
if (dir == "right") {
dir = "left";
} else {
dir = "right";
}
setDir(dir);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function getDeathState() {
return(deathState);
}
function getDeathStateFrame() {
return(deathStateFrame);
}
function getDir() {
return(dir);
}
function hitByFireball() {
deathState = clipState;
deathStateFrame = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.wormTimer_mc.stop();
break;
case "worm_flip" :
clip.anim_mc.stop();
break;
case "worm_shoot" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (((clipState == "worm_appear") || (clipState == "worm_shoot")) || (clipState == "worm_flip")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.wormTimer_mc.play();
break;
case "worm_flip" :
clip.anim_mc.play();
break;
case "worm_shoot" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = TunnelWormMedTop["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - TunnelWormMedTop["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormMedTop["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = TunnelWormMedTop["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelWormMedTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormMedTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
}
function shootLaser() {
var _local2 = new Object();
_local2.x = clip.anim_mc.laserMarker_mc._x;
_local2.y = clip.anim_mc.laserMarker_mc._y;
clip.anim_mc.localToGlobal(_local2);
LevelMaker.addHorizLaser(dir, _local2);
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 6;
var baseClipName = "tunnelWormMedTop";
}
Symbol 1832 MovieClip [__Packages.TunnelWormMedBtm] Frame 0
class TunnelWormMedBtm extends ScrollingObj
{
var clipState, dir, checkCreateClip, clip, deathState, deathStateFrame;
function TunnelWormMedBtm (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
dir = "left";
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormFlip() {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
clipState = "worm_flip";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if ((clipState == "wormhole") || (clipState == "worm")) {
setWormTimer();
if (clipState == "worm") {
setDir(dir);
}
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if (((_local2 == "worm_appear") || (_local2 == "worm")) || (_local2 == "worm_shoot")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
var _local3 = this.objRef.getClipX();
var _local4 = Dragon.getClipX();
if (_local3 < _local4) {
if (this.objRef.getDir() == "left") {
this.objRef.beginWormFlip();
}
} else if (_local3 > _local4) {
if (this.objRef.getDir() == "right") {
this.objRef.beginWormFlip();
}
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormFlip() {
clipState = "worm";
clip.gotoAndStop(clipState);
if (dir == "right") {
dir = "left";
} else {
dir = "right";
}
setDir(dir);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function getDeathState() {
return(deathState);
}
function getDeathStateFrame() {
return(deathStateFrame);
}
function getDir() {
return(dir);
}
function hitByFireball() {
deathState = clipState;
deathStateFrame = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.wormTimer_mc.stop();
break;
case "worm_flip" :
clip.anim_mc.stop();
break;
case "worm_shoot" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (((clipState == "worm_appear") || (clipState == "worm_shoot")) || (clipState == "worm_flip")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.wormTimer_mc.play();
break;
case "worm_flip" :
clip.anim_mc.play();
break;
case "worm_shoot" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = TunnelWormMedBtm["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - TunnelWormMedBtm["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormMedBtm["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = TunnelWormMedBtm["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelWormMedBtm["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormMedBtm["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
}
function shootLaser() {
var _local2 = new Object();
_local2.x = clip.anim_mc.laserMarker_mc._x;
_local2.y = clip.anim_mc.laserMarker_mc._y;
clip.anim_mc.localToGlobal(_local2);
LevelMaker.addHorizLaser(dir, _local2);
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 6;
var baseClipName = "tunnelWormMedBtm";
}
Symbol 1833 MovieClip [__Packages.TunnelWormLgTop] Frame 0
class TunnelWormLgTop extends ScrollingObj
{
var clipState, dir, checkCreateClip, clip, deathState, deathStateFrame;
function TunnelWormLgTop (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
dir = "left";
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormFlip() {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
clipState = "worm_flip";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if ((clipState == "wormhole") || (clipState == "worm")) {
setWormTimer();
if (clipState == "worm") {
setDir(dir);
}
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if (((_local2 == "worm_appear") || (_local2 == "worm")) || (_local2 == "worm_shoot")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
var _local3 = this.objRef.getClipX();
var _local4 = Dragon.getClipX();
if (_local3 < _local4) {
if (this.objRef.getDir() == "left") {
this.objRef.beginWormFlip();
}
} else if (_local3 > _local4) {
if (this.objRef.getDir() == "right") {
this.objRef.beginWormFlip();
}
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormFlip() {
clipState = "worm";
clip.gotoAndStop(clipState);
if (dir == "right") {
dir = "left";
} else {
dir = "right";
}
setDir(dir);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function getDeathState() {
return(deathState);
}
function getDeathStateFrame() {
return(deathStateFrame);
}
function getDir() {
return(dir);
}
function hitByFireball() {
deathState = clipState;
deathStateFrame = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.wormTimer_mc.stop();
break;
case "worm_flip" :
clip.anim_mc.stop();
break;
case "worm_shoot" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (((clipState == "worm_appear") || (clipState == "worm_shoot")) || (clipState == "worm_flip")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.wormTimer_mc.play();
break;
case "worm_flip" :
clip.anim_mc.play();
break;
case "worm_shoot" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = TunnelWormLgTop["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - TunnelWormLgTop["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormLgTop["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = TunnelWormLgTop["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelWormLgTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormLgTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
}
function shootLaser() {
var _local2 = new Object();
_local2.x = clip.anim_mc.laserMarker_mc._x;
_local2.y = clip.anim_mc.laserMarker_mc._y;
clip.anim_mc.localToGlobal(_local2);
LevelMaker.addHorizLaser(dir, _local2);
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 6;
var baseClipName = "tunnelWormLgTop";
}
Symbol 1834 MovieClip [__Packages.TunnelWormLgBtm] Frame 0
class TunnelWormLgBtm extends ScrollingObj
{
var clipState, dir, checkCreateClip, clip, deathState, deathStateFrame;
function TunnelWormLgBtm (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
dir = "left";
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormFlip() {
_root.AudioSFX_MC.gotoAndPlay("wormTurn");
clipState = "worm_flip";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if ((clipState == "wormhole") || (clipState == "worm")) {
setWormTimer();
if (clipState == "worm") {
setDir(dir);
}
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if (((_local2 == "worm_appear") || (_local2 == "worm")) || (_local2 == "worm_shoot")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
var _local3 = this.objRef.getClipX();
var _local4 = Dragon.getClipX();
if (_local3 < _local4) {
if (this.objRef.getDir() == "left") {
this.objRef.beginWormFlip();
}
} else if (_local3 > _local4) {
if (this.objRef.getDir() == "right") {
this.objRef.beginWormFlip();
}
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormFlip() {
clipState = "worm";
clip.gotoAndStop(clipState);
if (dir == "right") {
dir = "left";
} else {
dir = "right";
}
setDir(dir);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
setWormTimer();
}
function getDeathState() {
return(deathState);
}
function getDeathStateFrame() {
return(deathStateFrame);
}
function getDir() {
return(dir);
}
function hitByFireball() {
deathState = clipState;
deathStateFrame = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.wormTimer_mc.stop();
break;
case "worm_flip" :
clip.anim_mc.stop();
break;
case "worm_shoot" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (((clipState == "worm_appear") || (clipState == "worm_shoot")) || (clipState == "worm_flip")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.wormTimer_mc.play();
break;
case "worm_flip" :
clip.anim_mc.play();
break;
case "worm_shoot" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = TunnelWormLgBtm["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - TunnelWormLgBtm["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormLgBtm["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = TunnelWormLgBtm["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelWormLgBtm["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelWormLgBtm["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
}
function shootLaser() {
var _local2 = new Object();
_local2.x = clip.anim_mc.laserMarker_mc._x;
_local2.y = clip.anim_mc.laserMarker_mc._y;
clip.anim_mc.localToGlobal(_local2);
LevelMaker.addHorizLaser(dir, _local2);
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 6;
var baseClipName = "tunnelWormLgBtm";
}
Symbol 1835 MovieClip [__Packages.TunnelLoopWormBtm] Frame 0
class TunnelLoopWormBtm extends ScrollingObj
{
var clipState, checkCreateClip, clip, destroyFrameNum;
function TunnelLoopWormBtm (clip, xCoord, yCoord, refName, growthDir) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
dir = growthDir;
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (clipState == "wormhole") {
setWormTimer();
} else if (clipState == "worm") {
setDir(dir);
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function getDestroyFrameNum() {
return(destroyFrameNum);
}
function getDir() {
return(dir);
}
function hitByFireball() {
destroyFrameNum = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (clipState == "worm_appear") {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
var _local3 = TunnelLoopWormTop["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelLoopWormTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelLoopWormTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 5;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 15;
var baseClipName = "tunnelLoopWormBtm";
var dir = "left";
}
Symbol 1836 MovieClip [__Packages.TunnelLoopWormTop] Frame 0
class TunnelLoopWormTop extends ScrollingObj
{
var clipState, checkCreateClip, clip, destroyFrameNum;
function TunnelLoopWormTop (clip, xCoord, yCoord, refName, growthDir) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "wormhole";
}
if ((growthDir == "right") || (growthDir == "left")) {
dir = growthDir;
}
checkCreateClip();
}
function beginWormAppear() {
clipState = "worm_appear";
clip.gotoAndStop(clipState);
setDir(dir);
}
function beginWormShoot() {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
setDir(dir);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (clipState == "wormhole") {
setWormTimer();
} else if (clipState == "worm") {
setDir(dir);
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setDir(dir);
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function getDestroyFrameNum() {
return(destroyFrameNum);
}
function getDir() {
return(dir);
}
function hitByFireball() {
destroyFrameNum = clip.anim_mc._currentframe;
clipState = "worm_dying";
clip.gotoAndStop(clipState);
if (dir == "right") {
clip.anim_mc.points_mc._xscale = -100;
}
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
setDir(dir);
}
function pauseMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.stop();
break;
case "worm_appear" :
clip.anim_mc.stop();
break;
case "worm" :
clip.anim_mc.stop();
break;
case "worm_dying" :
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
break;
}
}
function removeClip(side) {
super.removeClip(side);
if (clipState == "worm_appear") {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
switch (clipState) {
case "wormhole" :
clip.wormTimer_mc.play();
break;
case "worm_appear" :
clip.anim_mc.play();
break;
case "worm" :
clip.anim_mc.play();
break;
case "worm_dying" :
clip.anim_mc.play();
if (clip.anim_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
break;
}
}
function setDir(newDir) {
dir = newDir;
if (dir == "right") {
clip.anim_mc._xscale = -100;
} else {
clip.anim_mc._xscale = 100;
}
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
var _local3 = TunnelLoopWormTop["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - TunnelLoopWormTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = TunnelLoopWormTop["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
}
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 5;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 15;
var baseClipName = "tunnelLoopWormTop";
var dir = "left";
}
Symbol 1837 MovieClip [__Packages.HorizLaser] Frame 0
class HorizLaser extends ScrollingObj
{
var clipState, dir, clip, xMin, removeClip, xMax;
function HorizLaser (clip, xCoord, yCoord, refName, travelDir) {
super(clip, xCoord, yCoord, refName);
clipState = "begin";
dir = travelDir;
createClip();
}
function checkForContact(beginX, endX) {
var _local5 = false;
var _local2;
var _local4 = Dragon.getLaserHitClip();
if (dir == "right") {
_local2 = beginX;
while (_local2 <= endX) {
if (_local4.hitTest(_local2, clip._y, true)) {
Dragon.hitByLaser();
clipState = "empty";
clip.gotoAndStop(clipState);
_local2 = endX + 1;
} else {
_local2 = _local2 + 2;
}
}
} else {
_local2 = beginX;
while (_local2 >= endX) {
if (_local4.hitTest(_local2, clip._y, true)) {
Dragon.hitByLaser();
clipState = "empty";
clip.gotoAndStop(clipState);
_local2 = endX - 1;
} else {
_local2 = _local2 - 2;
}
}
}
return(_local5);
}
function createClip() {
super.createClip();
if (dir == "left") {
clip._xscale = -100;
}
clip.gotoAndStop(clipState);
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local3 = this.objRef.getClipState();
var _local2 = HorizLaser.SPEED;
if (this.objRef.getDir() == "left") {
_local2 = -HorizLaser.SPEED;
}
var _local4 = this.objRef.clip._x;
this.objRef.clip._x = this.objRef.clip._x + _local2;
if (this.objRef.clip._x <= this.objRef.xMin) {
if (_local3 != "empty") {
this.objRef.clipState = "empty";
this.gotoAndStop("empty");
}
if (this.objRef.clip._x <= (this.objRef.xMin - 50)) {
this.onEnterFrame = function () {
};
}
} else if (this.objRef.clip._x >= this.objRef.xMax) {
if (_local3 != "empty") {
this.objRef.clipState = "empty";
this.gotoAndStop("empty");
}
if (this.objRef.clip._x >= (this.objRef.xMax + 50)) {
this.onEnterFrame = function () {
};
}
} else if (this.objRef.checkForContact(_local4, this.objRef.clip._x)) {
this.onEnterFrame = function () {
};
}
}
};
}
function endBeginAnim() {
clipState = "base";
clip.gotoAndStop(clipState);
}
function getDir() {
return(dir);
}
function iAmDone() {
clipState = "empty";
clip.gotoAndStop(clipState);
delete clip.onEnterFrame;
}
function moveMe(dist) {
var _local3 = clip._x;
var _local2 = true;
clip._x = clip._x + dist;
if (clip._x <= xMin) {
_local2 = false;
removeClip("left");
} else if (clip._x >= xMax) {
_local2 = false;
removeClip("right");
}
if (_local2) {
if ((clipState == "begin") || (clipState == "base")) {
checkForContact(_local3, clip._x);
}
}
return(_local2);
}
function pauseMe() {
if (clipState == "begin") {
clip.anim_mc.stop();
}
}
function resumeMe() {
if (clipState == "begin") {
clip.anim_mc.play();
}
}
static var SPEED = 30;
var baseClipName = "horizLaser";
}
Symbol 1838 MovieClip [__Packages.GroundFreeVillager] Frame 0
class GroundFreeVillager extends ScrollingObj
{
var clipState, checkCreateClip, clip;
function GroundFreeVillager (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
clipState = "running";
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (clipState == "running") {
clip.anim_mc.gotoAndPlay(Math.ceil(Math.random() * clip.anim_mc._totalframes));
}
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (Dragon.getPassenger() == "none") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpVillager(this.objRef.getVillagerType());
this.objRef.getPickedUp();
this.onEnterFrame = function () {
};
}
}
}
};
}
function getPickedUp() {
_root.AudioSFX_MC.gotoAndPlay("pickupGuy");
clipState = "empty";
clip.gotoAndStop(clipState);
}
function getVillagerType() {
return(villagerType);
}
function pauseMe() {
if (clipState == "running") {
clip.anim_mc.stop();
clip.anim_mc.subAnim_mc.stop();
}
}
function resumeMe() {
if (clipState == "running") {
clip.anim_mc.play();
clip.anim_mc.subAnim_mc.play();
}
}
var baseClipName = "groundFreeVillager";
var villagerType = "a";
}
Symbol 1839 MovieClip [__Packages.TreePlatform] Frame 0
class TreePlatform extends ScrollingObj
{
var pointsAnimPlaying, structureHeight, structureType, clipState, villagerCount, checkCreateClip, clip;
function TreePlatform (clip, xCoord, yCoord, refName, treeType, treeHeight) {
super(clip, xCoord, yCoord, refName);
pointsAnimPlaying = false;
structureHeight = treeHeight;
structureType = treeType;
clipState = (("type" + treeType) + "_") + treeHeight;
villagerCount = 0;
checkCreateClip();
}
function acquireVillager() {
_root.AudioSFX_MC.gotoAndPlay("dropGuy");
if (villagerCount < VILLAGER_COUNT_MAX) {
villagerCount++;
}
updateVillagersClip();
clip.villagers_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
pointsAnimPlaying = true;
}
function contactWithDragonPassenger() {
var _local2 = false;
if (clip.hitArea_mc.hitTest(Dragon.getPassengerHitClip())) {
_local2 = true;
}
return(_local2);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
updateVillagersClip(true);
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (Dragon.getPassenger() != "none") {
if (this.objRef.contactWithDragonPassenger()) {
Dragon.releaseVillager();
this.objRef.acquireVillager();
}
}
}
};
}
function endBurstAnim() {
clip.villagers_mc.points_mc.gotoAndStop("base");
pointsAnimPlaying = false;
}
function pauseMe() {
var _local2 = 1;
_local2 = 1;
while (_local2 <= villagerCount) {
clip.villagers_mc[("villager" + _local2) + "_mc"].stop();
_local2++;
}
if (pointsAnimPlaying) {
clip.villagers_mc.points_mc.stop();
}
}
function removeClip(side) {
super.removeClip(side);
pointsAnimPlaying = false;
}
function resumeMe() {
var _local2 = 1;
_local2 = 1;
while (_local2 <= villagerCount) {
clip.villagers_mc[("villager" + _local2) + "_mc"].play();
_local2++;
}
if (pointsAnimPlaying) {
clip.villagers_mc.points_mc.play();
}
}
function updateVillagersClip(varyStartFrames) {
clip.villagers_mc.gotoAndStop("villagerCount" + villagerCount);
if (varyStartFrames) {
var _local2 = 1;
var _local4;
var _local3;
_local2 = 1;
while (_local2 <= villagerCount) {
_local3 = clip.villagers_mc[("villager" + _local2) + "_mc"];
_local4 = Math.ceil(Math.random() * _local3._totalframes);
_local3.gotoAndPlay(_local4);
_local2++;
}
}
}
static var VILLAGER_COUNT_MAX = 10;
var baseClipName = "treePlatform";
}
Symbol 1840 MovieClip [__Packages.GroundWormVillager] Frame 0
class GroundWormVillager extends ScrollingObj
{
var clipState, rescued, checkCreateClip, clip, partnerObj;
function GroundWormVillager (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clipState = "worm";
} else {
clipState = "standing";
}
rescued = false;
checkCreateClip();
}
function beginNab() {
clipState = "pre_nab";
clip.gotoAndStop(clipState);
}
function beginWormAppear() {
_root.AudioSFX_MC.gotoAndPlay("wormUp");
clipState = "worm_appear";
clip.gotoAndStop(clipState);
}
function beginWormShoot() {
if (partnerObj.getClipState() == "base") {
clipState = "worm_shoot";
clip.gotoAndStop(clipState);
} else {
clip.wormTimer_mc.gotoAndPlay("shoot_loop");
}
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (((clipState == "standing") || (clipState == "wormhole")) || (clipState == "worm")) {
setWormTimer();
}
if (clipState != "worm_destroyed") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
var _local2 = this.objRef.getClipState();
if ((_local2 == "standing") || (_local2 == "pre_nab")) {
if (!this.objRef.getRescued()) {
if (Dragon.getPassenger() == "none") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpVillager(this.objRef.getVillagerType());
this.objRef.getPickedUp();
if (_local2 == "standing") {
this.onEnterFrame = function () {
};
}
}
}
}
} else if (((_local2 == "worm_appear") || (_local2 == "worm")) || (_local2 == "worm_shoot")) {
if (this.objRef.bodyContactWithDragon()) {
Dragon.hitByWorm();
}
}
}
};
}
}
function endWormAppear() {
clipState = "worm";
clip.gotoAndStop(clipState);
setWormTimer();
}
function endWormDeath() {
clipState = "worm_destroyed";
clip.gotoAndStop(clipState);
}
function endWormNab() {
clipState = "wormhole";
clip.gotoAndStop(clipState);
setWormTimer();
}
function endWormShoot() {
clipState = "worm";
clip.gotoAndStop(clipState);
setWormTimer();
}
function getPartnerObj() {
return(partnerObj);
}
function getPickedUp() {
rescued = true;
if (clipState == "pre_nab") {
clip.anim_mc.villager_mc._visible = false;
} else {
clipState = "empty";
clip.gotoAndStop(clipState);
}
}
function getRescued() {
return(rescued);
}
function getVillagerType() {
return(villagerType);
}
function hitByFireball() {
clipState = "worm_dying";
clip.gotoAndStop(clipState);
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
}
function pauseMe() {
if (clipState == "standing") {
clip.wormTimer_mc.stop();
clip.anim_mc.stop();
} else if (clipState == "pre_nab") {
clip.anim_mc.stop();
clip.anim_mc.villager_mc.stop();
} else if (clipState == "nab") {
clip.anim_mc.stop();
} else if (clipState == "wormhole") {
clip.wormTimer_mc.stop();
} else if (clipState == "worm_appear") {
clip.anim_mc.stop();
} else if (clipState == "worm") {
clip.wormTimer_mc.stop();
} else if (clipState == "worm_shoot") {
clip.anim_mc.stop();
} else if (clipState == "worm_dying") {
clip.anim_mc.stop();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.stop();
}
}
}
function removeClip(side) {
super.removeClip(side);
if ((clipState == "pre_nab") || (clipState == "nab")) {
clipState = "wormhole";
} else if ((clipState == "worm_appear") || (clipState == "worm_shoot")) {
clipState = "worm";
} else if (clipState == "worm_dying") {
clipState = "worm_destroyed";
}
}
function resumeMe() {
if (clipState == "standing") {
clip.wormTimer_mc.play();
clip.anim_mc.play();
} else if (clipState == "pre_nab") {
clip.anim_mc.play();
clip.anim_mc.villager_mc.play();
} else if (clipState == "nab") {
clip.anim_mc.play();
} else if (clipState == "wormhole") {
clip.wormTimer_mc.play();
} else if (clipState == "worm_appear") {
clip.anim_mc.play();
} else if (clipState == "worm") {
clip.wormTimer_mc.play();
} else if (clipState == "worm_shoot") {
clip.anim_mc.play();
} else if (clipState == "worm_dying") {
clip.anim_mc.play();
if (clip.anim_mc.points_mc.clipPlaying) {
clip.anim_mc.points_mc.play();
}
}
}
function setPartnerObj(partner) {
partnerObj = partner;
}
function setWormTimer() {
var _local2 = GameStats.getLevel();
if (clipState == "worm") {
var _local3 = GroundWormVillager["WORM_SHOOT_TIMER_MAX_LEV_" + _local2] - GroundWormVillager["WORM_SHOOT_TIMER_MIN_LEV_" + _local2];
var _local4 = GroundWormVillager["WORM_SHOOT_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_shoot_loop");
} else if (clipState == "wormhole") {
var _local3 = GroundWormVillager["WORM_APPEAR_TIMER_MAX_LEV_" + _local2] - GroundWormVillager["WORM_APPEAR_TIMER_MIN_LEV_" + _local2];
var _local4 = GroundWormVillager["WORM_APPEAR_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_appear_loop");
} else {
var _local3 = GroundWormVillager["WORM_NAB_TIMER_MAX_LEV_" + _local2] - GroundWormVillager["WORM_NAB_TIMER_MIN_LEV_" + _local2];
var _local4 = GroundWormVillager["WORM_NAB_TIMER_MIN_LEV_" + _local2] + Math.round(Math.random() * _local3);
clip.wormTimer_mc.loopMax = _local4;
clip.wormTimer_mc.gotoAndPlay("begin_nab_loop");
}
}
function shootLaser() {
partnerObj.fireLaser();
}
function wormTakeover() {
clipState = "nab";
clip.gotoAndStop(clipState);
}
static var WORM_APPEAR_TIMER_MIN_LEV_1 = 3;
static var WORM_APPEAR_TIMER_MAX_LEV_1 = 6;
static var WORM_APPEAR_TIMER_MIN_LEV_2 = 2;
static var WORM_APPEAR_TIMER_MAX_LEV_2 = 5;
static var WORM_APPEAR_TIMER_MIN_LEV_3 = 1;
static var WORM_APPEAR_TIMER_MAX_LEV_3 = 4;
static var WORM_NAB_TIMER_MIN_LEV_1 = 10;
static var WORM_NAB_TIMER_MAX_LEV_1 = 25;
static var WORM_NAB_TIMER_MIN_LEV_2 = 7;
static var WORM_NAB_TIMER_MAX_LEV_2 = 22;
static var WORM_NAB_TIMER_MIN_LEV_3 = 5;
static var WORM_NAB_TIMER_MAX_LEV_3 = 20;
static var WORM_SHOOT_TIMER_MIN_LEV_1 = 3;
static var WORM_SHOOT_TIMER_MAX_LEV_1 = 6;
static var WORM_SHOOT_TIMER_MIN_LEV_2 = 2;
static var WORM_SHOOT_TIMER_MAX_LEV_2 = 5;
static var WORM_SHOOT_TIMER_MIN_LEV_3 = 1;
static var WORM_SHOOT_TIMER_MAX_LEV_3 = 4;
var baseClipName = "groundWormVillager";
var villagerType = "a";
}
Symbol 1841 MovieClip [__Packages.GroundWormLaser] Frame 0
class GroundWormLaser extends ScrollingObj
{
var clipState, partnerObj, checkCreateClip, clip, clipExists;
function GroundWormLaser (clip, xCoord, yCoord, refName, partner) {
super(clip, xCoord, yCoord, refName);
clipState = "base";
partnerObj = partner;
partnerObj.setPartnerObj(this);
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (this.objRef.getClipState() == "fire") {
if (this.objRef.contactWithDragon(true)) {
Dragon.hitByLaser();
this.objRef.hitDragon();
}
}
}
};
}
function endFire() {
clipState = "base";
clip.gotoAndStop(clipState);
}
function fireLaser() {
clipState = "fire";
clip.gotoAndStop(clipState);
}
function hitDragon() {
clipState = "base";
clip.gotoAndStop(clipState);
}
function partnerRemoved() {
clip.removeMovieClip();
clipExists = false;
}
function pauseMe() {
if (clipState == "fire") {
clip.anim_mc.stop();
}
}
function removeClip(side) {
super.removeClip(side);
if (clipState == "fire") {
clipState = "base";
}
}
function resumeMe() {
if (clipState == "fire") {
clip.anim_mc.play();
}
}
var baseClipName = "groundWormLaser";
}
Symbol 1842 MovieClip [__Packages.HealthKit] Frame 0
class HealthKit extends ScrollingObj
{
var clipState, checkCreateClip, clip;
function HealthKit (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
clipState = "base";
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (this.objRef.getClipState() == "base") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpHealthKit(HealthKit.HEALTH_VALUE);
this.objRef.getPickedUp();
this.onEnterFrame = function () {
};
}
}
}
};
}
function endAcquisitionAnim() {
clipState = "empty";
clip.gotoAndStop(clipState);
}
function getPickedUp() {
clipState = "acquired";
clip.gotoAndStop(clipState);
}
function pauseMe() {
if (clipState == "acquired") {
clip.anim_mc.stop();
}
}
function removeClip(side) {
super.removeClip(side);
if (clipState == "acquired") {
clipState = "empty";
}
}
function resumeMe() {
if (clipState == "acquired") {
clip.anim_mc.play();
}
}
static var HEALTH_VALUE = 25;
var baseClipName = "healthKit";
}
Symbol 1843 MovieClip [__Packages.InvincibilityBonus] Frame 0
class InvincibilityBonus extends ScrollingObj
{
var clipState, checkCreateClip, clip;
function InvincibilityBonus (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
clipState = "base";
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (this.objRef.getClipState() == "base") {
if (this.objRef.contactWithDragon()) {
Dragon.powerUp("invincibility");
this.objRef.getPickedUp();
this.onEnterFrame = function () {
};
}
}
}
};
}
function getPickedUp() {
_root.AudioSFX_MC.gotoAndPlay("invicible");
clipState = "empty";
clip.gotoAndStop(clipState);
delete clip.onEnterFrame;
}
function pauseMe() {
if (clipState == "base") {
clip.anim_mc.stop();
}
}
function resumeMe() {
if (clipState == "base") {
clip.anim_mc.play();
}
}
var baseClipName = "invincibilityBonus";
}
Symbol 1844 MovieClip [__Packages.BurnedHut] Frame 0
class BurnedHut extends ScrollingObj
{
var clipState, checkCreateClip, clip;
function BurnedHut (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
clipState = "base";
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
}
function pauseMe() {
clip.anim_mc.stop();
}
function resumeMe() {
clip.anim_mc.play();
}
var baseClipName = "burnedHut";
}
Symbol 1845 MovieClip [__Packages.VillagerSmallStalagmite] Frame 0
class VillagerSmallStalagmite extends ScrollingObj
{
var clingSide, clipState, checkCreateClip, clip;
function VillagerSmallStalagmite (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clingSide = "left";
} else {
clingSide = "right";
}
clipState = "clinging_" + clingSide;
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (clipState != "rescued") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (Dragon.getPassenger() == "none") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpVillager(this.objRef.getVillagerType());
this.objRef.getPickedUp();
this.onEnterFrame = function () {
};
}
}
}
};
}
}
function getPickedUp() {
_root.AudioSFX_MC.gotoAndPlay("pickupGuy");
clipState = "rescued";
clip.gotoAndStop(clipState);
}
function getVillagerType() {
return(villagerType);
}
function pauseMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.stop();
}
}
function resumeMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.play();
}
}
var baseClipName = "villagerSmallStalagmite";
var villagerType = "b";
}
Symbol 1846 MovieClip [__Packages.VillagerLargeStalagmite] Frame 0
class VillagerLargeStalagmite extends ScrollingObj
{
var clingSide, clipState, checkCreateClip, clip;
function VillagerLargeStalagmite (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clingSide = "left";
} else {
clingSide = "right";
}
clipState = "clinging_" + clingSide;
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (clipState != "rescued") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (Dragon.getPassenger() == "none") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpVillager(this.objRef.getVillagerType());
this.objRef.getPickedUp();
this.onEnterFrame = function () {
};
}
}
}
};
}
}
function getPickedUp() {
_root.AudioSFX_MC.gotoAndPlay("pickupGuy");
clipState = "rescued";
clip.gotoAndStop(clipState);
}
function getVillagerType() {
return(villagerType);
}
function pauseMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.stop();
}
}
function resumeMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.play();
}
}
var baseClipName = "villagerLargeStalagmite";
var villagerType = "b";
}
Symbol 1847 MovieClip [__Packages.Ladder] Frame 0
class Ladder extends ScrollingObj
{
var pointsAnimPlaying, clipState, checkCreateClip, clip;
function Ladder (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
pointsAnimPlaying = false;
clipState = "base";
checkCreateClip();
}
function acquireVillager() {
_root.AudioSFX_MC.gotoAndPlay("dropGuy");
if (clipState == "base") {
clipState = "rescue";
clip.gotoAndStop(clipState);
}
clip.anim_mc.gotoAndPlay("go");
clip.anim_mc.points_mc.gotoAndPlay("lev" + GameStats.getLevel());
pointsAnimPlaying = true;
}
function contactWithDragonPassenger() {
var _local2 = false;
if (clip.hitArea_mc.hitTest(Dragon.getPassengerHitClip())) {
_local2 = true;
}
return(_local2);
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (Dragon.getPassenger() != "none") {
if (this.objRef.contactWithDragonPassenger()) {
Dragon.releaseVillager();
this.objRef.acquireVillager();
}
}
}
};
}
function endPointsAnim() {
pointsAnimPlaying = false;
}
function endRescue() {
pointsAnimPlaying = false;
clipState = "base";
clip.gotoAndStop(clipState);
}
function pauseMe() {
if (clipState == "rescue") {
clip.anim_mc.stop();
if (pointsAnimPlaying) {
clip.anim_mc.points_mc.stop();
}
}
}
function removeClip(side) {
super.removeClip(side);
if (clipState == "rescue") {
clipState = "base";
pointsAnimPlaying = false;
}
}
function resumeMe() {
if (clipState == "rescue") {
clip.anim_mc.play();
if (pointsAnimPlaying) {
clip.anim_mc.points_mc.play();
}
}
}
var baseClipName = "ladder";
}
Symbol 1848 MovieClip [__Packages.VillagerLargeStalactite] Frame 0
class VillagerLargeStalactite extends ScrollingObj
{
var clingSide, clipState, checkCreateClip, clip;
function VillagerLargeStalactite (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clingSide = "left";
} else {
clingSide = "right";
}
clipState = "clinging_" + clingSide;
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (clipState != "rescued") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (Dragon.getPassenger() == "none") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpVillager(this.objRef.getVillagerType());
this.objRef.getPickedUp();
this.onEnterFrame = function () {
};
}
}
}
};
}
}
function getPickedUp() {
_root.AudioSFX_MC.gotoAndPlay("pickupGuy");
clipState = "rescued";
clip.gotoAndStop(clipState);
}
function getVillagerType() {
return(villagerType);
}
function pauseMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.stop();
}
}
function resumeMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.play();
}
}
var baseClipName = "villagerLargeStalactite";
var villagerType = "b";
}
Symbol 1849 MovieClip [__Packages.VillagerSmallStalactite] Frame 0
class VillagerSmallStalactite extends ScrollingObj
{
var clingSide, clipState, checkCreateClip, clip;
function VillagerSmallStalactite (clip, xCoord, yCoord, refName) {
super(clip, xCoord, yCoord, refName);
if (Math.random() > 0.5) {
clingSide = "left";
} else {
clingSide = "right";
}
clipState = "clinging_" + clingSide;
checkCreateClip();
}
function createClip() {
super.createClip();
clip.gotoAndStop(clipState);
if (clipState != "rescued") {
clip.onEnterFrame = function () {
if (GameControl.getGameOn()) {
if (Dragon.getPassenger() == "none") {
if (this.objRef.contactWithDragon()) {
Dragon.pickUpVillager(this.objRef.getVillagerType());
this.objRef.getPickedUp();
this.onEnterFrame = function () {
};
}
}
}
};
}
}
function getPickedUp() {
_root.AudioSFX_MC.gotoAndPlay("pickupGuy");
clipState = "rescued";
clip.gotoAndStop(clipState);
}
function getVillagerType() {
return(villagerType);
}
function pauseMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.stop();
}
}
function resumeMe() {
if ((clipState == "clinging_left") || (clipState == "clinging_right")) {
clip.anim_mc.play();
}
}
var baseClipName = "villagerSmallStalactite";
var villagerType = "b";
}
Symbol 1850 MovieClip [__Packages.Help] Frame 0
class Help
{
static var HELP_BTN_CLIP, HELP_CLIP;
function Help () {
}
static function closeHelp() {
GameControl.resumeGame();
helpShowing = false;
}
static function displayHelp() {
GameControl.pauseGame();
if (GameControl.getQuitDialogShowing()) {
GameControl.enableQuitBtn();
}
HELP_BTN_CLIP.gotoAndStop("disabled");
HELP_CLIP.gotoAndStop("help_lev" + GameStats.getLevel());
helpShowing = true;
}
static function enableHelpBtn() {
HELP_BTN_CLIP.gotoAndStop("active");
helpShowing = false;
}
static function getHelpShowing() {
return(helpShowing);
}
static function getInited() {
return(inited);
}
static function getViewed() {
return(viewed);
}
static function init(btnClip, clip) {
HELP_BTN_CLIP = btnClip;
HELP_BTN_CLIP.gotoAndStop("active");
HELP_CLIP = clip;
inited = true;
}
static function needHelp() {
var _local1 = false;
if (!viewed) {
_local1 = true;
}
return(_local1);
}
static function setBtns() {
if (viewed) {
HELP_CLIP.exit_mc.gotoAndStop("continue");
HELP_CLIP.exit_mc.continue_btn.onRelease = function () {
Help.closeHelp();
};
} else {
HELP_CLIP.exit_mc.gotoAndStop("start");
HELP_CLIP.exit_mc.start_btn.onRelease = function () {
Help.closeHelp();
};
}
}
static function setViewed(newval) {
viewed = newval;
}
static function skipHelp() {
viewed = true;
}
static var helpShowing = false;
static var inited = false;
static var viewed = false;
}
Symbol 130 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 10
gotoAndStop ("park");
Symbol 149 MovieClip Frame 20
gotoAndStop ("park");
Symbol 149 MovieClip Frame 40
gotoAndStop ("park");
Symbol 149 MovieClip Frame 50
gotoAndStop ("park");
Symbol 149 MovieClip Frame 60
gotoAndStop ("park");
Symbol 149 MovieClip Frame 71
gotoAndStop ("park");
Symbol 149 MovieClip Frame 80
gotoAndStop ("park");
Symbol 149 MovieClip Frame 90
gotoAndStop ("park");
Symbol 149 MovieClip Frame 100
gotoAndStop ("park");
Symbol 149 MovieClip Frame 111
gotoAndStop ("park");
Symbol 149 MovieClip Frame 120
gotoAndStop ("park");
Symbol 149 MovieClip Frame 130
gotoAndStop ("park");
Symbol 149 MovieClip Frame 140
gotoAndStop ("park");
Symbol 154 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 10
_root.mu.setVolume(40);
Symbol 154 MovieClip Frame 14
_root.mu.setVolume(20);
Symbol 154 MovieClip Frame 18
_root.mu.setVolume(0);
_root.mu.stop();
Symbol 154 MovieClip Frame 134
_root.mu = new Sound(AudioIntroMusic_MC);
_root.mu.attachSound("introMusic");
_root.mu.setVolume(40);
if (_root.musicOn) {
_root.mu.start(0, 999);
}
gotoAndStop ("park");
Symbol 154 MovieClip Frame 185
_root.mu.setVolume(40);
Symbol 154 MovieClip Frame 189
_root.mu.setVolume(20);
Symbol 154 MovieClip Frame 193
_root.mu.setVolume(0);
_root.mu.stop();
Symbol 154 MovieClip Frame 280
_root.mu = new Sound(AudioIntroMusic_MC);
_root.mu.attachSound("introMusic");
_root.mu.setVolume(40);
if (_root.musicOn) {
_root.mu.start(0, 999);
}
gotoAndStop ("park");
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 11
gotoAndStop ("park");
Symbol 157 MovieClip Frame 21
gotoAndStop ("park");
Symbol 193 MovieClip Frame 67
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 1
stop();
Symbol 215 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 2
stop();
Symbol 228 MovieClip Frame 4
play();
Symbol 228 MovieClip Frame 10
gotoAndStop ("base");
Symbol 228 MovieClip Frame 11
gotoAndStop ("base");
Symbol 271 MovieClip Frame 21
animating = false;
_parent._parent.subAnimPlaying = false;
stop();
Symbol 274 MovieClip Frame 2
stop();
Symbol 274 MovieClip Frame 4
stop();
Symbol 274 MovieClip Frame 7
stop();
Instance of Symbol 271 MovieClip "subAnim_mc" in Symbol 451 MovieClip Frame 1
onClipEvent (load) {
this.animating = true;
if (!this._parent._parent.subAnimPlaying) {
this.gotoAndStop(this._totalframes);
}
}
Instance of Symbol 274 MovieClip "villager_mc" in Symbol 451 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(Dragon.getPassenger());
}
Instance of Symbol 271 MovieClip "subAnim_mc" in Symbol 451 MovieClip Frame 21
onClipEvent (load) {
this.gotoAndStop(this._totalframes);
}
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 3
_parent._parent.AudioSFX_MC.gotoAndPlay("goodGuyHit");
_parent._alpha = 30;
Symbol 452 MovieClip Frame 5
_parent._alpha = 100;
Symbol 452 MovieClip Frame 7
_parent._alpha = 30;
Symbol 452 MovieClip Frame 9
_parent._alpha = 100;
Symbol 452 MovieClip Frame 11
_parent._alpha = 30;
Symbol 452 MovieClip Frame 13
_parent._alpha = 100;
Symbol 452 MovieClip Frame 15
_parent._alpha = 30;
Symbol 452 MovieClip Frame 17
_parent._alpha = 100;
Symbol 452 MovieClip Frame 19
_parent._alpha = 30;
Symbol 452 MovieClip Frame 21
_parent._alpha = 100;
Symbol 452 MovieClip Frame 23
_parent._alpha = 30;
Symbol 452 MovieClip Frame 25
_parent._alpha = 100;
Symbol 452 MovieClip Frame 26
stop();
Dragon.endInjuryTime();
Symbol 452 MovieClip Frame 27
Dragon.endInjuryTime();
Symbol 452 MovieClip Frame 30
Dragon.tintForInvincibility();
Symbol 452 MovieClip Frame 32
Dragon.removeTint();
Symbol 452 MovieClip Frame 34
if (Dragon.getCurrentPowerUp() == "invincibility") {
gotoAndPlay ("invincibility_loop");
} else {
gotoAndStop ("base");
}
Symbol 492 MovieClip Frame 19
stop();
animating = false;
Instance of Symbol 492 MovieClip "subAnim_mc" in Symbol 493 MovieClip Frame 1
onClipEvent (load) {
this.animating = true;
}
Instance of Symbol 274 MovieClip "villager_mc" in Symbol 493 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(Dragon.getPassenger());
}
Symbol 494 MovieClip Frame 2
stop();
Symbol 494 MovieClip Frame 5
stop();
Symbol 494 MovieClip Frame 8
stop();
Symbol 494 MovieClip Frame 11
stop();
Symbol 496 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 2
stop();
Symbol 500 MovieClip Frame 4
stop();
Symbol 500 MovieClip Frame 6
stop();
Symbol 518 MovieClip Frame 2
help_btn.onRelease = function () {
Help.displayHelp();
};
stop();
Symbol 518 MovieClip Frame 4
stop();
Symbol 524 MovieClip Frame 2
quit_btn.onRelease = function () {
GameControl.clickQuitBtn();
};
stop();
Symbol 524 MovieClip Frame 4
stop();
Symbol 534 MovieClip Frame 1
if (_parent.musicOn == false) {
gotoAndStop ("music_off");
}
Symbol 534 MovieClip Frame 2
toggle_btn.onRelease = function () {
_parent.mu.stop();
_parent.musicOn = false;
gotoAndStop ("music_off");
};
stop();
Symbol 534 MovieClip Frame 4
toggle_btn.onRelease = function () {
_parent.mu.start(0, 999);
_parent.musicOn = true;
gotoAndStop ("music_on");
};
stop();
Symbol 545 MovieClip Frame 2
pause_btn.onRelease = function () {
GameControl.pauseGame();
};
stop();
Symbol 545 MovieClip Frame 4
resume_btn.onRelease = function () {
GameControl.resumeGame();
};
stop();
Symbol 551 MovieClip Frame 1
stop();
Symbol 551 MovieClip Frame 40
stop();
Symbol 587 MovieClip Frame 101
stop();
Dragon.endPowerUp();
Symbol 589 MovieClip Frame 1
stop();
Symbol 589 MovieClip Frame 4
stop();
timer_mc.gotoAndPlay(1);
Symbol 619 MovieClip Frame 2
stop();
Symbol 619 MovieClip Frame 4
stop();
Symbol 659 MovieClip Frame 1
stop();
Symbol 693 MovieClip Frame 2
stop();
Symbol 693 MovieClip Frame 4
Help.setBtns();
stop();
Symbol 693 MovieClip Frame 7
Help.setBtns();
stop();
Symbol 693 MovieClip Frame 10
Help.setBtns();
stop();
Symbol 693 MovieClip Frame 13
submit_btn.onRelease = function () {
GameControl.submitScore();
};
noQuit_btn.onRelease = function () {
GameControl.resumeGame();
};
stop();
Symbol 693 MovieClip Frame 16
play();
Symbol 693 MovieClip Frame 57
GameControl.endLevel1Intro();
Symbol 693 MovieClip Frame 58
play();
Symbol 693 MovieClip Frame 81
GameControl.changeLevel();
Symbol 693 MovieClip Frame 107
GameControl.endLevelTrans();
Symbol 693 MovieClip Frame 109
play();
Symbol 693 MovieClip Frame 130
GameControl.changeLevel();
Symbol 693 MovieClip Frame 159
GameControl.endLevelTrans();
Symbol 703 MovieClip Frame 1
stop();
Symbol 703 MovieClip Frame 3
play();
Symbol 703 MovieClip Frame 13
GameControl.cutToEndScreen();
Symbol 703 MovieClip Frame 14
GameControl.cutToEndScreen();
Symbol 703 MovieClip Frame 16
play();
Symbol 703 MovieClip Frame 26
GameControl.cutToEndScreen();
Symbol 703 MovieClip Frame 27
GameControl.cutToEndScreen();
Symbol 708 MovieClip Frame 1
stop();
Symbol 708 MovieClip Frame 4
_parent.playerScore = GameStats.getScore();
doge_mc.loadMovie(_parent.fsd);
mask_btn.useHandCursor = false;
stop();
Symbol 762 MovieClip Frame 1
subAnim_mc._x = 0;
subAnim_mc._xscale = 100;
hitArea_mc._x = -1.4;
Instance of Symbol 761 MovieClip "subAnim_mc" in Symbol 762 MovieClip Frame 1
/* no clip actions */
Symbol 762 MovieClip Frame 2
subAnim_mc._x = -2;
subAnim_mc._xscale = 100;
hitArea_mc._x = -3.4;
Symbol 762 MovieClip Frame 3
subAnim_mc._x = -3.9;
subAnim_mc._xscale = 100;
hitArea_mc._x = -5.3;
Symbol 762 MovieClip Frame 4
subAnim_mc._x = -5.8;
subAnim_mc._xscale = 100;
hitArea_mc._x = -7.3;
Symbol 762 MovieClip Frame 5
subAnim_mc._x = -7.8;
subAnim_mc._xscale = 100;
hitArea_mc._x = -9.2;
Symbol 762 MovieClip Frame 6
subAnim_mc._x = -9.7;
subAnim_mc._xscale = 100;
hitArea_mc._x = -11.1;
Symbol 762 MovieClip Frame 7
subAnim_mc._x = -11.7;
subAnim_mc._xscale = 100;
hitArea_mc._x = -13.1;
Symbol 762 MovieClip Frame 8
subAnim_mc._x = -13.6;
subAnim_mc._xscale = 100;
hitArea_mc._x = -15;
Symbol 762 MovieClip Frame 9
subAnim_mc._x = -15.6;
subAnim_mc._xscale = 100;
hitArea_mc._x = -16.9;
Symbol 762 MovieClip Frame 10
subAnim_mc._x = -17.5;
subAnim_mc._xscale = 100;
hitArea_mc._x = -18.9;
Symbol 762 MovieClip Frame 11
subAnim_mc._x = -19.4;
subAnim_mc._xscale = 100;
hitArea_mc._x = -20.9;
Symbol 762 MovieClip Frame 12
subAnim_mc._x = -21.4;
subAnim_mc._xscale = 100;
hitArea_mc._x = -22.8;
Symbol 762 MovieClip Frame 13
subAnim_mc._x = -23.4;
subAnim_mc._xscale = 100;
hitArea_mc._x = -24.8;
Symbol 762 MovieClip Frame 14
subAnim_mc._x = -25.3;
subAnim_mc._xscale = 100;
hitArea_mc._x = -26.7;
Symbol 762 MovieClip Frame 15
subAnim_mc._x = -27.2;
subAnim_mc._xscale = 100;
hitArea_mc._x = -28.6;
Symbol 762 MovieClip Frame 16
subAnim_mc._x = -29.1;
subAnim_mc._xscale = 100;
hitArea_mc._x = -30.6;
Symbol 762 MovieClip Frame 17
subAnim_mc._x = -31.1;
subAnim_mc._xscale = 100;
hitArea_mc._x = -32.5;
Symbol 762 MovieClip Frame 18
subAnim_mc._x = -33;
subAnim_mc._xscale = 100;
hitArea_mc._x = -34.5;
Symbol 762 MovieClip Frame 19
subAnim_mc._x = -35;
subAnim_mc._xscale = 100;
hitArea_mc._x = -36.4;
Symbol 762 MovieClip Frame 20
subAnim_mc._x = -35;
subAnim_mc._xscale = -100;
hitArea_mc._x = -33.8;
Symbol 762 MovieClip Frame 21
subAnim_mc._x = -33;
subAnim_mc._xscale = -100;
hitArea_mc._x = -31.7;
Symbol 762 MovieClip Frame 22
subAnim_mc._x = -30.9;
subAnim_mc._xscale = -100;
hitArea_mc._x = -29.6;
Symbol 762 MovieClip Frame 23
subAnim_mc._x = -28.8;
subAnim_mc._xscale = -100;
hitArea_mc._x = -27.6;
Symbol 762 MovieClip Frame 24
subAnim_mc._x = -26.8;
subAnim_mc._xscale = -100;
hitArea_mc._x = -25.5;
Symbol 762 MovieClip Frame 25
subAnim_mc._x = -24.7;
subAnim_mc._xscale = -100;
hitArea_mc._x = -23.4;
Symbol 762 MovieClip Frame 26
subAnim_mc._x = -22.6;
subAnim_mc._xscale = -100;
hitArea_mc._x = -21.4;
Symbol 762 MovieClip Frame 27
subAnim_mc._x = -20.6;
subAnim_mc._xscale = -100;
hitArea_mc._x = -19.3;
Symbol 762 MovieClip Frame 28
subAnim_mc._x = -18.6;
subAnim_mc._xscale = -100;
hitArea_mc._x = -17.2;
Symbol 762 MovieClip Frame 29
subAnim_mc._x = -16.4;
subAnim_mc._xscale = -100;
hitArea_mc._x = -15.1;
Symbol 762 MovieClip Frame 30
subAnim_mc._x = -14.4;
subAnim_mc._xscale = -100;
hitArea_mc._x = -13.1;
Symbol 762 MovieClip Frame 31
subAnim_mc._x = -12.4;
subAnim_mc._xscale = -100;
hitArea_mc._x = -10.9;
Symbol 762 MovieClip Frame 32
subAnim_mc._x = -10.3;
subAnim_mc._xscale = -100;
hitArea_mc._x = -8.9;
Symbol 762 MovieClip Frame 33
subAnim_mc._x = -8.3;
subAnim_mc._xscale = -100;
hitArea_mc._x = -6.8;
Symbol 762 MovieClip Frame 34
subAnim_mc._x = -6.2;
subAnim_mc._xscale = -100;
hitArea_mc._x = -4.8;
Symbol 762 MovieClip Frame 35
subAnim_mc._x = -4.1;
subAnim_mc._xscale = -100;
hitArea_mc._x = -2.6;
Symbol 762 MovieClip Frame 36
subAnim_mc._x = -2;
subAnim_mc._xscale = -100;
hitArea_mc._x = -0.6;
Symbol 762 MovieClip Frame 37
subAnim_mc._x = 0;
subAnim_mc._xscale = -100;
hitArea_mc._x = 1.5;
Symbol 762 MovieClip Frame 38
subAnim_mc._x = 2;
subAnim_mc._xscale = -100;
hitArea_mc._x = 3.6;
Symbol 762 MovieClip Frame 39
subAnim_mc._x = 4.1;
subAnim_mc._xscale = -100;
hitArea_mc._x = 5.7;
Symbol 762 MovieClip Frame 40
subAnim_mc._x = 6.2;
subAnim_mc._xscale = -100;
hitArea_mc._x = 7.8;
Symbol 762 MovieClip Frame 41
subAnim_mc._x = 8.3;
subAnim_mc._xscale = -100;
hitArea_mc._x = 9.8;
Symbol 762 MovieClip Frame 42
subAnim_mc._x = 10.3;
subAnim_mc._xscale = -100;
hitArea_mc._x = 11.9;
Symbol 762 MovieClip Frame 43
subAnim_mc._x = 12.4;
subAnim_mc._xscale = -100;
hitArea_mc._x = 13.9;
Symbol 762 MovieClip Frame 44
subAnim_mc._x = 14.4;
subAnim_mc._xscale = -100;
hitArea_mc._x = 16.1;
Symbol 762 MovieClip Frame 45
subAnim_mc._x = 16.4;
subAnim_mc._xscale = -100;
hitArea_mc._x = 18.1;
Symbol 762 MovieClip Frame 46
subAnim_mc._x = 18.6;
subAnim_mc._xscale = -100;
hitArea_mc._x = 20.2;
Symbol 762 MovieClip Frame 47
subAnim_mc._x = 20.6;
subAnim_mc._xscale = -100;
hitArea_mc._x = 22.3;
Symbol 762 MovieClip Frame 48
subAnim_mc._x = 22.6;
subAnim_mc._xscale = -100;
hitArea_mc._x = 24.4;
Symbol 762 MovieClip Frame 49
subAnim_mc._x = 24.7;
subAnim_mc._xscale = -100;
hitArea_mc._x = 26.4;
Symbol 762 MovieClip Frame 50
subAnim_mc._x = 26.8;
subAnim_mc._xscale = -100;
hitArea_mc._x = 28.5;
Symbol 762 MovieClip Frame 51
subAnim_mc._x = 28.8;
subAnim_mc._xscale = -100;
hitArea_mc._x = 30.6;
Symbol 762 MovieClip Frame 52
subAnim_mc._x = 30.9;
subAnim_mc._xscale = -100;
hitArea_mc._x = 32.6;
Symbol 762 MovieClip Frame 53
subAnim_mc._x = 33;
subAnim_mc._xscale = -100;
hitArea_mc._x = 34.7;
Symbol 762 MovieClip Frame 54
subAnim_mc._x = 35;
subAnim_mc._xscale = -100;
hitArea_mc._x = 36.8;
Symbol 762 MovieClip Frame 55
subAnim_mc._x = 35;
subAnim_mc._xscale = 100;
hitArea_mc._x = 33.4;
Symbol 762 MovieClip Frame 56
subAnim_mc._x = 33;
subAnim_mc._xscale = 100;
hitArea_mc._x = 31.4;
Symbol 762 MovieClip Frame 57
subAnim_mc._x = 31.1;
subAnim_mc._xscale = 100;
hitArea_mc._x = 29.6;
Symbol 762 MovieClip Frame 58
subAnim_mc._x = 29.1;
subAnim_mc._xscale = 100;
hitArea_mc._x = 27.6;
Symbol 762 MovieClip Frame 59
subAnim_mc._x = 27.2;
subAnim_mc._xscale = 100;
hitArea_mc._x = 25.7;
Symbol 762 MovieClip Frame 60
subAnim_mc._x = 25.3;
subAnim_mc._xscale = 100;
hitArea_mc._x = 23.8;
Symbol 762 MovieClip Frame 61
subAnim_mc._x = 23.4;
subAnim_mc._xscale = 100;
hitArea_mc._x = 21.8;
Symbol 762 MovieClip Frame 62
subAnim_mc._x = 21.4;
subAnim_mc._xscale = 100;
hitArea_mc._x = 19.9;
Symbol 762 MovieClip Frame 63
subAnim_mc._x = 19.4;
subAnim_mc._xscale = 100;
hitArea_mc._x = 17.9;
Symbol 762 MovieClip Frame 64
subAnim_mc._x = 17.5;
subAnim_mc._xscale = 100;
hitArea_mc._x = 16.1;
Symbol 762 MovieClip Frame 65
subAnim_mc._x = 15.6;
subAnim_mc._xscale = 100;
hitArea_mc._x = 14.1;
Symbol 762 MovieClip Frame 66
subAnim_mc._x = 13.6;
subAnim_mc._xscale = 100;
hitArea_mc._x = 12.2;
Symbol 762 MovieClip Frame 67
subAnim_mc._x = 11.7;
subAnim_mc._xscale = 100;
hitArea_mc._x = 10.3;
Symbol 762 MovieClip Frame 68
subAnim_mc._x = 9.8;
subAnim_mc._xscale = 100;
hitArea_mc._x = 8.3;
Symbol 762 MovieClip Frame 69
subAnim_mc._x = 7.8;
subAnim_mc._xscale = 100;
hitArea_mc._x = 6.4;
Symbol 762 MovieClip Frame 70
subAnim_mc._x = 5.8;
subAnim_mc._xscale = 100;
hitArea_mc._x = 4.5;
Symbol 762 MovieClip Frame 71
subAnim_mc._x = 3.9;
subAnim_mc._xscale = 100;
hitArea_mc._x = 2.5;
Symbol 762 MovieClip Frame 72
subAnim_mc._x = 2;
subAnim_mc._xscale = 100;
hitArea_mc._x = 0.6;
Symbol 763 MovieClip [scrolling_groundFreeVillager] Frame 2
stop();
Symbol 763 MovieClip [scrolling_groundFreeVillager] Frame 5
stop();
Symbol 785 MovieClip Frame 2
stop();
Symbol 785 MovieClip Frame 4
loopCount = 0;
Symbol 785 MovieClip Frame 5
loopCount++;
Symbol 785 MovieClip Frame 7
if (loopCount < loopMax) {
gotoAndPlay ("nab_loop");
} else {
stop();
_parent.objRef.beginNab();
}
Symbol 785 MovieClip Frame 8
gotoAndPlay ("nab_loop");
Symbol 785 MovieClip Frame 11
loopCount = 0;
Symbol 785 MovieClip Frame 12
loopCount++;
Symbol 785 MovieClip Frame 14
if (loopCount < loopMax) {
gotoAndPlay ("appear_loop");
} else {
stop();
_parent.objRef.beginWormAppear();
}
Symbol 785 MovieClip Frame 15
gotoAndPlay ("appear_loop");
Symbol 785 MovieClip Frame 18
loopCount = 0;
Symbol 785 MovieClip Frame 19
loopCount++;
Symbol 785 MovieClip Frame 21
if (loopCount < loopMax) {
gotoAndPlay ("shoot_loop");
} else {
stop();
_parent.objRef.beginWormShoot();
}
Symbol 785 MovieClip Frame 22
gotoAndPlay ("shoot_loop");
Symbol 844 MovieClip Frame 11
_root.AudioSFX_MC.gotoAndPlay("holeOpen");
Symbol 844 MovieClip Frame 31
stop();
_parent.objRef.wormTakeover();
Symbol 844 MovieClip Frame 32
_parent.objRef.wormTakeover();
Instance of Symbol 849 MovieClip in Symbol 855 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent.objRef.getRescued()) {
this._visible = false;
}
}
Instance of Symbol 849 MovieClip in Symbol 855 MovieClip Frame 2
onClipEvent (load) {
if (this._parent._parent.objRef.getRescued()) {
this._visible = false;
}
}
Instance of Symbol 849 MovieClip in Symbol 855 MovieClip Frame 3
onClipEvent (load) {
if (this._parent._parent.objRef.getRescued()) {
this._visible = false;
}
}
Instance of Symbol 849 MovieClip in Symbol 855 MovieClip Frame 4
onClipEvent (load) {
if (this._parent._parent.objRef.getRescued()) {
this._visible = false;
}
}
Instance of Symbol 849 MovieClip in Symbol 855 MovieClip Frame 5
onClipEvent (load) {
if (this._parent._parent.objRef.getRescued()) {
this._visible = false;
}
}
Instance of Symbol 849 MovieClip in Symbol 855 MovieClip Frame 6
onClipEvent (load) {
if (this._parent._parent.objRef.getRescued()) {
this._visible = false;
}
}
Symbol 855 MovieClip Frame 9
stop();
_parent.objRef.endWormNab();
Symbol 855 MovieClip Frame 10
_parent.objRef.endWormNab();
Symbol 895 MovieClip Frame 19
stop();
_parent.objRef.endWormAppear();
Symbol 895 MovieClip Frame 20
_parent.objRef.endWormAppear();
Symbol 896 MovieClip Frame 1
stop();
Symbol 906 MovieClip Frame 1
_parent._parent._parent.AudioSFX2_MC.gotoAndPlay("wormShot");
Symbol 906 MovieClip Frame 4
_parent.objRef.shootLaser();
Symbol 906 MovieClip Frame 9
stop();
_parent.objRef.endWormShoot();
Symbol 906 MovieClip Frame 10
_parent.objRef.endWormShoot();
Symbol 911 MovieClip Frame 2
clipPlaying = true;
Symbol 911 MovieClip Frame 21
clipPlaying = false;
stop();
Symbol 911 MovieClip Frame 22
clipPlaying = false;
stop();
Symbol 911 MovieClip Frame 24
clipPlaying = true;
Symbol 911 MovieClip Frame 43
clipPlaying = false;
stop();
Symbol 911 MovieClip Frame 44
clipPlaying = false;
stop();
Symbol 911 MovieClip Frame 46
clipPlaying = true;
Symbol 911 MovieClip Frame 65
stop();
Symbol 911 MovieClip Frame 66
clipPlaying = false;
stop();
Symbol 912 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 912 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 2
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 5
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 8
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 11
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 14
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 17
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 20
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 23
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 26
stop();
Symbol 913 MovieClip [scrolling_groundWormVillager] Frame 29
stop();
Symbol 948 MovieClip Frame 16
gotoAndPlay ("loop");
Symbol 953 MovieClip Frame 2
stop();
Symbol 953 MovieClip Frame 22
stop();
_parent._parent.objRef.endBurstAnim();
Symbol 953 MovieClip Frame 23
_parent._parent.objRef.endBurstAnim();
Symbol 953 MovieClip Frame 44
stop();
_parent._parent.objRef.endBurstAnim();
Symbol 953 MovieClip Frame 45
_parent._parent.objRef.endBurstAnim();
Symbol 953 MovieClip Frame 69
stop();
_parent._parent.objRef.endBurstAnim();
Symbol 953 MovieClip Frame 70
_parent._parent.objRef.endBurstAnim();
Symbol 954 MovieClip Frame 2
stop();
Symbol 954 MovieClip Frame 4
stop();
Symbol 954 MovieClip Frame 6
stop();
Symbol 954 MovieClip Frame 8
stop();
Symbol 954 MovieClip Frame 10
stop();
Symbol 954 MovieClip Frame 12
stop();
Symbol 954 MovieClip Frame 14
stop();
Symbol 954 MovieClip Frame 16
stop();
Symbol 954 MovieClip Frame 18
stop();
Symbol 954 MovieClip Frame 20
stop();
Symbol 954 MovieClip Frame 22
stop();
Symbol 955 MovieClip [scrolling_treePlatform] Frame 2
stop();
Symbol 955 MovieClip [scrolling_treePlatform] Frame 4
stop();
Symbol 955 MovieClip [scrolling_treePlatform] Frame 6
stop();
Symbol 955 MovieClip [scrolling_treePlatform] Frame 8
stop();
Symbol 955 MovieClip [scrolling_treePlatform] Frame 10
stop();
Symbol 955 MovieClip [scrolling_treePlatform] Frame 12
stop();
Symbol 962 MovieClip Frame 18
stop();
_parent.objRef.endFire();
Symbol 962 MovieClip Frame 19
_parent.objRef.endFire();
Symbol 963 MovieClip [scrolling_groundWormLaser] Frame 2
stop();
Symbol 963 MovieClip [scrolling_groundWormLaser] Frame 4
stop();
Symbol 968 MovieClip Frame 4
stop();
_parent.objRef.endBeginAnim();
Symbol 968 MovieClip Frame 5
_parent.objRef.endBeginAnim();
Symbol 998 MovieClip Frame 1
_root.AudioSFX_MC.gotoAndPlay("wormExplode");
Symbol 998 MovieClip Frame 15
stop();
_parent.objRef.iAmDone();
Symbol 998 MovieClip Frame 16
_parent.objRef.iAmDone();
Symbol 1002 MovieClip Frame 1
_root.AudioSFX_MC.gotoAndPlay("shootFlash");
Symbol 1002 MovieClip Frame 6
_parent.objRef.iAmDone();
stop();
Symbol 1002 MovieClip Frame 7
_parent.objRef.iAmDone();
Symbol 1003 MovieClip [scrolling_fireball] Frame 2
stop();
Symbol 1003 MovieClip [scrolling_fireball] Frame 4
stop();
Symbol 1003 MovieClip [scrolling_fireball] Frame 6
stop();
Symbol 1003 MovieClip [scrolling_fireball] Frame 8
stop();
Symbol 1003 MovieClip [scrolling_fireball] Frame 10
stop();
Symbol 1007 MovieClip Frame 1
_root.AudioSFX_MC.gotoAndPlay("health");
Symbol 1007 MovieClip Frame 13
stop();
_parent.objRef.endAcquisitionAnim();
Symbol 1007 MovieClip Frame 14
_parent.objRef.endAcquisitionAnim();
Symbol 1008 MovieClip [scrolling_healthKit] Frame 2
stop();
Symbol 1008 MovieClip [scrolling_healthKit] Frame 5
stop();
Symbol 1008 MovieClip [scrolling_healthKit] Frame 8
stop();
Symbol 1009 MovieClip [scrolling_invincibilityBonus] Frame 2
stop();
Symbol 1009 MovieClip [scrolling_invincibilityBonus] Frame 5
stop();
Symbol 1014 MovieClip Frame 17
stop();
_parent.objRef.wormTakeover();
Symbol 1014 MovieClip Frame 18
_parent.objRef.wormTakeover();
Symbol 1020 MovieClip Frame 5
stop();
_parent.objRef.endWormNab();
Symbol 1020 MovieClip Frame 6
_parent.objRef.endWormNab();
Symbol 1127 MovieClip Frame 2
_root.AudioSFX_MC.gotoAndPlay("wormHutRise");
Symbol 1127 MovieClip Frame 29
stop();
_parent.objRef.endWormAppear();
Symbol 1127 MovieClip Frame 30
_parent.objRef.endWormAppear();
Symbol 1128 MovieClip Frame 1
stop();
Symbol 1139 MovieClip Frame 3
stop();
_parent.objRef.endWormFlip();
Symbol 1139 MovieClip Frame 4
_parent.objRef.endWormFlip();
Symbol 1187 MovieClip Frame 2
_root.AudioSFX2_MC.gotoAndPlay("wormShot");
_parent.objRef.shootLaser();
Symbol 1187 MovieClip Frame 5
Symbol 1187 MovieClip Frame 13
stop();
_parent.objRef.endWormShoot();
Symbol 1187 MovieClip Frame 14
_parent.objRef.endWormShoot();
Symbol 1190 MovieClip Frame 1
stop();
Symbol 1193 MovieClip Frame 2
stop();
Symbol 1193 MovieClip Frame 4
stop();
Symbol 1193 MovieClip Frame 6
stop();
Symbol 1193 MovieClip Frame 8
stop();
Symbol 1194 MovieClip Frame 1
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1194 MovieClip Frame 2
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1194 MovieClip Frame 3
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1194 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1194 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 2
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 5
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 8
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 11
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 14
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 17
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 20
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 23
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 26
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 29
stop();
Symbol 1196 MovieClip [scrolling_hutWormVillager] Frame 32
stop();
Symbol 1201 MovieClip Frame 4
stop();
_parent.objRef.endBeginAnim();
Symbol 1201 MovieClip Frame 5
_parent.objRef.endBeginAnim();
Symbol 1203 MovieClip [scrolling_horizLaser] Frame 2
stop();
Symbol 1203 MovieClip [scrolling_horizLaser] Frame 4
stop();
Symbol 1203 MovieClip [scrolling_horizLaser] Frame 6
stop();
Symbol 1293 MovieClip Frame 2
_root.AudioSFX_MC.gotoAndPlay("wormHutRise");
Symbol 1293 MovieClip Frame 29
stop();
_parent.objRef.endWormAppear();
Symbol 1293 MovieClip Frame 30
_parent.objRef.endWormAppear();
Symbol 1299 MovieClip Frame 3
stop();
_parent.objRef.endWormFlip();
Symbol 1299 MovieClip Frame 4
_parent.objRef.endWormFlip();
Symbol 1339 MovieClip Frame 2
_root.AudioSFX2_MC.gotoAndPlay("wormShot");
_parent.objRef.shootLaser();
Symbol 1339 MovieClip Frame 5
Symbol 1339 MovieClip Frame 13
stop();
_parent.objRef.endWormShoot();
Symbol 1339 MovieClip Frame 14
_parent.objRef.endWormShoot();
Symbol 1342 MovieClip Frame 1
stop();
Symbol 1345 MovieClip Frame 2
stop();
Symbol 1345 MovieClip Frame 4
stop();
Symbol 1345 MovieClip Frame 6
stop();
Symbol 1345 MovieClip Frame 8
stop();
Symbol 1346 MovieClip Frame 1
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1346 MovieClip Frame 2
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1346 MovieClip Frame 3
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1346 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1346 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1348 MovieClip [scrolling_tunnelWormSmTop] Frame 2
stop();
Symbol 1348 MovieClip [scrolling_tunnelWormSmTop] Frame 5
stop();
Symbol 1348 MovieClip [scrolling_tunnelWormSmTop] Frame 8
stop();
Symbol 1348 MovieClip [scrolling_tunnelWormSmTop] Frame 11
stop();
Symbol 1348 MovieClip [scrolling_tunnelWormSmTop] Frame 14
stop();
Symbol 1348 MovieClip [scrolling_tunnelWormSmTop] Frame 17
stop();
Symbol 1348 MovieClip [scrolling_tunnelWormSmTop] Frame 20
stop();
Symbol 1351 MovieClip Frame 1
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1351 MovieClip Frame 2
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1351 MovieClip Frame 3
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1351 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1351 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1353 MovieClip [scrolling_tunnelWormSmBtm] Frame 2
stop();
Symbol 1353 MovieClip [scrolling_tunnelWormSmBtm] Frame 5
stop();
Symbol 1353 MovieClip [scrolling_tunnelWormSmBtm] Frame 8
stop();
Symbol 1353 MovieClip [scrolling_tunnelWormSmBtm] Frame 11
stop();
Symbol 1353 MovieClip [scrolling_tunnelWormSmBtm] Frame 14
stop();
Symbol 1353 MovieClip [scrolling_tunnelWormSmBtm] Frame 17
stop();
Symbol 1353 MovieClip [scrolling_tunnelWormSmBtm] Frame 20
stop();
Symbol 1431 MovieClip Frame 2
_root.AudioSFX_MC.gotoAndPlay("wormHutRise");
Symbol 1431 MovieClip Frame 29
stop();
_parent.objRef.endWormAppear();
Symbol 1431 MovieClip Frame 30
_parent.objRef.endWormAppear();
Symbol 1434 MovieClip Frame 1
stop();
Symbol 1445 MovieClip Frame 3
stop();
_parent.objRef.endWormFlip();
Symbol 1445 MovieClip Frame 4
_parent.objRef.endWormFlip();
Symbol 1475 MovieClip Frame 2
_root.AudioSFX2_MC.gotoAndPlay("wormShot");
_parent.objRef.shootLaser();
Symbol 1475 MovieClip Frame 5
Symbol 1475 MovieClip Frame 13
stop();
_parent.objRef.endWormShoot();
Symbol 1475 MovieClip Frame 14
_parent.objRef.endWormShoot();
Symbol 1478 MovieClip Frame 1
stop();
Symbol 1481 MovieClip Frame 2
stop();
Symbol 1481 MovieClip Frame 4
stop();
Symbol 1481 MovieClip Frame 6
stop();
Symbol 1481 MovieClip Frame 8
stop();
Symbol 1482 MovieClip Frame 1
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1482 MovieClip Frame 2
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1482 MovieClip Frame 3
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1482 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1482 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1484 MovieClip [scrolling_tunnelWormMedTop] Frame 2
stop();
Symbol 1484 MovieClip [scrolling_tunnelWormMedTop] Frame 5
stop();
Symbol 1484 MovieClip [scrolling_tunnelWormMedTop] Frame 8
stop();
Symbol 1484 MovieClip [scrolling_tunnelWormMedTop] Frame 11
stop();
Symbol 1484 MovieClip [scrolling_tunnelWormMedTop] Frame 14
stop();
Symbol 1484 MovieClip [scrolling_tunnelWormMedTop] Frame 17
stop();
Symbol 1484 MovieClip [scrolling_tunnelWormMedTop] Frame 20
stop();
Symbol 1487 MovieClip Frame 1
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1487 MovieClip Frame 2
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1487 MovieClip Frame 3
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1487 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1487 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1489 MovieClip [scrolling_tunnelWormMedBtm] Frame 2
stop();
Symbol 1489 MovieClip [scrolling_tunnelWormMedBtm] Frame 5
stop();
Symbol 1489 MovieClip [scrolling_tunnelWormMedBtm] Frame 8
stop();
Symbol 1489 MovieClip [scrolling_tunnelWormMedBtm] Frame 11
stop();
Symbol 1489 MovieClip [scrolling_tunnelWormMedBtm] Frame 14
stop();
Symbol 1489 MovieClip [scrolling_tunnelWormMedBtm] Frame 17
stop();
Symbol 1489 MovieClip [scrolling_tunnelWormMedBtm] Frame 20
stop();
Symbol 1589 MovieClip Frame 2
_root.AudioSFX_MC.gotoAndPlay("wormHutRise");
Symbol 1589 MovieClip Frame 37
stop();
_parent.objRef.endWormAppear();
Symbol 1589 MovieClip Frame 38
_parent.objRef.endWormAppear();
Symbol 1590 MovieClip Frame 1
stop();
Symbol 1598 MovieClip Frame 3
stop();
_parent.objRef.endWormFlip();
Symbol 1598 MovieClip Frame 4
_parent.objRef.endWormFlip();
Symbol 1634 MovieClip Frame 2
_root.AudioSFX2_MC.gotoAndPlay("wormShot");
_parent.objRef.shootLaser();
Symbol 1634 MovieClip Frame 5
Symbol 1634 MovieClip Frame 13
stop();
_parent.objRef.endWormShoot();
Symbol 1634 MovieClip Frame 14
_parent.objRef.endWormShoot();
Symbol 1637 MovieClip Frame 1
stop();
Symbol 1640 MovieClip Frame 2
stop();
Symbol 1640 MovieClip Frame 4
stop();
Symbol 1640 MovieClip Frame 6
stop();
Symbol 1640 MovieClip Frame 8
stop();
Symbol 1641 MovieClip Frame 1
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1641 MovieClip Frame 2
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1641 MovieClip Frame 3
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1641 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1641 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1643 MovieClip [scrolling_tunnelWormLgTop] Frame 2
stop();
Symbol 1643 MovieClip [scrolling_tunnelWormLgTop] Frame 5
stop();
Symbol 1643 MovieClip [scrolling_tunnelWormLgTop] Frame 8
stop();
Symbol 1643 MovieClip [scrolling_tunnelWormLgTop] Frame 11
stop();
Symbol 1643 MovieClip [scrolling_tunnelWormLgTop] Frame 14
stop();
Symbol 1643 MovieClip [scrolling_tunnelWormLgTop] Frame 17
stop();
Symbol 1643 MovieClip [scrolling_tunnelWormLgTop] Frame 20
stop();
Symbol 1646 MovieClip Frame 1
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1646 MovieClip Frame 2
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1646 MovieClip Frame 3
wormDeath_mc.gotoAndStop(_parent.objRef.getDeathState());
wormDeath_mc.subAnim_mc.gotoAndStop(_parent.objRef.getDeathStateFrame());
Symbol 1646 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1646 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1648 MovieClip [scrolling_tunnelWormLgBtm] Frame 2
stop();
Symbol 1648 MovieClip [scrolling_tunnelWormLgBtm] Frame 5
stop();
Symbol 1648 MovieClip [scrolling_tunnelWormLgBtm] Frame 8
stop();
Symbol 1648 MovieClip [scrolling_tunnelWormLgBtm] Frame 11
stop();
Symbol 1648 MovieClip [scrolling_tunnelWormLgBtm] Frame 14
stop();
Symbol 1648 MovieClip [scrolling_tunnelWormLgBtm] Frame 17
stop();
Symbol 1648 MovieClip [scrolling_tunnelWormLgBtm] Frame 20
stop();
Symbol 1709 MovieClip Frame 18
stop();
_parent.objRef.endWormAppear();
Symbol 1709 MovieClip Frame 19
_parent.objRef.endWormAppear();
Symbol 1718 MovieClip Frame 4
gotoAndPlay ("loop");
Symbol 1718 MovieClip Frame 5
gotoAndPlay ("loop");
Symbol 1720 MovieClip Frame 1
wormAppear_mc.gotoAndStop(_parent.objRef.getDestroyFrameNum());
Symbol 1720 MovieClip Frame 2
wormAppear_mc.gotoAndStop(_parent.objRef.getDestroyFrameNum());
Symbol 1720 MovieClip Frame 3
wormAppear_mc.gotoAndStop(_parent.objRef.getDestroyFrameNum());
Symbol 1720 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1720 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1721 MovieClip [scrolling_tunnelLoopWormBtm] Frame 2
stop();
Symbol 1721 MovieClip [scrolling_tunnelLoopWormBtm] Frame 5
stop();
Symbol 1721 MovieClip [scrolling_tunnelLoopWormBtm] Frame 8
stop();
Symbol 1721 MovieClip [scrolling_tunnelLoopWormBtm] Frame 11
stop();
Symbol 1721 MovieClip [scrolling_tunnelLoopWormBtm] Frame 14
stop();
Symbol 1723 MovieClip Frame 1
wormAppear_mc.gotoAndStop(_parent.objRef.getDestroyFrameNum());
Symbol 1723 MovieClip Frame 2
wormAppear_mc.gotoAndStop(_parent.objRef.getDestroyFrameNum());
Symbol 1723 MovieClip Frame 3
wormAppear_mc.gotoAndStop(_parent.objRef.getDestroyFrameNum());
Symbol 1723 MovieClip Frame 20
stop();
_parent.objRef.endWormDeath();
Symbol 1723 MovieClip Frame 21
_parent.objRef.endWormDeath();
Symbol 1724 MovieClip [scrolling_tunnelLoopWormTop] Frame 2
stop();
Symbol 1724 MovieClip [scrolling_tunnelLoopWormTop] Frame 5
stop();
Symbol 1724 MovieClip [scrolling_tunnelLoopWormTop] Frame 8
stop();
Symbol 1724 MovieClip [scrolling_tunnelLoopWormTop] Frame 11
stop();
Symbol 1724 MovieClip [scrolling_tunnelLoopWormTop] Frame 14
stop();
Symbol 1727 MovieClip Frame 9
gotoAndPlay ("loop");
Symbol 1727 MovieClip Frame 10
gotoAndPlay ("loop");
Symbol 1728 MovieClip [scrolling_villagerLargeStalactite] Frame 2
stop();
Symbol 1728 MovieClip [scrolling_villagerLargeStalactite] Frame 5
stop();
Symbol 1728 MovieClip [scrolling_villagerLargeStalactite] Frame 8
stop();
Symbol 1730 MovieClip [scrolling_villagerSmallStalactite] Frame 2
stop();
Symbol 1730 MovieClip [scrolling_villagerSmallStalactite] Frame 5
stop();
Symbol 1730 MovieClip [scrolling_villagerSmallStalactite] Frame 8
stop();
Symbol 1732 MovieClip [scrolling_villagerLargeStalagmite] Frame 2
stop();
Symbol 1732 MovieClip [scrolling_villagerLargeStalagmite] Frame 5
stop();
Symbol 1732 MovieClip [scrolling_villagerLargeStalagmite] Frame 8
stop();
Symbol 1733 MovieClip [scrolling_villagerSmallStalagmite] Frame 2
stop();
Symbol 1733 MovieClip [scrolling_villagerSmallStalagmite] Frame 5
stop();
Symbol 1733 MovieClip [scrolling_villagerSmallStalagmite] Frame 8
stop();
Symbol 1737 MovieClip Frame 2
stop();
Symbol 1737 MovieClip Frame 23
stop();
_parent._parent.objRef.endPointsAnim();
Symbol 1737 MovieClip Frame 24
stop();
_parent._parent.objRef.endPointsAnim();
Symbol 1737 MovieClip Frame 45
stop();
_parent._parent.objRef.endPointsAnim();
Symbol 1737 MovieClip Frame 46
stop();
_parent._parent.objRef.endPointsAnim();
Symbol 1737 MovieClip Frame 70
stop();
_parent._parent.objRef.endPointsAnim();
Symbol 1737 MovieClip Frame 71
stop();
_parent._parent.objRef.endPointsAnim();
Symbol 1784 MovieClip Frame 25
stop();
_parent.objRef.endRescue();
Symbol 1784 MovieClip Frame 26
_parent.objRef.endRescue();
Symbol 1785 MovieClip [scrolling_ladder] Frame 1
stop();
Symbol 1785 MovieClip [scrolling_ladder] Frame 4
stop();
Symbol 1786 MovieClip Frame 1
stop();
Symbol 1788 MovieClip Frame 1
stop();
Symbol 1788 MovieClip Frame 3
play();
Symbol 1788 MovieClip Frame 20
stop();
GameControl.fireIris();
Symbol 1801 MovieClip Frame 1
stop();
rescueCount_txt.text = GameStats.getVillagersRescued();
score_txt.text = GameStats.getScore();
wormCount_txt.text = GameStats.getWormsDestroyed();
Symbol 1808 MovieClip Frame 1
play();
Symbol 1808 MovieClip Frame 2
_root.AudioSFX_MC.gotoAndPlay("endSlide");
Symbol 1808 MovieClip Frame 10
playAgain_btn.onRelease = function () {
GameControl.playAgain();
};
submit_btn.onRelease = function () {
GameControl.submitScore();
};
stop();
Symbol 1817 MovieClip Frame 7
_root.AudioSFX_MC.gotoAndPlay("endSlide");
Symbol 1817 MovieClip Frame 14
rescueCount_txt.text = GameStats.getVillagersRescued();
score_txt.text = GameStats.getScore();
wormCount_txt.text = GameStats.getWormsDestroyed();
Symbol 1817 MovieClip Frame 17
playAgain_btn.onRelease = function () {
GameControl.playAgain();
};
submit_btn.onRelease = function () {
GameControl.submitScore();
};
stop();