Frame 1
function loadSponsorsSite() {
trace("LOADING NG");
trace(NewgroundsAPI.loadNewgrounds());
}
function loadBgroup() {
getURL ("http://www.bgroupproductions.com", _blank);
}
function loadPhantasmagor() {
getURL ("http://phantasmagor.newgrounds.com/", _blank);
}
function loadBrian() {
getURL ("http://thatcomposerguy.newgrounds.com/", _blank);
}
function loadAndy() {
getURL ("http://andyopus.newgrounds.com/", _blank);
}
function loadJosh() {
getURL ("http://tomamoto.newgrounds.com/", _blank);
}
function loadFacebookSite() {
sharePage = "http://www.newgrounds.com/portal/view/530578";
getURL ("http://www.facebook.com/share.php?u=" + sharePage, _blank);
}
function DisplayAward(Title) {
saveData();
com.newgrounds.API.unlockMedal(Title);
}
function loadData() {
trace("LOADING DATA");
awd_Master = saves.data.awd_Master;
awd_GoodShepherd = saves.data.awd_GoodShepherd;
awd_LifeSaver = saves.data.awd_LifeSaver;
awd_SpecialDay = saves.data.awd_SpecialDay;
awd_Juggling = saves.data.awd_Juggling;
}
function saveData() {
saves.data.newGame = false;
saves.data.awd_Master = awd_Master;
saves.data.awd_GoodShepherd = awd_GoodShepherd;
saves.data.awd_LifeSaver = awd_LifeSaver;
saves.data.awd_SpecialDay = awd_SpecialDay;
saves.data.awd_Juggling = awd_Juggling;
saves.flush();
}
NewgroundsAPI.connectMovie(11479);
_root.correctDomains = new Array();
saves = SharedObject.getLocal("SaintP");
awd_Master = false;
awd_GoodShepherd = false;
awd_SpecialDay = false;
awd_Juggling = false;
awd_LifeSaver = false;
if (saves.data.newGame == undefined) {
saveData();
} else {
loadData();
}
function playImpact() {
if (!_root.mute) {
_root.impact.gotoAndStop(random(9) + 2);
}
}
function playBah() {
if (!_root.mute) {
_root.bah.gotoAndStop(random(4) + 2);
}
}
function playChicken() {
if (!_root.mute) {
_root.chicken.gotoAndStop(random(2) + 2);
}
}
function playWhoosh() {
if (!_root.mute) {
_root.whoosh.gotoAndStop(random(9) + 2);
}
}
function playJump() {
if (!_root.mute) {
_root.jump.gotoAndStop(random(8) + 2);
}
}
function playSpecial() {
if (!_root.mute) {
_root.special.play();
}
}
function playLepHit() {
if (!_root.mute) {
_root.lepHit.gotoAndStop(random(9) + 2);
}
}
function playPatHit() {
if (!_root.mute) {
_root.patHit.gotoAndStop(random(7) + 2);
}
}
function playDruidHit() {
if (!_root.mute) {
_root.druidHit.gotoAndStop(random(7) + 2);
}
}
function playDruidKiss() {
if (!_root.mute) {
_root.druidKiss.gotoAndStop(random(3) + 2);
}
}
function playDruidDrink() {
if (!_root.mute) {
_root.druidKiss.gotoAndStop(random(3) + 2);
}
}
function playLepRandom() {
if ((!_root.mute) && (lastLepRandom == 0)) {
do {
randomChoice = random(7) + 2;
used = false;
i = 0;
while (i < lepRandomChoices.length) {
if (lepRandomChoices[i] == randomChoice) {
used = true;
}
i++;
}
} while (used);
if (lepRandomChoices.length > 4) {
lepRandomChoices.splice(0, 1);
}
lepRandomChoices.push(randomChoice);
_root.lepRandom.gotoAndStop(randomChoice);
lastLepRandom = 30;
}
}
function playLepGreeting() {
if (((!_root.mute) && (lastLepRandom == 0)) && ((numberPlayed < 7) || (random(10) < 7))) {
do {
randomChoice = random(7) + 2;
used = false;
i = 0;
while (i < lepRandomGreeting.length) {
if (lepRandomGreeting[i] == randomChoice) {
used = true;
}
i++;
}
} while (used);
numberPlayed++;
if (numberPlayed == 7) {
lepRandomGreeting.splice(0, 4);
}
if (lepRandomGreeting.length > 4) {
lepRandomGreeting.splice(0, 1);
}
lepRandomGreeting.push(randomChoice);
_root.lepGreeting.gotoAndStop(randomChoice);
lastLepRandom = 30;
}
}
function playNinjaThrow() {
if (!_root.mute) {
_root.ninjaThrow.gotoAndStop(random(1) + 2);
}
}
function playCloverHit() {
if (!_root.mute) {
_root.cloverHit.gotoAndStop(random(5) + 2);
}
}
function playRevive() {
if (!_root.mute) {
_root.revive.gotoAndStop(random(1) + 2);
}
}
function playGulp() {
if (!_root.mute) {
_root.gulp.gotoAndStop(random(2) + 2);
}
}
function playChew() {
if (!_root.mute) {
_root.chew.gotoAndStop(random(3) + 2);
}
}
function playSip() {
if (!_root.mute) {
_root.sip.gotoAndStop(random(3) + 2);
}
}
function playDing() {
if (!_root.mute) {
_root.ding.gotoAndStop(random(1) + 2);
}
}
function playCoin() {
if (!_root.mute) {
_root.coin.gotoAndStop(random(2) + 2);
}
}
function playVictory() {
if (!_root.mute) {
_root.victory.gotoAndStop(random(1) + 2);
}
}
function playRollOver() {
if (!_root.mute) {
_root.rlovr.gotoAndStop(random(1) + 2);
}
}
function playSnakeHit() {
if (!_root.mute) {
_root.snakeHit.gotoAndStop(random(4) + 2);
}
}
function playRumble() {
if (!_root.mute) {
_root.rumbleSound.gotoAndStop(random(1) + 2);
}
}
function playBoost() {
if (!_root.mute) {
_root.boost.gotoAndStop(random(1) + 2);
}
}
function playSpecialWhoosh() {
if (!_root.mute) {
_root.whoosh.gotoAndStop(11);
}
}
function playWaterBlast() {
if (!_root.mute) {
_root.waterBlast.gotoAndStop(random(5) + 2);
}
}
function playRockHit() {
if (!_root.mute) {
_root.rockhit.gotoAndStop(random(3) + 2);
}
}
function playDruidDrink() {
if (!_root.mute) {
_root.druidDrink.gotoAndStop(random(3) + 2);
}
}
function playDruidKiss() {
if (!_root.mute) {
_root.druidKiss.gotoAndStop(random(3) + 2);
}
}
function playClose() {
if (!_root.mute) {
_root.closeTalk.play();
}
}
function gotoBonus() {
stopAllSounds();
_root.gotoAndStop(10);
}
function setCoinsNeeded() {
if (_root._currentframe == 3) {
_root.cNeeded1 = 3;
_root.cNeeded2 = 10;
_root.cNeeded3 = 20;
_root.cNeeded4 = 21;
if (_root.difficulty == 1) {
_root.cNeeded2 = 8;
_root.cNeeded3 = 15;
_root.cNeeded4 = 16;
}
} else {
_root.cNeeded1 = 25;
_root.cNeeded2 = 30;
_root.cNeeded3 = 50;
_root.cNeeded4 = 50;
_root.cNeeded5 = 50;
if (_root.difficulty == 1) {
_root.cNeeded1 = 20;
_root.cNeeded2 = 25;
}
}
}
function initialiseLevelVariables() {
_root.coinsAround = 0;
_root.cinematic = false;
_root.bossMusic = false;
_root.area = 1;
setCoinsNeeded();
if (_root._currentframe == 3) {
_root.superCharge = 1;
_root.lives = 4;
_root.coins = 0;
_root.maxX1 = 800;
_root.maxX2 = 1800;
_root.maxX3 = 3260;
_root.maxX4 = 3500;
} else {
if (_root.difficulty == 1) {
_root.coins = 16;
} else {
_root.coins = 21;
}
_root.maxX1 = 1020;
_root.maxX2 = 2170;
_root.maxX3 = 3550;
_root.maxX4 = 3550;
}
_root.pickupNumber = 0;
_root.cloverAttackNum = 0;
_root.cloverNum = 0;
_root.cloversHit = 0;
_root.cloversHitFeet = 0;
_root.sheepNo = 0;
_root.indicatorNo = 0;
_root.lepNo = 0;
_root.bloodNo = 0;
_root.rumblePower = 0;
_root.rumbleTime = 0;
_root.origX = 0;
_root.origY = 0;
_root.reset = true;
_root.lepArr = new Array();
_root.cloverArr = new Array();
_root.snakeArr = new Array();
_root.sheepArr = new Array();
_root.maxLeps = 1;
_root.spawnDelay = 150;
_root.minSpawnTime = 45;
_root.maxSpawnTime = 105;
_root.lepsAlive = 0;
_root.coinLeps = 0;
_root.maxSnakes = 4;
_root.snakeSpawnDelay = 150;
_root.snakesAlive = 0;
_root.chargePickups = 0;
_root.lvlColor = new Color(_root.lvl);
}
function initialiseEnemyList(lvlNo) {
_root.enemyList = new Array();
_root.enemyList.push({n:"Aherne", t:3, p:3});
_root.enemyList.push({n:"Ambrose", t:2, p:0});
_root.enemyList.push({n:"Clovers O'Connor", t:1, p:3});
_root.enemyList.push({n:"Barney", t:1, p:1});
_root.enemyList.push({n:"O'Flaherty", t:1, p:0});
_root.enemyList.push({n:"Beirne", t:2, p:0});
_root.enemyList.push({n:"Thirsy Thomas", t:1, p:3});
_root.enemyList.push({n:"Quick Billy", t:1, p:0});
_root.enemyList.push({n:"Black", t:2, p:3});
_root.enemyList.push({n:"Mulligan", t:1, p:1});
_root.enemyList.push({n:"Kenny", t:1, p:3});
_root.enemyList.push({n:"Bohan", t:2, p:0});
_root.enemyList.push({n:"Brady", t:1, p:3});
_root.enemyList.push({n:"Branagan", t:1, p:0});
_root.enemyList.push({n:"Brennan", t:1, p:0});
_root.enemyList.push({n:"Brian", t:1, p:0});
_root.enemyList.push({n:"O'Neill", t:2, p:3});
_root.enemyList.push({n:"Brogan", t:2, p:0});
_root.enemyList.push({n:"Buckley", t:2, p:3});
_root.enemyList.push({n:"Merry", t:2, p:0});
_root.enemyList.push({n:"Burke", t:1, p:0});
_root.enemyList.push({n:"Caffrey", t:1, p:3});
_root.enemyList.push({n:"Cahill", t:1, p:0});
_root.enemyList.push({n:"Callaghan", t:1, p:1});
_root.enemyList.push({n:"Clancy", t:1, p:3});
_root.enemyList.push({n:"Cliff", t:0, p:0});
_root.enemyList.push({n:"Clontarf", t:0, p:0});
_root.enemyList.push({n:"Coady", t:0, p:0});
_root.enemyList.push({n:"Hannigan", t:2, p:2});
_root.enemyList.push({n:"Conroy", t:2, p:3});
_root.enemyList.push({n:"Cooney", t:1, p:3});
_root.enemyList.push({n:"Coughlan", t:1, p:0});
_root.enemyList.push({n:"O'Grady", t:1, p:1});
_root.enemyList.push({n:"Crowley", t:2, p:3});
_root.enemyList.push({n:"Cunningham", t:2, p:3});
_root.enemyList.push({n:"Daly", t:1, p:0});
_root.enemyList.push({n:"Danaher", t:1, p:0});
_root.enemyList.push({n:"Bailey", t:2, p:3});
_root.enemyList.push({n:"Danny", t:1, p:0});
_root.enemyList.push({n:"Davy", t:1, p:3});
_root.enemyList.push({n:"Delaney", t:1, p:0});
_root.enemyList.push({n:"Dempsey", t:2, p:3});
_root.enemyList.push({n:"Doheny", t:1, p:0});
_root.enemyList.push({n:"Donegan", t:1, p:1});
_root.enemyList.push({n:"Doyle", t:1, p:3});
_root.enemyList.push({n:"O'Dwyer", t:2, p:3});
_root.enemyList.push({n:"Fahy", t:2, p:0});
_root.enemyList.push({n:"Fallon", t:2, p:0});
_root.enemyList.push({n:"Finnegan", t:2, p:0});
_root.enemyList.push({n:"Flynn", t:1, p:3});
_root.enemyList.push({n:"Gallagher", t:1, p:0});
_root.enemyList.push({n:"O'Keefe", t:1, p:3});
_root.enemyList.push({n:"Gerard", t:2, p:0});
_root.enemyList.push({n:"Grogan", t:2, p:3});
_root.enemyList.push({n:"Gilroy", t:1, p:0});
_root.enemyList.push({n:"Glancy", t:2, p:1});
_root.enemyList.push({n:"Gleeson", t:1, p:3});
_root.enemyList.push({n:"Conway", t:1, p:0});
_root.enemyList.push({n:"Healy", t:2, p:0});
_root.enemyList.push({n:"Hogan", t:1, p:3});
_root.enemyList.push({n:"O'Toole", t:2, p:1});
_root.enemyList.push({n:"O'Neil", t:1, p:0});
_root.enemyList.push({n:"O'Riely", t:1, p:0});
_root.enemyList.push({n:"O'Boyle", t:1, p:0});
_root.enemyList.push({n:"O'Brien", t:2, p:3});
_root.enemyList.push({n:"Baggott", t:1, p:0});
_root.enemyList.push({n:"O'Donohue", t:1, p:3});
_root.enemyList.push({n:"O'Donovan", t:1, p:0});
_root.enemyList.push({n:"O'Driscoll", t:2, p:3});
_root.enemyList.push({n:"Gleeson", t:1, p:0});
_root.enemyList.push({n:"O'Mally", t:1, p:3});
_root.enemyList.push({n:"Paddy", t:1, p:0});
_root.enemyList.push({n:"O'Riely", t:1, p:1});
_root.enemyList.push({n:"Peter", t:1, p:3});
p = 0;
inc = 5;
swap = 3;
i = 0;
while (i < 1000) {
p1 = p % _root.enemyList.length;
p2 = (p + swap) % _root.enemyList.length;
tmp = _root.enemyList[p1].n;
_root.enemyList[p1].n = _root.enemyList[p2].n;
_root.enemyList[p2].n = tmp;
p = p + inc;
i++;
}
if (_root._currentframe == 5) {
if (_root.difficulty == 1) {
num = 50;
} else {
num = 50;
}
i = 0;
while (i < num) {
_root.enemyList.pop();
i++;
}
}
_root.originalTotal = _root.enemyList.length;
}
stop();
Stage.scaleMode = StageScaleMode.NO_SCALE;
Stage.align = StageAlign.TOP_LEFT;
Stage.showMenu = false;
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.cinematic = false;
_root.bossMusic = false;
_root.mute = false;
_root.freeze = true;
lastLepRandom = 0;
lepRandomChoices = new Array();
lepRandomGreeting = new Array();
lepRandomGreeting.push(2);
lepRandomGreeting.push(3);
lepRandomGreeting.push(4);
lepRandomGreeting.push(5);
lepRandomGreeting.push(6);
lepRandomGreeting.push(8);
numberPlayed = 0;
_root.superCharge = 1;
Instance of Symbol 727 MovieClip [API Connector (NewgroundsAPI)] in Frame 1
//component parameters
onClipEvent (construct) {
encryption_key = "2fj8Io8iewxFE0V1YqeCbahOoZ0iuvmo";
movie_id = "11479";
movie_version = "1";
fake_session = true;
debug = true;
error_screens = true;
medal_popups = true;
}
Frame 2
stop();
_root.selectedDiff = false;
var today = new Date();
var day = today.getDate();
var month = (today.getMonth() + 1);
var year = today.getFullYear();
trace((((("DATE: " + day) + "/") + month) + "/") + year);
if ((day == 17) && (month == 3)) {
if (!_root.awd_SpecialDay) {
_root.awd_SpecialDay = true;
_root.DisplayAward("The Special Day");
trace("Happy Saint Patricks day!");
}
}
Frame 3
function createRumble(power, time) {
if (power > rumblePower) {
rumblePower = power;
rumbleTime = time;
origX = lvl._x;
origY = lvl._y;
reset = false;
}
}
function setLepValues() {
if (_root._currentframe == 5) {
if (_root.coins < _root.cNeeded1) {
maxLeps = 2;
} else if (_root.coins < (_root.cNeeded2 - 1)) {
maxLeps = 4;
} else if (_root.coins < _root.cNeeded2) {
maxLeps = 1;
}
} else if (_root.coins < 2) {
maxLeps = 1;
} else if (_root.coins < 7) {
maxLeps = 2;
} else if (_root.coins < _root.cNeeded2) {
maxLeps = 3;
} else if (_root.coins < (_root.cNeeded2 + 3)) {
maxLeps = 2;
} else if (_root.coins < _root.cNeeded4) {
maxLeps = 4 - (2 - _root.difficulty);
}
}
function spawnLep() {
setLepValues();
waitForLastBigDude = (((_root._currentframe == 5) && (_root.enemyList.length == 1)) && (_root.coins < (_root.cNeeded2 - 1))) && (_root.lepsAlive > 0);
waitForCoinCollection = (_root.enemyList[_root.enemyList.length - 1].p == 3) && (_root.coinsAround > 1);
if (waitForLastBigDude || (waitForCoinCollection)) {
return(undefined);
}
if ((((_root.lepsAlive < maxLeps) && (_root.enemyList.length > 0)) && (coinLeps < _root["cNeeded" + _root.area])) && (_root.lvl.maxX >= _root["maxX" + _root.area])) {
if (spawnDelay <= 0) {
spawnDelay = (minSpawnTime + random(maxSpawnTime - minSpawnTime)) - (5 * (enMax - maxLeps));
if (maxLeps == 1) {
spawnDelay = spawnDelay - (5 * (enMax - maxLeps));
}
nam = _root.enemyList[_root.enemyList.length - 1].n;
typ = _root.enemyList[_root.enemyList.length - 1].t;
pick = _root.enemyList[_root.enemyList.length - 1].p;
if ((typ == 1) || (typ == 3)) {
tmp = _root.lvl.enemies.attachMovie("lep", "lep" + _root.lepNo, _root.lepNo++);
} else {
tmp = _root.lvl.enemies.attachMovie("ninja", "lep" + _root.lepNo, _root.lepNo++);
}
if (pick == 3) {
coinLepCount++;
tmp.countNum = coinLepCount;
trace(((coinLepCount + ": ") + nam) + " created");
coinLeps++;
}
scaleNo = 0.35 - (random(10) / 100);
if (typ == 3) {
scaleNo = 0.5;
}
tmp._width = tmp._width * scaleNo;
tmp._height = tmp._height * scaleNo;
if (random(2)) {
tmp._x = ((-_root.lvl._x) + 400) - 500;
} else {
tmp._x = ((-_root.lvl._x) + 400) + 500;
}
tmp._y = 400;
} else {
spawnDelay--;
}
}
}
function setSnakeValues() {
if (_root._currentframe == 5) {
if (_root.coins > (_root.cNeeded2 - 3)) {
if ((_root.lepArr.length > 1) || (_root.bossMusic)) {
maxSnakes = 2;
} else {
maxSnakes = 0;
}
} else if (_root.coins > _root.cNeeded1) {
maxSnakes = 3 - (2 - _root.difficulty);
} else {
maxSnakes = 2 - (2 - _root.difficulty);
}
} else if (_root.coins > (_root.cNeeded3 - 2)) {
maxSnakes = 0;
} else if (_root.coins > _root.cNeeded2) {
maxSnakes = 1;
} else if (_root.coins > (_root.cNeeded2 - 2)) {
maxSnakes = 3 - (2 - _root.difficulty);
} else if (_root.coins > 5) {
maxSnakes = 1;
} else {
maxSnakes = 0;
}
}
function spawnSnakes() {
setSnakeValues();
if (snakeSpawnDelay <= 0) {
snakeSpawnDelay = minSpawnTime + random(maxSpawnTime - minSpawnTime);
if (snakesAlive < maxSnakes) {
tmp = _root.lvl.enemies.attachMovie("snake", "snake" + _root.lepNo, _root.lepNo++);
scaleNo = 0.35 - (random(10) / 100);
tmp._width = tmp._width * scaleNo;
tmp._height = tmp._height * scaleNo;
if (random(2)) {
tmp._x = ((-_root.lvl._x) + 400) - 500;
} else {
tmp._x = ((-_root.lvl._x) + 400) + 500;
}
tmp._y = 400;
}
} else {
snakeSpawnDelay--;
}
}
function createPickup(x, y, num) {
if ((num == 0) && (random(4) == 0)) {
num = num + 2;
}
if (num == 1) {
if ((_root.superCharge + _root.chargePickups) < 3) {
createGuiness(x, y);
} else {
createPotato(x, y);
}
} else if (num == 2) {
createPotato(x, y);
} else if (num == 3) {
createCoin(x, y);
} else if (num == 4) {
createStew(x, y);
}
}
function createGuiness(x, y) {
tmp = _root.lvl.pickups.attachMovie("guiness", "pickup" + _root.pickupNumber, _root.pickupNumber++);
_root.chargePickups++;
tmp._x = x;
tmp._y = y - 30;
}
function createPotato(x, y) {
tmp = _root.lvl.pickups.attachMovie("potato", "pickup" + _root.pickupNumber, _root.pickupNumber++);
tmp._x = x;
tmp._y = y - 30;
}
function createCoin(x, y) {
tmp = _root.lvl.pickups.attachMovie("coin", "pickup" + _root.pickupNumber, _root.pickupNumber++);
tmp._x = x;
tmp._y = y - 30;
}
function createStew(x, y) {
tmp = _root.lvl.pickups.attachMovie("stew", "pickup" + _root.pickupNumber, _root.pickupNumber++);
tmp._x = x;
tmp._y = y - 30;
}
_root.sheepKilled = false;
initialiseEnemyList();
initialiseLevelVariables();
var pDown = false;
onEnterFrame = function () {
if (_root._currentframe > 2) {
if (lastLepRandom > 0) {
lastLepRandom--;
}
if (_root._currentframe == 4) {
if (_root.totalSoup < _root.sheepArr.length) {
_root.totalSoup = _root._root.sheepArr.length;
}
MiddleDis.text = (("Stew: " + _root.soupCollected) + "/") + _root.totalSoup;
} else {
MiddleDis.text = "";
}
if (_root.inMenu._currentframe == 3) {
return(undefined);
}
if (_root.area < 5) {
_root.goldDis.text = (_root.coins + "/") + _root["cNeeded" + _root.area];
if (_root.coins == _root["cNeeded" + _root.area]) {
_root.parrow.showTime = 120;
_root.area++;
_root.playVictory();
}
}
if (_root.lepNo > 20) {
_root.lepNo = 0;
}
if (_root.sheepNo > 20) {
_root.sheepNo = 0;
}
if (_root.indicatorNo > 30) {
_root.indicatorNo = 0;
}
if (_root.bloodNo > 150) {
_root.bloodNo = 0;
}
if (_root.area < 4) {
spawnLep();
spawnSnakes();
}
if ((((Key.isDown(80) || (Key.isDown(27))) && (_root.lvl.pat.health > 0)) && (!_root.cinematic)) && (_root.inMenu._currentframe < 3)) {
if (!pDown) {
freeze = !freeze;
_root.inMenu.gotoAndStop(freeze + 1);
}
pDown = true;
} else {
pDown = false;
}
if (!_root.freeze) {
if (rumbleTime > 0) {
rumbleTime--;
lvl._x = (origX + random(rumblePower)) - (rumblePower / 2);
lvl._y = (origY + random(rumblePower)) - (rumblePower / 2);
} else if (!reset) {
rumblePower = 0;
reset = true;
lvl._x = origX;
lvl._y = origY;
}
}
}
};
coinLepCount = 0;
Frame 4
initialiseLevelVariables();
_root.totalSoup = 0;
_root.soupCollected = 0;
_root.area = 6;
_root.maxX6 = 1750;
_root.freeze = true;
_root.inMenu.gotoAndStop(5);
Frame 5
_root.inMenu.gotoAndStop(1);
_root.freeze = false;
initialiseEnemyList();
initialiseLevelVariables();
Frame 8
if ((!_root.sheepKilled) && (!_root.awd_GoodShepherd)) {
_root.awd_GoodShepherd = true;
_root.DisplayAward("Good Shepherd");
}
Frame 10
stopAllSounds();
_root.gotoAndStop(4);
Symbol 6 MovieClip [award] Frame 1
var velocity = ((50 - this._y) / 100);
var lifeTime = 150;
onEnterFrame = function () {
velocity = velocity + ((target - this._y) / 80);
velocity = velocity / 1.1;
this._y = this._y + velocity;
if (lifeTime > 0) {
lifeTime--;
} else {
_alpha = (_alpha - 2);
if (_alpha <= 0) {
this.removeMovieClip();
}
}
};
Symbol 29 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 32 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 32 MovieClip Frame 2
stop();
Symbol 33 MovieClip [rock] Frame 1
function hitPat() {
damage = (random(5) + 5) * _root.difficulty;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -3 : 3), damage, true);
}
stop();
_alpha = 0;
var xSpd = ((random(4) + 12) * dir);
var ySpd = (3 + random(3));
var gravity = 2;
var timeTime = 0;
origHeight = inside._height;
notHitYet = true;
hitBack = false;
hitByPat = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
timeTime++;
if (timeTime > 100) {
this.inside._y = this.inside._y + 5;
if (this.inside._y > (origHeight * 1.5)) {
this.swapDepths(9999);
this.removeMovieClip();
}
}
_y = (_y + ySpd);
_x = (_x + xSpd);
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
while (_root.lvl.slope.hitTest(screenX, screenY - 5, true) && (ySpd >= 0)) {
_y = (_y-1);
screenY--;
}
if ((this.inside.small.hitTest(_root.lvl.enemies.druid.hitMain) && (Math.abs(xSpd) > 2)) && (hitBack)) {
hitBack = false;
_root.lvl.enemies.druid.takeRockHit();
}
if (_root.lvl.pat._currentframe == 4) {
xd = this._x - _root.lvl.pat._x;
front = (_root.lvl.pat.attackNum == 3) || (((_root.lvl.facing > 0) ? (((xd > 0) ? true : false)) : (((xd < 0) ? true : false))));
if (((front && (_root.lvl.pat.attacking)) && (this.inside.small.hitTest(_root.lvl.pat))) && (!hitBack)) {
hitByPat = true;
hitBack = true;
_root.playImpact();
if (this._x < _root.lvl.pat._x) {
xSpd = -20;
} else {
xSpd = 20;
}
ySpd = -20;
}
}
if ((this.hitTest(_root.lvl.pat.hitboxSmall) && (Math.abs(xSpd) > 4)) && (!hitByPat)) {
notHitYet = false;
hitPat();
if (xSpd > 0) {
xSpd = 2;
}
if (xSpd < 0) {
xSpd = -2;
}
}
if (_root.lvl.slope.hitTest(screenX, screenY, true)) {
if (notHitYet) {
_root.playRockHit();
_root.createRumble(15, 8);
notHitYet = false;
}
if (ySpd >= 0) {
ySpd = (-ySpd) * 0.3;
}
xSpd = xSpd * 0.9;
} else {
ySpd = ySpd + gravity;
}
if (Math.abs(xSpd) < 1) {
xSpd = 0;
this.inside.stop();
}
}
};
Symbol 69 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 89 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 96 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 96 MovieClip Frame 2
stop();
Symbol 97 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 97 MovieClip Frame 17
_root.createRumble(50, 10);
xUsed = new Array();
yUsed = new Array();
i = 0;
while (i < (4 + _root.difficulty)) {
tmp = _root.lvl.enemies.attachMovie("brick", "brick" + _root.lepNo, _root.lepNo++);
if (i == 0) {
tmp.follow = true;
} else {
tmp.follow = false;
}
do {
used = false;
x = (_parent._parent._x + random(1200)) - 600;
y = -300 - random(600);
j = 0;
while (j < xUsed.length) {
if (((Math.abs(xUsed[j] - x) < 300) && (Math.abs(yUsed[j] - y) < 300)) || (Math.abs(_parent._parent._x - x) < 100)) {
used = true;
}
j++;
}
} while (used);
yUsed.push(y);
xUsed.push(x);
tmp._x = x;
tmp._y = y;
i++;
}
Symbol 97 MovieClip Frame 32
_root.createRumble(10, 20);
Symbol 97 MovieClip Frame 42
_parent.gotoAndStop(1);
Symbol 189 MovieClip Frame 1
_root.lvl.pat.gotoAndStop(10);
if (_parent._parent._x < _root.lvl.pat._x) {
_parent._parent._xscale = -_parent._parent.origScale;
} else {
_parent._parent._xscale = _parent._parent.origScale;
}
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 189 MovieClip Frame 5
_parent.attacking = true;
_root.playWhoosh();
Symbol 189 MovieClip Frame 12
_root.lvl.pat._visible = false;
_root.lvl.pat._x = _parent._parent._x;
Symbol 189 MovieClip Frame 23
throwLeft = false;
trace("STANDING AT X: " + _parent._parent._x);
if (_parent._parent._x < 2850) {
trace("THROWING RIGHT");
_parent._parent._xscale = _parent._parent.origScale;
} else {
trace("THROWING LEFT");
throwLeft = true;
_parent._parent._xscale = -_parent._parent.origScale;
}
Symbol 189 MovieClip Frame 30
_root.lvl.pat._visible = true;
_root.lvl.pat.gotoAndStop(11);
_root.lvl.pat._y = _parent._parent._y - 120;
_root.lvl.ySpd = -5;
if (!throwLeft) {
_root.lvl.pat._xscale = _root.lvl.origScale;
_root.lvl.pat._x = _parent._parent._x + 100;
_root.lvl.xSpd = 30;
} else {
_root.lvl.pat._xscale = -_root.lvl.origScale;
_root.lvl.pat._x = _parent._parent._x - 100;
_root.lvl.xSpd = -30;
}
Symbol 189 MovieClip Frame 57
_parent.gotoAndStop(1);
Symbol 221 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 221 MovieClip Frame 80
_root.bossMusic = false;
Symbol 221 MovieClip Frame 150
stop();
Symbol 251 MovieClip Frame 13
stop();
if ((_root.difficulty == 2) && (!_root.awd_Master)) {
_root.awd_Master = true;
_root.DisplayAward("Master");
}
count = _root.coins;
timing = 0;
_root.music.gotoAndStop(1);
onEnterFrame = function () {
timing++;
if ((count < 50) && ((timing % 20) == 0)) {
count++;
_root.createPickup(random(1200) + 2250, -100, 3);
}
};
Symbol 259 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 309 MovieClip Frame 40
_root.createRumble(5, 40);
Symbol 309 MovieClip Frame 100
_root.createRumble(30, 15);
Symbol 309 MovieClip Frame 150
_root.createRumble(30, 15);
Symbol 309 MovieClip Frame 169
_root.cinematic = false;
_root.freeze = false;
_root.bossMusic = true;
_root.area = 3;
_parent._parent.healthBar.offsetY = _parent._parent._height - 30;
_parent._parent.healthBar.alwaysShow = true;
_root.superCharge = 0;
_parent.gotoAndStop(1);
Symbol 322 MovieClip Frame 1
_parent._parent.dazed = true;
if (_root.lvl.pat._currentframe == 10) {
_root.lvl.pat._visible = true;
_root.lvl.pat.gotoAndStop(1);
_root.lvl.pat._y = _parent._parent._y - 40;
}
Symbol 344 MovieClip Frame 17
_root.playWhoosh();
Symbol 344 MovieClip Frame 20
_parent._parent.slapPat();
Symbol 344 MovieClip Frame 40
_parent.gotoAndStop(1);
Symbol 345 MovieClip Frame 1
stop();
attacking = false;
Symbol 345 MovieClip Frame 2
attacking = false;
Symbol 345 MovieClip Frame 3
attacking = false;
Symbol 345 MovieClip Frame 4
attacking = false;
_parent.dazed = false;
Symbol 345 MovieClip Frame 5
attacking = false;
Symbol 345 MovieClip Frame 6
attacking = false;
Symbol 345 MovieClip Frame 7
attacking = false;
Symbol 345 MovieClip Frame 8
attacking = false;
Symbol 345 MovieClip Frame 9
attacking = false;
Symbol 346 MovieClip [biglep] Frame 1
function setAttributes() {
maxHealth = 40;
health = maxHealth;
minimumDamage = 5 * _root.difficulty;
additionalDamage = 3 + (2 * _root.difficulty);
origDif = _root.difficulty;
}
function chasePat() {
if (timeToSlam == 0) {
timeToSlam = 120 + random(60);
this.inside.gotoAndStop(3);
} else if ((_x > 2000) && ((this.inside._currentframe < 3) || (this.inside._currentframe == 9))) {
timeToSlam--;
}
if (this.inside._currentframe < 3) {
if (_x < ((_root.lvl.pat._x - hitRange) + 20)) {
xSpd = walkSpd;
} else if (_x > ((_root.lvl.pat._x + hitRange) - 20)) {
xSpd = -walkSpd;
}
if (Math.abs(xd) < hitRange) {
inside.gotoAndStop(1);
if (_root.lvl.pat.health > 0) {
if ((Math.abs(_y - _root.lvl.pat._y) < 30) || (Math.abs(yd) < 80)) {
inside.gotoAndStop(5);
} else if ((_y > (_root.lvl.pat._y + 80)) && (Math.abs(yd) < 180)) {
inside.gotoAndStop(9);
}
}
}
}
}
function slapPat() {
facingPat = ((this._x < _root.lvl.pat._x) ? (((_xscale == origScale) ? false : true)) : (((_xscale == origScale) ? true : false)));
if ((((_y > (_root.lvl.pat._y + 80)) && (Math.abs(yd) < 180)) && (facingPat)) && (Math.abs(xd) < 200)) {
damage = random(additionalDamage) + minimumDamage;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -5 : 5), damage);
}
}
function hitPat() {
damage = random(additionalDamage) + minimumDamage;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -5 : 5), damage);
}
function hitControl() {
if (hitTime == 0) {
front = (_root.lvl.pat.attackNum == 3) || (((_root.lvl.facing > 0) ? (((xd > 0) ? true : false)) : (((xd < 0) ? true : false))));
if (((front && (_root.lvl.pat.attacking)) && (_currentframe == 1)) && (dazed)) {
if ((Math.abs(xd) < 220) && (Math.abs(yd) < 160)) {
inside.gotoAndStop(4);
takeHit();
}
}
} else {
hitTime++;
if ((hitTime % 10) == 0) {
_alpha = 100;
} else if ((hitTime % 5) == 0) {
_alpha = 60;
}
if (hitTime == 10) {
hitTime = 0;
}
}
}
function takeHit() {
this.health = this.health - (random(_root.lvl.pat.additionalDamage) + _root.lvl.pat.minimumDamage);
_root.playImpact();
_root.playLepHit();
_root.createRumble(5, 3);
hitTime++;
if (_x < _root.lvl.pat._x) {
xSpd = -10 * ((random(6) + 5) / 10);
} else {
xSpd = 10 * ((random(6) + 5) / 10);
}
ySpd = -15;
}
function takeRockHit() {
_root.playImpact();
_root.playLepHit();
_root.createRumble(5, 3);
hitTime++;
if (_x < _root.lvl.pat._x) {
xSpd = -10 * ((random(6) + 5) / 10);
} else {
xSpd = 10 * ((random(6) + 5) / 10);
}
ySpd = -15;
}
stop();
if (_parent != _root.lvl.enemies) {
this.swapDepths(9999);
this.removeMovieClip();
}
dazed = false;
_root.lepNo++;
var healthBar = _root.lvl.healths.attachMovie("healthBar", "healthBar" + _root.lepNo, _root.lepNo + 300);
healthBar.target = this;
healthBar._width = healthBar._width * 0.7;
healthBar._height = healthBar._height * 0.7;
identity = _root.enemyList.pop();
healthBar.nameTxt.text = "Psych O' Brian";
var typ = 0;
var pickup = 0;
var maxHealth = 60;
var health = maxHealth;
var minimumDamage = 3;
var additionalDamage = 5;
var ySpd = 0;
var gravity = 2;
var origScale = _xscale;
var hitTime = 0;
var walkSpd = (6 + (random(20) / 10));
var hitDelay = 0;
var hitRange = 160;
var wasFrozen = false;
origDif = _root.difficulty;
setAttributes();
dropPos = 800;
onEnterFrame = function () {
if (_root.difficulty != origDif) {
setAttributes();
}
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
this.inside.anim.play();
}
xd = _x - _root.lvl.pat._x;
yd = (_y - (_height / 2)) - (_root.lvl.pat._y - (_root.lvl.pat._height / 2));
if (hitDelay > 0) {
hitDelay--;
}
_y = (_y + ySpd);
_x = (_x + xSpd);
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (((screenX > 750) && (xSpd > 0)) || ((screenX < 50) && (xSpd < 0))) {
xSpd = -xSpd;
}
if ((!_root.lvl.slope.hitTest(screenX, screenY + 75, true)) && (_root.lvl.pat._y > (this._y + 75))) {
dropPos = this._y + 75;
}
if (this._y > dropPos) {
dropPos = 800;
}
cloverCondition = dropPos < 800;
while (((!cloverCondition) && (_root.lvl.slope.hitTest(screenX, screenY - 5, true))) && (ySpd >= 0)) {
_y = (_y-1);
screenY--;
}
if ((!cloverCondition) && (_root.lvl.slope.hitTest(screenX, screenY, true))) {
if (ySpd >= 0) {
if (this.inside._currentframe == 4) {
inside.gotoAndStop(1);
}
ySpd = 0;
}
xSpd = xSpd * 0.7;
} else {
ySpd = ySpd + gravity;
}
if (health <= 0) {
if (this.inside._currentframe < 6) {
health = 0;
this._alpha = 100;
this.inside.gotoAndStop(6);
var _local3 = 0;
_local3 = 0;
while (_local3 < lepArr.length) {
if (lepArr[_local3] == this) {
break;
}
_local3++;
}
_root.lepArr.splice(_local3, 1);
this.healthBar.removeMovieClip();
}
} else {
if (inside._currentframe != 5) {
if (xSpd < 0) {
_xscale = origScale;
} else if (xSpd > 0) {
_xscale = (-origScale);
} else if (_x > _root.lvl.pat._x) {
_xscale = origScale;
} else {
_xscale = (-origScale);
}
}
chasePat();
hitControl();
}
if ((this.inside._currentframe == 1) && (xSpd != 0)) {
this.inside.gotoAndStop(2);
}
} else {
this.inside.anim.stop();
wasFrozen = true;
}
};
timeToSlam = 150;
Symbol 356 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 363 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 364 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 365 MovieClip Frame 1
gotoAndStop(random(2) + 1);
Symbol 366 MovieClip [brick] Frame 1
function hitPat() {
if (_root.lvl.pat._currentframe < 10) {
damage = (random(5) + 5) * _root.difficulty;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -3 : 3), damage, true);
}
}
stop();
var ySpd = 0;
var gravity = 1;
var timeTime = 0;
origHeight = inside._height;
notHitYet = true;
hitY = _y;
onEnterFrame = function () {
if (!_root.freeze) {
if (_y > 600) {
this.swapDepths(9999);
this.removeMovieClip();
}
if (follow) {
_x = _root.lvl.enemies.biglep._x;
}
_y = (_y + ySpd);
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
while (_root.lvl.slope.hitTest(screenX, screenY - 5, true) && (this._y > hitY)) {
_y = (_y-1);
screenY--;
}
if (((this.hitTest(_root.lvl.pat.hitbox) && (notHitYet)) && (ySpd > 10)) && (this._y > hitY)) {
notHitYet = false;
hitPat();
}
if ((this.hitTest(_root.lvl.enemies.biglep.hitbox) && (notHitYet)) && (this._y > hitY)) {
if (_root.lvl.enemies.biglep.inside._currentframe != 8) {
notHitYet = false;
_root.lvl.enemies.biglep.takeRockHit();
_root.lvl.enemies.biglep.inside.gotoAndStop(8);
}
}
if (_root.lvl.slope.hitTest(screenX, screenY, true) && (this._y > hitY)) {
hitY = _y + 150;
_root.playRockHit();
_root.createRumble(15, 8);
ySpd = (-ySpd) * 0.5;
} else if (ySpd < 15) {
ySpd = ySpd + gravity;
}
}
};
Symbol 376 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
if (!_parent.down) {
gotoAndPlay (6);
}
Symbol 376 MovieClip Frame 6
_parent.down = false;
Symbol 376 MovieClip Frame 13
gotoAndPlay (6);
Symbol 391 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
if (_parent.down) {
gotoAndPlay (6);
}
Symbol 391 MovieClip Frame 6
_parent.down = true;
Symbol 391 MovieClip Frame 22
gotoAndPlay (6);
Symbol 393 MovieClip Frame 1
_parent.down = false;
Symbol 400 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
_parent.attacking = true;
_parent.down = true;
_root.playWhoosh();
Symbol 400 MovieClip Frame 3
_parent._parent.hitPat();
Symbol 400 MovieClip Frame 5
_parent.gotoAndStop(1);
Symbol 401 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 401 MovieClip Frame 60
_root.snakesAlive--;
_parent._parent.swapDepths(9999);
_parent._parent.removeMovieClip();
Symbol 402 MovieClip Frame 1
stop();
attacking = false;
if (down == undefined) {
down = true;
}
Symbol 402 MovieClip Frame 2
attacking = false;
Symbol 402 MovieClip Frame 3
attacking = false;
Symbol 402 MovieClip Frame 4
attacking = false;
Symbol 402 MovieClip Frame 5
attacking = false;
Symbol 403 MovieClip [snake] Frame 1
function setAttributes() {
maxHealth = (30 + (20 * _root.difficulty)) / 2;
health = maxHealth;
minimumDamage = 4 * _root.difficulty;
additionalDamage = 4 + (3 * _root.difficulty);
origDif = _root.difficulty;
}
function onAClover() {
i = 0;
while (i < _root.cloverArr.length) {
if ((Math.abs(_root.cloverArr[i]._y - _y) < 50) && (Math.abs(_root.cloverArr[i]._x - _x) < 130)) {
return(true);
}
i++;
}
return(false);
}
function chasePat() {
if (this.inside._currentframe < 4) {
distToLep = lepsAhead();
if ((_x < _root.lvl.pat._x) && ((_root.lvl.screenX - hitRange) < 25)) {
xSpd = walkSpd;
} else if ((_x > _root.lvl.pat._x) && ((_root.lvl.screenX + hitRange) > 775)) {
xSpd = -walkSpd;
} else if (_x < (_root.lvl.pat._x - hitRange)) {
if (distToLep > 80) {
xSpd = walkSpd;
} else if (distToLep < 50) {
xSpd = -walkSpd;
} else {
this.inside.gotoAndStop(1);
}
} else if (_x > (_root.lvl.pat._x + hitRange)) {
if (distToLep > 80) {
xSpd = -walkSpd;
} else if (distToLep < 50) {
xSpd = walkSpd;
} else {
this.inside.gotoAndStop(1);
}
} else if ((_x > _root.lvl.pat._x) && (_x < (_root.lvl.pat._x + (hitRange - 10)))) {
xSpd = walkSpd;
} else if ((_x < _root.lvl.pat._x) && (_x > (_root.lvl.pat._x - (hitRange - 10)))) {
xSpd = -walkSpd;
} else {
xSpd = 0;
if (this.inside._currentframe == 2) {
this.inside.gotoAndStop(1);
}
if ((((hitDelay == 0) && (_root.lvl.hitTime == 0)) && (Math.abs(yd) < 80)) && (_root.lvl.pat.health > 0)) {
if (((this.inside._currentframe == 1) && (this.inside.anim._currentframe > 5)) && (_root.lvl.pat._currentframe < 10)) {
inside.gotoAndStop(5);
hitDelay = 50 - (10 * _root.difficulty);
}
}
}
}
}
function hitPat() {
damage = random(additionalDamage) + minimumDamage;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -1 : 1), damage);
}
function hitControl() {
if (hitTime == 0) {
front = (_root.lvl.pat.attackNum == 3) || (((_root.lvl.facing > 0) ? (((xd > 0) ? true : false)) : (((xd < 0) ? true : false))));
if ((front && (_root.lvl.pat.attacking)) && (_currentframe == 1)) {
if ((Math.abs(xd) < 140) && (Math.abs(yd) < 80)) {
if (_root.lvl.pat.attackNum == 1) {
xSpd = ((xd > 0) ? 10 : -10) * ((random(6) + 5) / 10);
ySpd = -6;
} else if (_root.lvl.pat.attackNum == 2) {
xSpd = ((xd > 0) ? 2 : -2) * ((random(6) + 5) / 10);
ySpd = -15;
} else {
xSpd = ((xd > 0) ? 10 : -10) * ((random(6) + 5) / 10);
ySpd = -15;
}
inside.gotoAndStop(4);
this.health = this.health - (random(_root.lvl.pat.additionalDamage) + _root.lvl.pat.minimumDamage);
_root.playImpact();
_root.playSnakeHit();
_root.createRumble(5, 3);
hitTime++;
}
}
if ((_root.lvl.rb._currentframe > 1) && (this.hitTest(_root.lvl.rb.hitSpot))) {
this.health = this.health - (random(_root.lvl.rb.additionalDamage) + _root.lvl.rb.minimumDamage);
_root.playImpact();
_root.playSnakeHit();
_root.createRumble(5, 3);
hitTime++;
xSpd = 20 * ((random(6) + 5) / 10);
ySpd = -15;
inside.gotoAndStop(4);
}
} else {
hitTime++;
if ((hitTime % 10) == 0) {
_alpha = 100;
} else if ((hitTime % 5) == 0) {
_alpha = 60;
}
if (hitTime == 10) {
hitTime = 0;
}
}
}
function onAnotherLep() {
i = 0;
while (i < _root.snakeArr.length) {
lep = _root.snakeArr[i];
if (((lep != this) && (lep.health > 0)) && (lep.typ != 2)) {
xd2 = this._x - lep._x;
yd2 = this._y - lep._y;
if ((Math.abs(xd2) < 30) && (Math.abs(yd2) < 50)) {
if (xd2 > 1) {
xSpd = walkSpd;
} else if (xd2 < -1) {
xSpd = -walkSpd;
} else {
xSpd = random(walkSpd) - (walkSpd / 2);
}
return(true);
}
}
i++;
}
return(false);
}
function lepsAhead() {
i = 0;
while (i < _root.snakeArr.length) {
lep = _root.snakeArr[i];
if (((lep != this) && (lep.health > 0)) && (lep.typ != 2)) {
xd2 = this._x - lep._x;
yd2 = this._y - lep._y;
if (((((_x > _root.lvl.pat._x) && (xd2 > 0)) && (xd2 < 140)) || (((_x < _root.lvl.pat._x) && (xd2 < 0)) && (xd2 > -140))) && (Math.abs(yd2) < 50)) {
return(Math.abs(xd2));
}
}
i++;
}
return(999);
}
stop();
if (_parent != _root.lvl.enemies) {
this.swapDepths(9999);
this.removeMovieClip();
}
_root.snakesAlive++;
var healthBar = _root.lvl.healths.attachMovie("healthBar", "healthBar" + _root.lepNo, _root.lepNo + 300);
healthBar.target = this;
healthBar._width = healthBar._width * 0.5;
healthBar._height = healthBar._height * 0.5;
healthBar.nameTxt.text = "Snake";
var typ = 1;
var pickup = 0;
_root.snakeArr.push(this);
var maxHealth = 60;
var health = maxHealth;
var minimumDamage = 3;
var additionalDamage = 5;
var ySpd = 0;
var gravity = 2;
var origScale = _xscale;
var hitTime = 0;
var walkSpd = (6 + (random(20) / 10));
var hitDelay = 0;
var hitRange = 80;
dropPos = 800;
wasFrozen = false;
origDif = _root.difficulty;
setAttributes();
onEnterFrame = function () {
if (_root.difficulty != origDif) {
setAttributes();
}
if ((!_root.freeze) && (!_root.cinematic)) {
if (wasFrozen) {
wasFrozen = false;
this.inside.anim.play();
}
xd = _x - _root.lvl.pat._x;
yd = (_y - (_height / 2)) - (_root.lvl.pat._y - (_root.lvl.pat._height / 2));
if (hitDelay > 0) {
hitDelay--;
}
_y = (_y + ySpd);
_x = (_x + xSpd);
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (((screenX > 750) && (xSpd > 0)) || ((screenX < 50) && (xSpd < 0))) {
xSpd = -xSpd;
}
if ((!_root.lvl.slope.hitTest(screenX, screenY + 75, true)) && (_root.lvl.pat._y > (this._y + 75))) {
dropPos = this._y + 75;
}
if (this._y > dropPos) {
dropPos = 800;
}
cloverCondition = dropPos < 800;
while (((!cloverCondition) && (_root.lvl.slope.hitTest(screenX, screenY - 5, true))) && (ySpd >= 0)) {
_y = (_y-1);
screenY--;
}
if ((!cloverCondition) && (_root.lvl.slope.hitTest(screenX, screenY, true))) {
if (ySpd >= 0) {
if ((this.inside._currentframe == 4) || (this.inside._currentframe == 3)) {
inside.gotoAndStop(1);
}
ySpd = 0;
}
xSpd = xSpd * 0.7;
} else {
ySpd = ySpd + gravity;
}
if (xSpd < 0) {
_xscale = origScale;
} else if (xSpd > 0) {
_xscale = (-origScale);
} else if (_x > _root.lvl.pat._x) {
_xscale = origScale;
} else {
_xscale = (-origScale);
}
if (health <= 0) {
if (this.inside._currentframe < 6) {
health = 0;
this._alpha = 100;
this.inside.gotoAndStop(6);
var _local3 = 0;
_local3 = 0;
while (_local3 < snakeArr.length) {
if (snakeArr[_local3] == this) {
break;
}
_local3++;
}
_root.snakeArr.splice(_local3, 1);
this.healthBar.removeMovieClip();
}
} else {
if (!onAnotherLep()) {
chasePat();
}
hitControl();
}
if ((this.inside._currentframe == 1) && (xSpd != 0)) {
this.inside.gotoAndStop(2);
}
} else {
this.inside.anim.stop();
wasFrozen = true;
}
};
Symbol 419 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 461 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 461 MovieClip Frame 2
_root.playWhoosh();
Symbol 461 MovieClip Frame 5
_root.playNinjaThrow();
Symbol 461 MovieClip Frame 8
tmp = _root.lvl.clovers.attachMovie("clover", "clover" + _root.cloverAttackNum, _root.cloverAttackNum++);
tmp._y = _parent._parent._y - (_parent._parent._height / 2);
if (_parent._parent._xscale == _parent._parent.origScale) {
tmp._x = _parent._parent._x - 30;
tmp.xSpd = -10;
} else {
tmp._x = _parent._parent._x + 30;
tmp.xSpd = 10;
}
Symbol 461 MovieClip Frame 17
_parent.gotoAndStop(1);
Symbol 464 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 464 MovieClip Frame 60
_root.lepsAlive--;
_root.createPickup(_parent._parent._x, _parent._parent._y, _parent._parent.pickup);
if (_parent._parent.pickup == 3) {
trace(_parent._parent.countNum + " destroyed");
}
_parent._parent.swapDepths(9999);
_parent._parent.removeMovieClip();
Symbol 465 MovieClip Frame 1
stop();
attacking = false;
Symbol 465 MovieClip Frame 2
attacking = false;
Symbol 465 MovieClip Frame 3
attacking = false;
Symbol 465 MovieClip Frame 4
attacking = false;
Symbol 465 MovieClip Frame 5
attacking = false;
Symbol 466 MovieClip [ninja] Frame 1
function setAttributes() {
maxHealth = 30 + (20 * _root.difficulty);
health = maxHealth;
minimumDamage = 3 * _root.difficulty;
additionalDamage = 3 + (2 * _root.difficulty);
origDif = _root.difficulty;
}
function onAClover() {
i = 0;
while (i < _root.cloverArr.length) {
if ((Math.abs(_root.cloverArr[i]._y - _y) < 50) && (Math.abs(_root.cloverArr[i]._x - _x) < 130)) {
return(true);
}
i++;
}
return(false);
}
function chasePat() {
if (this.inside._currentframe < 4) {
if ((_x < _root.lvl.pat._x) && ((_root.lvl.screenX - hitRange) < 25)) {
xSpd = walkSpd;
if (_root.lvl.slope.hitTest(screenX, screenY, true) && (jumpDelay == 0)) {
jumpDelay = 40;
ySpd = -30;
inside.gotoAndStop(3);
}
} else if ((_x > _root.lvl.pat._x) && ((_root.lvl.screenX + hitRange) > 775)) {
xSpd = -walkSpd;
if (_root.lvl.slope.hitTest(screenX, screenY, true) && (jumpDelay == 0)) {
jumpDelay = 50 - (10 * _root.difficulty);
ySpd = -30;
inside.gotoAndStop(3);
}
} else if (_x < (_root.lvl.pat._x - hitRange)) {
xSpd = walkSpd;
} else if (_x > (_root.lvl.pat._x + hitRange)) {
xSpd = -walkSpd;
} else if ((_x > _root.lvl.pat._x) && (_x < (_root.lvl.pat._x + (hitRange - 10)))) {
xSpd = walkSpd;
} else if ((_x < _root.lvl.pat._x) && (_x > (_root.lvl.pat._x - (hitRange - 10)))) {
xSpd = -walkSpd;
} else {
xSpd = 0;
if (this.inside._currentframe == 2) {
this.inside.gotoAndStop(1);
}
}
onScreen = (screenX > 0) && (screenX < 800);
inRange = (Math.abs(xd) >= 60) && (Math.abs(yd) < 80);
if ((((onScreen && (inRange)) && (hitDelay == 0)) && (_root.lvl.hitTime == 0)) && (_root.lvl.pat.health > 0)) {
if (_x > _root.lvl.pat._x) {
_xscale = origScale;
} else {
_xscale = (-origScale);
}
hitRange = 150 + random(150);
inside.gotoAndStop(5);
hitDelay = 60 + random(10);
}
}
}
function hitPat() {
damage = random(additionalDamage) + minimumDamage;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -1 : 1), damage);
}
function hitControl() {
if (hitTime == 0) {
front = (_root.lvl.pat.attackNum == 3) || (((_root.lvl.facing > 0) ? (((xd > 0) ? true : false)) : (((xd < 0) ? true : false))));
if ((front && (_root.lvl.pat.attacking)) && (_currentframe == 1)) {
if ((Math.abs(xd) < 140) && (Math.abs(yd) < 80)) {
if (_root.lvl.pat.attackNum == 1) {
xSpd = ((xd > 0) ? 10 : -10) * ((random(6) + 5) / 10);
ySpd = -6;
} else if (_root.lvl.pat.attackNum == 2) {
xSpd = ((xd > 0) ? 2 : -2) * ((random(6) + 5) / 10);
ySpd = -15;
} else {
xSpd = ((xd > 0) ? 10 : -10) * ((random(6) + 5) / 10);
ySpd = -15;
}
inside.gotoAndStop(4);
this.health = this.health - (random(_root.lvl.pat.additionalDamage) + _root.lvl.pat.minimumDamage);
_root.playImpact();
_root.playLepHit();
_root.createRumble(5, 3);
if ((random(10) == 0) && (this.health > 0)) {
_root.playLepRandom();
}
hitTime++;
hitTally++;
}
}
if ((_root.lvl.rb._currentframe > 1) && (this.hitTest(_root.lvl.rb.hitSpot))) {
this.health = this.health - (random(_root.lvl.rb.additionalDamage) + _root.lvl.rb.minimumDamage);
_root.playImpact();
_root.playLepHit();
_root.createRumble(5, 3);
if ((random(10) == 0) && (this.health > 0)) {
_root.playLepRandom();
}
hitTime++;
xSpd = 20 * ((random(6) + 5) / 10);
ySpd = -15;
inside.gotoAndStop(4);
}
} else {
hitTime++;
if ((hitTime % 10) == 0) {
_alpha = 100;
} else if ((hitTime % 5) == 0) {
_alpha = 60;
}
if (hitTime == 10) {
hitTime = 0;
}
}
}
stop();
if (_parent != _root.lvl.enemies) {
this.swapDepths(9999);
this.removeMovieClip();
}
screenEntered = false;
var healthBar = _root.lvl.healths.attachMovie("healthBar", "healthBar" + _root.lepNo, _root.lepNo + 300);
healthBar.target = this;
healthBar._width = healthBar._width * 0.5;
healthBar._height = healthBar._height * 0.5;
identity = _root.enemyList.pop();
healthBar.nameTxt.text = identity.n;
var typ = identity.t;
var pickup = identity.p;
_root.lepsAlive++;
_root.lepArr.push(this);
var maxHealth = 60;
var health = maxHealth;
var minimumDamage = 3;
var additionalDamage = 5;
var screenX;
var screenY;
var xSpd = 0;
var ySpd = 0;
var gravity = 2;
var origScale = _xscale;
var hitTime = 0;
var walkSpd = (6 + (random(20) / 10));
var jumpDelay = 0;
var hitDelay = 0;
var hitRange = (150 + random(150));
var hitTally = 0;
var jumpDodge = false;
var wasFrozen = false;
dropPos = 800;
origDif = _root.difficulty;
setAttributes();
onEnterFrame = function () {
if (_root.difficulty != origDif) {
setAttributes();
}
if (!_root.freeze) {
if ((hitTally > 6) && (!_root.awd_Juggling)) {
_root.awd_Juggling = true;
_root.DisplayAward("Juggling");
}
if (wasFrozen) {
wasFrozen = false;
this.inside.anim.play();
}
xd = _x - _root.lvl.pat._x;
yd = (_y - (_height / 2)) - (_root.lvl.pat._y - (_root.lvl.pat._height / 2));
if (jumpDelay > 0) {
jumpDelay--;
}
if (hitDelay > 0) {
hitDelay--;
}
if (((screenX < 800) && (screenX > 0)) && (!screenEntered)) {
_root.playLepGreeting();
screenEntered = true;
}
if (((screenX > 750) && (xSpd > 0)) || ((screenX < 50) && (xSpd < 0))) {
xSpd = -xSpd;
}
_y = (_y + ySpd);
_x = (_x + (xSpd * (jumpDodge + 1)));
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if ((!_root.lvl.slope.hitTest(screenX, screenY + 75, true)) && (_root.lvl.pat._y > (this._y + 75))) {
dropPos = this._y + 75;
}
if (this._y > dropPos) {
dropPos = 800;
}
cloverCondition = dropPos < 800;
while ((_root.lvl.slope.hitTest(screenX, screenY - 5, true) && (ySpd >= 0)) && (!cloverCondition)) {
_y = (_y-1);
screenY--;
}
if ((((screenX > 800) && (_root.lvl.screenX)) > 500) || (((screenX < 0) && (_root.lvl.screenX)) < 300)) {
jumpDodge = true;
}
if (this.inside._currentframe > 3) {
jumpDodge = false;
}
if (_root.lvl.slope.hitTest(screenX, screenY, true) && (!cloverCondition)) {
if (ySpd >= 0) {
if ((this.inside._currentframe == 4) || (this.inside._currentframe == 3)) {
inside.gotoAndStop(1);
}
hitTally = 0;
jumpDodge = false;
ySpd = 0;
}
if (((jumpDelay == 0) && (random(50) == 0)) && (this.inside._currentframe < 3)) {
jumpDodge = true;
}
if (((_root.lvl.onGround && (((_root.cloversHitFeet > 0) || (yd > 100)) || (jumpDodge))) && (this.inside._currentframe < 4)) && (jumpDelay == 0)) {
jumpDelay = 40;
if (jumpDodge) {
ySpd = -30;
if (_xscale == origScale) {
xSpd = -walkSpd;
} else {
xSpd = walkSpd;
}
} else {
ySpd = ((_root.lvl.pat._y - this._y) / 10) - 10;
if (ySpd < -30) {
ySpd = -30;
}
}
inside.gotoAndStop(3);
}
xSpd = xSpd * 0.7;
} else {
ySpd = ySpd + gravity;
}
if (inside._currentframe != 5) {
if (xSpd < 0) {
_xscale = origScale;
} else if (xSpd > 0) {
_xscale = (-origScale);
} else if (_x > _root.lvl.pat._x) {
_xscale = origScale;
} else {
_xscale = (-origScale);
}
}
if (health <= 0) {
if (this.inside._currentframe < 6) {
health = 0;
this._alpha = 100;
this.inside.gotoAndStop(6);
var _local3 = 0;
_local3 = 0;
while (_local3 < lepArr.length) {
if (lepArr[_local3] == this) {
break;
}
_local3++;
}
_root.lepArr.splice(_local3, 1);
this.healthBar.removeMovieClip();
}
} else {
if (!jumpDodge) {
chasePat();
}
hitControl();
}
if ((this.inside._currentframe == 1) && (xSpd != 0)) {
this.inside.gotoAndStop(2);
}
} else {
this.inside.anim.stop();
wasFrozen = true;
}
};
Symbol 480 MovieClip Frame 1
onEnterFrame = function () {
if (_root.freeze) {
stop();
} else {
play();
}
};
Symbol 495 MovieClip Frame 1
onEnterFrame = function () {
if (_root.freeze) {
stop();
} else {
play();
}
};
Symbol 506 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 508 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 531 MovieClip Frame 1
stop();
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if ((_currentframe < 5) && ((random(10 - (_root.difficulty * 4)) == 0) || (_parent._parent.special))) {
gotoAndPlay((random(2) + 1) * 5);
}
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 531 MovieClip Frame 5
_parent.attacking = true;
_root.playWhoosh();
Symbol 531 MovieClip Frame 8
_parent._parent.hitPat();
Symbol 531 MovieClip Frame 9
_parent.gotoAndStop(1);
Symbol 531 MovieClip Frame 10
_parent.attacking = true;
_root.playWhoosh();
Symbol 531 MovieClip Frame 13
_parent._parent.hitPat();
Symbol 531 MovieClip Frame 14
_parent.gotoAndStop(1);
Symbol 545 MovieClip Frame 1
_y = (_y - (_root.lvl.screenY - 250));
Symbol 545 MovieClip Frame 30
stop();
Symbol 546 MovieClip Frame 1
_root.cinematic = true;
Symbol 546 MovieClip Frame 15
_root.playRevive();
Symbol 546 MovieClip Frame 30
_root.createRumble(10, 20);
onEnterFrame = function () {
if (Math.abs(_parent._parent._x - _root.lvl.pat._x) < 250) {
if (_parent._parent._x < _root.lvl.pat._x) {
_root.lvl.xSpd = _root.lvl.runSpd * 2;
} else {
_root.lvl.xSpd = (-_root.lvl.runSpd) * 2;
}
}
};
Symbol 546 MovieClip Frame 50
_parent._parent.swapDepths(2001);
tmp = _root.lvl.enemies.attachMovie("biglep", "biglep", 2000);
tmp._x = _parent._parent._x;
tmp._y = _parent._parent._y;
tmp.inside.gotoAndStop(7);
tmp._width = tmp._width * 0.5;
tmp._height = tmp._height * 0.5;
Symbol 546 MovieClip Frame 76
_root.lepsAlive--;
_parent._parent.swapDepths(9999);
_parent._parent.removeMovieClip();
Symbol 547 MovieClip Frame 1
stop();
attacking = false;
Symbol 547 MovieClip Frame 2
attacking = false;
Symbol 547 MovieClip Frame 3
attacking = false;
Symbol 547 MovieClip Frame 4
attacking = false;
Symbol 547 MovieClip Frame 5
attacking = false;
Symbol 548 MovieClip [lep] Frame 1
function setAttributes() {
maxHealth = (30 + (20 * _root.difficulty)) + (special * 30);
health = maxHealth;
minimumDamage = (3 * _root.difficulty) + special;
additionalDamage = (3 + (2 * _root.difficulty)) + (special * 2);
origDif = _root.difficulty;
}
function onAClover() {
i = 0;
while (i < _root.cloverArr.length) {
if ((Math.abs(_root.cloverArr[i]._y - _y) < 50) && (Math.abs(_root.cloverArr[i]._x - _x) < 130)) {
return(true);
}
i++;
}
return(false);
}
function chasePat() {
if (this.inside._currentframe < 4) {
distToLep = lepsAhead();
if ((_x < _root.lvl.pat._x) && ((_root.lvl.screenX - hitRange) < 25)) {
xSpd = walkSpd;
if (_root.lvl.slope.hitTest(screenX, screenY, true) && (jumpDelay == 0)) {
jumpDelay = 40;
ySpd = -30;
inside.gotoAndStop(3);
}
} else if ((_x > _root.lvl.pat._x) && ((_root.lvl.screenX + hitRange) > 775)) {
xSpd = -walkSpd;
if (_root.lvl.slope.hitTest(screenX, screenY, true) && (jumpDelay == 0)) {
jumpDelay = 40;
ySpd = -30;
inside.gotoAndStop(3);
}
} else if (_x < (_root.lvl.pat._x - hitRange)) {
if (distToLep > 80) {
xSpd = walkSpd;
} else if (distToLep < 50) {
xSpd = -walkSpd;
} else {
this.inside.gotoAndStop(1);
}
} else if (_x > (_root.lvl.pat._x + hitRange)) {
if (distToLep > 80) {
xSpd = -walkSpd;
} else if (distToLep < 50) {
xSpd = walkSpd;
} else {
this.inside.gotoAndStop(1);
}
} else if ((_x > _root.lvl.pat._x) && (_x < (_root.lvl.pat._x + (hitRange - 10)))) {
xSpd = walkSpd;
} else if ((_x < _root.lvl.pat._x) && (_x > (_root.lvl.pat._x - (hitRange - 10)))) {
xSpd = -walkSpd;
} else {
xSpd = 0;
if (this.inside._currentframe == 2) {
this.inside.gotoAndStop(1);
}
if ((((hitDelay == 0) && (_root.lvl.hitTime == 0)) && (Math.abs(yd) < 80)) && (_root.lvl.pat.health > 0)) {
inside.gotoAndStop(5);
hitDelay = (60 - (20 * _root.difficulty)) - (special * 10);
}
}
}
}
function hitPat() {
if ((Math.abs(xd) < (hitRange + 10)) && (Math.abs(yd) < 100)) {
damage = random(additionalDamage) + minimumDamage;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -1 : 1), damage);
}
}
function hitControl() {
if (hitTime == 0) {
front = (_root.lvl.pat.attackNum == 3) || (((_root.lvl.facing > 0) ? (((xd > 0) ? true : false)) : (((xd < 0) ? true : false))));
if ((front && (_root.lvl.pat.attacking)) && (_currentframe == 1)) {
if ((Math.abs(xd) < 140) && (Math.abs(yd) < 80)) {
if (_root.lvl.pat.attackNum == 1) {
xSpd = ((xd > 0) ? 10 : -10) * ((random(6) + 5) / 10);
ySpd = -6;
} else if (_root.lvl.pat.attackNum == 2) {
xSpd = ((xd > 0) ? 2 : -2) * ((random(6) + 5) / 10);
ySpd = -15;
} else {
xSpd = ((xd > 0) ? 10 : -10) * ((random(6) + 5) / 10);
ySpd = -15;
}
inside.gotoAndStop(4);
this.health = this.health - (random(_root.lvl.pat.additionalDamage) + _root.lvl.pat.minimumDamage);
_root.playImpact();
_root.playLepHit();
_root.createRumble(5, 3);
if ((random(10) == 0) && (this.health > 0)) {
_root.playLepRandom();
}
hitTime++;
hitTally++;
if (special) {
xSpd = xSpd / 2;
ySpd = ySpd / 2;
}
}
}
if ((_root.lvl.rb._currentframe > 1) && (this.hitTest(_root.lvl.rb.hitSpot))) {
this.health = this.health - (random(_root.lvl.rb.additionalDamage) + _root.lvl.rb.minimumDamage);
_root.playImpact();
_root.playLepHit();
_root.createRumble(5, 3);
if ((random(10) == 0) && (this.health > 0)) {
_root.playLepRandom();
}
hitTime++;
xSpd = 20 * ((random(6) + 5) / 10);
ySpd = -15;
inside.gotoAndStop(4);
if (special) {
xSpd = xSpd / 2;
ySpd = ySpd / 2;
}
}
} else {
hitTime++;
if ((hitTime % 10) == 0) {
_alpha = 100;
} else if ((hitTime % 5) == 0) {
_alpha = 60;
}
if (hitTime == 10) {
hitTime = 0;
}
}
}
function onAnotherLep() {
i = 0;
while (i < _root.lepArr.length) {
lep = _root.lepArr[i];
if (((lep != this) && (lep.health > 0)) && (lep.typ != 2)) {
xd2 = this._x - lep._x;
yd2 = this._y - lep._y;
if ((Math.abs(xd2) < 30) && (Math.abs(yd2) < 50)) {
if (xd2 > 1) {
xSpd = walkSpd;
} else if (xd2 < -1) {
xSpd = -walkSpd;
} else {
xSpd = random(walkSpd) - (walkSpd / 2);
}
return(true);
}
}
i++;
}
return(false);
}
function lepsAhead() {
i = 0;
while (i < _root.lepArr.length) {
lep = _root.lepArr[i];
if (((lep != this) && (lep.health > 0)) && (lep.typ != 2)) {
xd2 = this._x - lep._x;
yd2 = this._y - lep._y;
if (((((_x > _root.lvl.pat._x) && (xd2 > 0)) && (xd2 < 150)) || (((_x < _root.lvl.pat._x) && (xd2 < 0)) && (xd2 > -150))) && (Math.abs(yd2) < 50)) {
return(Math.abs(xd2));
}
}
i++;
}
return(999);
}
stop();
if (_parent != _root.lvl.enemies) {
this.swapDepths(9999);
this.removeMovieClip();
}
screenEntered = false;
var healthBar = _root.lvl.healths.attachMovie("healthBar", "healthBar" + _root.lepNo, _root.lepNo + 300);
healthBar.target = this;
healthBar._width = healthBar._width * 0.5;
healthBar._height = healthBar._height * 0.5;
identity = _root.enemyList.pop();
special = false;
if (identity.t == 3) {
special = true;
identity.t = 1;
identity.n = "Psych O' Brian";
}
healthBar.nameTxt.text = identity.n;
var typ = identity.t;
var pickup = identity.p;
_root.lepsAlive++;
_root.lepArr.push(this);
var maxHealth = 60;
var health = maxHealth;
var minimumDamage = 3;
var additionalDamage = 5;
var ySpd = 0;
var gravity = 2;
var origScale = _xscale;
var hitTime = 0;
var walkSpd = ((6 + (random(20) / 10)) + (special * 2));
var jumpDelay = 0;
var hitDelay = 0;
var hitRange = 100;
var hitTally = 0;
var jumpDodge = false;
var wasFrozen = false;
origDif = _root.difficulty;
setAttributes();
dropPos = 800;
onEnterFrame = function () {
if (_root.difficulty != origDif) {
setAttributes();
}
if (!_root.freeze) {
if ((hitTally > 6) && (!_root.awd_Juggling)) {
_root.awd_Juggling = true;
_root.DisplayAward("Juggling");
}
if (wasFrozen) {
wasFrozen = false;
this.inside.anim.play();
}
xd = _x - _root.lvl.pat._x;
yd = (_y - (_height / 2)) - (_root.lvl.pat._y - (_root.lvl.pat._height / 2));
if (jumpDelay > 0) {
jumpDelay--;
}
if (hitDelay > 0) {
hitDelay--;
}
_y = (_y + ySpd);
_x = (_x + (xSpd * (jumpDodge + 1)));
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (((screenX < 800) && (screenX > 0)) && (!screenEntered)) {
_root.playLepGreeting();
screenEntered = true;
}
if (((screenX > 750) && (xSpd > 0)) || ((screenX < 50) && (xSpd < 0))) {
xSpd = -xSpd;
}
if ((((screenX > 800) && (_root.lvl.screenX)) > 500) || (((screenX < 0) && (_root.lvl.screenX)) < 300)) {
jumpDodge = true;
}
if ((!_root.lvl.slope.hitTest(screenX, screenY + 75, true)) && (_root.lvl.pat._y > (this._y + 75))) {
dropPos = this._y + 75;
}
if (this._y > dropPos) {
dropPos = 800;
}
cloverCondition = dropPos < 800;
while (((!cloverCondition) && (_root.lvl.slope.hitTest(screenX, screenY - 5, true))) && (ySpd >= 0)) {
_y = (_y-1);
screenY--;
}
if (this.inside._currentframe > 3) {
jumpDodge = false;
}
if ((!cloverCondition) && (_root.lvl.slope.hitTest(screenX, screenY, true))) {
if (ySpd >= 0) {
if ((this.inside._currentframe == 4) || (this.inside._currentframe == 3)) {
inside.gotoAndStop(1);
}
hitTally = 0;
jumpDodge = false;
ySpd = 0;
}
if (((jumpDelay == 0) && (random(50) == 0)) && (this.inside._currentframe < 3)) {
jumpDodge = true;
}
if ((((_root.lvl.onGround && (((_root.cloversHitFeet > 0) || (yd > 100)) || (jumpDodge))) && (this.inside._currentframe < 4)) && (jumpDelay == 0)) && (Math.abs(xd) < 200)) {
jumpDelay = 40;
if (jumpDodge) {
ySpd = -30;
if (_xscale == origScale) {
xSpd = -walkSpd;
} else {
xSpd = walkSpd;
}
} else {
ySpd = ((_root.lvl.pat._y - this._y) / 10) - 10;
if (ySpd < -30) {
ySpd = -30;
}
}
inside.gotoAndStop(3);
}
xSpd = xSpd * 0.7;
} else {
ySpd = ySpd + gravity;
}
if (xSpd < 0) {
_xscale = origScale;
} else if (xSpd > 0) {
_xscale = (-origScale);
} else if (_x > _root.lvl.pat._x) {
_xscale = origScale;
} else {
_xscale = (-origScale);
}
if (health <= 0) {
if (this.inside._currentframe < 6) {
health = 0;
this._alpha = 100;
if (special) {
this.inside.gotoAndStop(7);
} else {
this.inside.gotoAndStop(6);
}
var _local3 = 0;
_local3 = 0;
while (_local3 < lepArr.length) {
if (lepArr[_local3] == this) {
break;
}
_local3++;
}
_root.lepArr.splice(_local3, 1);
this.healthBar.removeMovieClip();
}
} else {
if ((!onAnotherLep()) && (!jumpDodge)) {
chasePat();
}
hitControl();
}
if ((this.inside._currentframe == 1) && (xSpd != 0)) {
this.inside.gotoAndStop(2);
}
} else {
this.inside.anim.stop();
wasFrozen = true;
}
};
Symbol 552 MovieClip [damageIndicator] Frame 1
stop();
onEnterFrame = function () {
if (!_root.freeze) {
if (_currentframe == 1) {
this._y = this._y - 3;
this._alpha = this._alpha - 5;
} else {
this._y = this._y - 2;
this._alpha = this._alpha - 3;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
if (num < 0) {
num = -num;
gotoAndStop (2);
} else if (num <= 0) {
this.removeMovieClip();
}
Symbol 559 MovieClip [grass] Frame 1
if (random(2)) {
this._xscale = -this._xscale;
}
gotoAndStop(random(3) + 1);
Symbol 560 MovieClip [cloverground] Frame 1
this._visible = false;
origY = this._y;
maxRot = 20;
wasHitting = false;
wasHittingFeet = false;
_root.cloverArr.push(this);
onEnterFrame = function () {
if (!_root.freeze) {
if (this.hitTest(_root.lvl.pat)) {
if (!wasHitting) {
_root.cloversHit++;
}
wasHitting = true;
} else {
if (wasHitting) {
_root.cloversHit--;
}
wasHitting = false;
}
if (this.hitTest(_root.lvl.pat.feet) && (_root.lvl.ySpd >= 0)) {
distance = (_width - Math.abs(_root.lvl.pat._x - _x)) / 5;
_root.lvl.pat._y = _root.lvl.pat._y + (((origY + distance) - this._y) / 5);
this._rotation = this._rotation - ((this._rotation - ((_root.lvl.pat._x - _x) / 10)) / 4);
if (!wasHittingFeet) {
_root.cloversHitFeet++;
}
wasHittingFeet = true;
} else {
if (wasHittingFeet) {
_root.cloversHitFeet--;
}
wasHittingFeet = false;
distance = 0;
this._rotation = this._rotation / 1.5;
}
this._y = this._y + (((origY + distance) - this._y) / 5);
}
};
Symbol 566 MovieClip [healthBar] Frame 1
origScale = _xscale;
prevHealth = target.health;
offsetY = target._height + 30;
hitTime = 90;
timePassed = 0;
onEnterFrame = function () {
if (!_root.freeze) {
this._x = target._x;
this._y = target._y - offsetY;
this.bar._width = (target.health / target.maxHealth) * 100;
if (target.health != prevHealth) {
tmp = _root.lvl.attachMovie("damageIndicator", "damageIndicator" + _root.indicatorNo, 360 + (_root.indicatorNo++));
tmp._x = target._x;
tmp._y = target._y - (target._height / 2);
tmp.num = prevHealth - target.health;
if (target.health < prevHealth) {
numBlood = random(3) + 2;
i = 0;
while (i < numBlood) {
tmp = _root.lvl.blood.attachMovie("blood", "blood" + _root.bloodNo, (_root.bloodNo++) + 2);
tmp._x = target._x;
tmp._y = target._y - (target._height / 2);
i++;
}
}
prevHealth = target.health;
hitTime = 100;
}
if (prevHealth < 0) {
prevHealth = 0;
}
if (target.health == target.maxHealth) {
prevHealth = target.maxHealth;
}
if (alwaysShow == true) {
this._alpha = 100;
} else if (hitTime > 0) {
hitTime--;
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
}
} else if (this._alpha > 0) {
this._alpha = this._alpha - 10;
}
} else if (!_root.selectedDiff) {
prevHealth = target.health;
}
};
Symbol 571 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 572 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 573 MovieClip [stew] Frame 1
_alpha = 0;
ySpd = -(8 + random(4));
xSpd = -(5 - random(10));
gravity = 1;
if (this._name == "orig") {
this.swapDepths(2);
this.removeMovieClip();
}
hitWait = 30;
onEnterFrame = function () {
if (!_root.freeze) {
if (hitWait > 0) {
hitWait--;
}
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (((screenX < 50) && (xSpd < 0)) || ((screenX > 750) && (xSpd > 0))) {
xSpd = -xSpd;
}
_y = (_y + ySpd);
_x = (_x + xSpd);
if (_root.lvl.slope.hitTest(screenX, screenY + 50, true)) {
if (ySpd >= 0) {
ySpd = (-ySpd) * 0.3;
}
xSpd = xSpd * 0.8;
if (Math.abs(ySpd) < 1) {
this.inside.play();
ySpd = 0;
} else {
this.inside.gotoAndStop(1);
}
} else {
ySpd = ySpd + gravity;
}
healthCondition = (_root.lvl.pat.health < _root.lvl.pat.maxHealth) || (_root._currentframe == 4);
if ((this.hitTest(_root.lvl.pat) && (healthCondition)) && (hitWait == 0)) {
_root.soupCollected++;
_root.lvl.pat.health = _root.lvl.pat.health + (15 + random(10));
if (_root.lvl.pat.health > _root.lvl.pat.maxHealth) {
_root.lvl.pat.health = _root.lvl.pat.maxHealth;
}
_root.playSip();
this.removeMovieClip();
}
}
};
Symbol 587 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 588 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 589 MovieClip [coin] Frame 1
_alpha = 0;
collected = false;
ySpd = -(8 + random(4));
xSpd = -(5 - random(10));
gravity = 1;
if (this._name == "orig") {
this.swapDepths(2);
this.removeMovieClip();
}
_root.coinsAround++;
offSceenLeft = false;
offSceenRight = false;
hitWait = 30;
prevX = _root.lvl._x;
prevY = _root.lvl._y;
onEnterFrame = function () {
if (_x > (_root.lvl.maxX - 20)) {
_x = (_root.lvl.maxX - 20);
}
if (_x < 20) {
_x = 20;
}
if (!_root.freeze) {
if (hitWait > 0) {
hitWait--;
}
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (hitWait == 0) {
if (offSceenLeft || (offSceenRight)) {
if (offSceenLeft && (screenX > 0)) {
offSceenLeft = false;
_root.coinsToLeft--;
}
if (offSceenRight && (screenX < 800)) {
offSceenRight = false;
_root.coinsToRight--;
}
} else if (screenX < 0) {
offSceenLeft = true;
_root.coinsToLeft++;
} else if (screenX > 800) {
offSceenRight = true;
_root.coinsToRight++;
}
}
if (collected) {
xd = screenX - 575;
yd = screenY - 25;
this._x = this._x - ((xd / 8) - (prevX - _root.lvl._x));
this._y = this._y - ((yd / 8) - (prevY - _root.lvl._y));
if ((Math.abs(yd) + Math.abs(xd)) < 75) {
_root.coinsAround--;
_root.coins++;
_root.playCoin();
this.removeMovieClip();
}
} else {
if (((screenX < 50) && (xSpd < 0)) || ((screenX > 750) && (xSpd > 0))) {
xSpd = -xSpd;
}
_y = (_y + ySpd);
_x = (_x + xSpd);
if (_root.lvl.slope.hitTest(screenX, screenY + 50, true)) {
if (ySpd >= 0) {
ySpd = (-ySpd) * 0.3;
}
xSpd = xSpd * 0.8;
if (Math.abs(ySpd) < 1) {
this.inside.play();
ySpd = 0;
} else {
this.inside.gotoAndStop(1);
}
} else {
ySpd = ySpd + gravity;
}
if (this.hitTest(_root.lvl.pat) && (hitWait == 0)) {
collected = true;
_root.playDing();
}
}
prevX = _root.lvl._x;
prevY = _root.lvl._y;
}
};
Symbol 591 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 592 MovieClip [potato] Frame 1
_alpha = 0;
ySpd = -(8 + random(4));
xSpd = -(5 - random(10));
gravity = 1;
if (this._name == "orig") {
this.swapDepths(2);
this.removeMovieClip();
}
hitWait = 30;
onEnterFrame = function () {
if (!_root.freeze) {
if (hitWait > 0) {
hitWait--;
}
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (((screenX < 50) && (xSpd < 0)) || ((screenX > 750) && (xSpd > 0))) {
xSpd = -xSpd;
}
_y = (_y + ySpd);
_x = (_x + xSpd);
if (_root.lvl.slope.hitTest(screenX, screenY + 50, true)) {
if (ySpd >= 0) {
ySpd = (-ySpd) * 0.3;
}
xSpd = xSpd * 0.8;
if (Math.abs(ySpd) < 1) {
this.inside.play();
ySpd = 0;
} else {
this.inside.gotoAndStop(1);
}
} else {
ySpd = ySpd + gravity;
}
if ((this.hitTest(_root.lvl.pat) && (_root.lvl.pat.health < _root.lvl.pat.maxHealth)) && (hitWait == 0)) {
_root.lvl.pat.health = _root.lvl.pat.health + (4 + random(6));
if (_root.lvl.pat.health > _root.lvl.pat.maxHealth) {
_root.lvl.pat.health = _root.lvl.pat.maxHealth;
}
_root.playChew();
this.removeMovieClip();
}
}
};
Symbol 594 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 595 MovieClip [guiness] Frame 1
_alpha = 0;
ySpd = -(8 + random(4));
xSpd = -(5 - random(10));
gravity = 1;
if (this._name == "orig") {
this.swapDepths(2);
this.removeMovieClip();
}
hitWait = 30;
onEnterFrame = function () {
if (!_root.freeze) {
if (hitWait > 0) {
hitWait--;
}
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (((screenX < 50) && (xSpd < 0)) || ((screenX > 750) && (xSpd > 0))) {
xSpd = -xSpd;
}
_y = (_y + ySpd);
_x = (_x + xSpd);
if (_root.lvl.slope.hitTest(screenX, screenY + 50, true)) {
if (ySpd >= 0) {
ySpd = (-ySpd) * 0.3;
}
xSpd = xSpd * 0.8;
if (Math.abs(ySpd) < 1) {
this.inside.play();
ySpd = 0;
} else {
this.inside.gotoAndStop(1);
}
} else {
ySpd = ySpd + gravity;
}
if (this.hitTest(_root.lvl.pat) && (hitWait == 0)) {
_root.chargePickups--;
_root.superCharge++;
_root.playGulp();
this.removeMovieClip();
}
}
};
Symbol 598 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 599 MovieClip [clover] Frame 1
var minimumDamage = 4;
var additionalDamage = 3;
onEnterFrame = function () {
if (!_root.freeze) {
xD = Math.abs(this._x - _root.lvl.pat._x);
yD = Math.abs(this._y - (_root.lvl.pat._y - (_root.lvl.pat._height / 2)));
this._x = this._x + xSpd;
if ((yD < 60) && (xD < 20)) {
_root.playCloverHit();
damage = random(additionalDamage) + minimumDamage;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -1 : 1), damage);
this.removeMovieClip();
}
if (((xD > 800) || (_root.lvl.slope.hitTest(_x + _root.lvl._x, _y + _root.lvl._y, true))) || (this.hitTest(_root.lvl.rb.hitSpot))) {
this.removeMovieClip();
}
}
};
Symbol 609 MovieClip Frame 1
randNum = (random(50) + 50) / 70;
this._width = this._width * randNum;
this._height = this._height * randNum;
gotoAndStop(random(9) + 1);
Symbol 610 MovieClip [blood] Frame 1
this.inside._y = this.inside._y + random(10);
this._x = this._x + (random(40) - 20);
this._y = this._y + (random(20) - 10);
var xSpd = (random(10) - 5);
var ySpd = (-(10 + random(15)));
var gravity = 2;
var timeTime = 0;
hit = false;
origWidth = inside._width;
onEnterFrame = function () {
if (!_root.freeze) {
timeTime++;
if (timeTime > 300) {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
_y = (_y + ySpd);
_x = (_x + xSpd);
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
while (_root.lvl.slope.hitTest(screenX, screenY - 5, true) && (ySpd >= 0)) {
_y = (_y-1);
screenY--;
}
if (_root.lvl.slope.hitTest(screenX, screenY, true)) {
if (!hit) {
if (random(2) == 0) {
this.removeMovieClip();
}
inside._width = inside._width * 2;
inside._height = inside._height / 1.5;
hit = true;
}
if (inside._width < (origWidth * 5)) {
inside._width = inside._width + 0.2;
}
if (ySpd >= 0) {
ySpd = 0;
}
xSpd = 0;
} else {
ySpd = ySpd + gravity;
}
}
};
Symbol 621 MovieClip [cloud] Frame 1
stop();
speed = (random(50) / 100) + 0.25;
onEnterFrame = function () {
if (!_root.freeze) {
this._x = this._x - speed;
if (((this._x + _parent._x) + _root.lvl._x) < -200) {
this._x = this._x + 1200;
}
if (((this._x + _parent._x) + _root.lvl._x) > 1000) {
this.inside._x = this.inside._x - 1200;
}
}
};
Symbol 627 Button
on (release) {
com.newgrounds.API.loadNewgrounds();
}
Symbol 633 MovieClip Frame 1
// swfAction0xFC hexdata 0x03,0x00 // Unknown action
function \u0004\u0005() {
Set("\x03", (625 % 511) * true);
return(\x03);
}
var \x01 = (659 + \x04\x05());
// swfAction0x03 // Unknown action
Symbol 634 MovieClip Frame 11
gotoAndPlay (1);
Symbol 635 MovieClip [Flash Ad (NewgroundsAPI)] Frame 1
#initclip 24
Object.registerClass("Flash Ad (NewgroundsAPI)", com.newgrounds.components.FlashAd);
#endinitclip
Symbol 663 MovieClip Frame 1
// swfAction0xFC hexdata 0x03,0x00 // Unknown action
function \u0004\u0005() {
Set("\x03", (1028 % 511) * true);
return(\x03);
}
var \x01 = (304 + \x04\x05());
// swfAction0x03 // Unknown action
Symbol 665 MovieClip Frame 10
stop();
Symbol 667 MovieClip Frame 37
_parent.setGotoFrame("done");
stop();
Symbol 679 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 1
// swfAction0xFC hexdata 0x03,0x00 // Unknown action
function \u0004\u0005() {
Set("\x03", (1109 % 511) * true);
return(\x03);
}
var \x01 = (29 + \x04\x05());
// swfAction0x03 // Unknown action
Symbol 679 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 2
medal.attachIcon(icon);
Symbol 679 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 10
// swfAction0xFC hexdata 0x03,0x00 // Unknown action
function \u0004\u0005() {
Set("\x03", (1760 % 511) * true);
return(\x03);
}
var \x01 = (538 + \x04\x05());
// swfAction0x03 // Unknown action
Symbol 679 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 21
this.removeMovieClip();
_visible = false;
stop();
Symbol 685 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 1
!!!ERROR
Symbol 685 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 10
stop();
Symbol 685 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 21
this.removeMovieClip();
_visible = false;
stop();
Symbol 688 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 1
!!!ERROR
Symbol 688 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 10
stop();
Symbol 688 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 21
this.removeMovieClip();
_visible = false;
stop();
Symbol 709 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1
!!!ERROR
Symbol 713 Button
on (release) {
!!!ERROR
Symbol 719 Button
on (release) {
getURL (official_version_url, "_blank");
}
Symbol 721 MovieClip [NewgroundsAsset_New_Version_Available] Frame 1
!!!ERROR
Symbol 722 Button
on (release) {
getURL (official_version_url, "_blank");
}
Symbol 726 MovieClip [NewgroundsAsset_Illegal_Host] Frame 1
!!!ERROR
Symbol 727 MovieClip [API Connector (NewgroundsAPI)] Frame 1
#initclip 25
Object.registerClass("API Connector (NewgroundsAPI)", com.newgrounds.components.APIConnector);
#endinitclip
Symbol 727 MovieClip [API Connector (NewgroundsAPI)] Frame 20
_visible = false;
Symbol 748 MovieClip Frame 40
stop();
Symbol 762 Button
on (press) {
tellTarget (_root) {
nextFrame();
};
}
Symbol 763 Button
on (press) {
gotoAndStop ("end");
_root.gotoAndStop(9);
}
Instance of Symbol 738 MovieClip in Symbol 764 MovieClip Frame 1
onClipEvent (load) {
_root.stop();
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("lastframe");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 764 MovieClip Frame 101
play();
Symbol 764 MovieClip Frame 165
stop();
Symbol 770 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 776 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 778 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 782 MovieClip Frame 1
stop();
Symbol 785 MovieClip Frame 1
stop();
songPlaying = false;
onEnterFrame = function () {
if ((((!_root.freeze) && (_root._currentframe == 2)) || ((_root._currentframe == 3) && (!_root.selectedDiff))) && (!_root.mute)) {
if (!songPlaying) {
gotoAndStop (3);
}
songPlaying = true;
} else if (_currentframe != 1) {
songPlaying = false;
stopAllSounds();
gotoAndStop (1);
}
};
Symbol 785 MovieClip Frame 3
gotoAndStop (2);
Symbol 795 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 2
gotoAndStop (1);
Symbol 795 MovieClip Frame 3
gotoAndStop (1);
Symbol 795 MovieClip Frame 4
gotoAndStop (1);
Symbol 795 MovieClip Frame 5
gotoAndStop (1);
Symbol 795 MovieClip Frame 6
gotoAndStop (1);
Symbol 795 MovieClip Frame 7
gotoAndStop (1);
Symbol 795 MovieClip Frame 8
gotoAndStop (1);
Symbol 795 MovieClip Frame 9
gotoAndStop (1);
Symbol 795 MovieClip Frame 10
gotoAndStop (1);
Symbol 800 MovieClip Frame 1
stop();
Symbol 800 MovieClip Frame 2
gotoAndStop (1);
Symbol 800 MovieClip Frame 3
gotoAndStop (1);
Symbol 800 MovieClip Frame 4
gotoAndStop (1);
Symbol 800 MovieClip Frame 5
gotoAndStop (1);
Symbol 811 MovieClip Frame 1
stop();
Symbol 811 MovieClip Frame 2
gotoAndStop (1);
Symbol 811 MovieClip Frame 3
gotoAndStop (1);
Symbol 811 MovieClip Frame 4
gotoAndStop (1);
Symbol 811 MovieClip Frame 5
gotoAndStop (1);
Symbol 811 MovieClip Frame 6
gotoAndStop (1);
Symbol 811 MovieClip Frame 7
gotoAndStop (1);
Symbol 811 MovieClip Frame 8
gotoAndStop (1);
Symbol 811 MovieClip Frame 9
gotoAndStop (1);
Symbol 811 MovieClip Frame 10
gotoAndStop (1);
Symbol 811 MovieClip Frame 11
gotoAndStop (1);
Symbol 815 MovieClip Frame 1
stop();
Symbol 815 MovieClip Frame 2
gotoAndStop (1);
Symbol 815 MovieClip Frame 3
gotoAndStop (1);
Symbol 815 MovieClip Frame 4
gotoAndStop (1);
Symbol 815 MovieClip Frame 5
gotoAndStop (1);
Symbol 815 MovieClip Frame 6
gotoAndStop (1);
Symbol 815 MovieClip Frame 7
gotoAndStop (1);
Symbol 815 MovieClip Frame 8
gotoAndStop (1);
Symbol 815 MovieClip Frame 9
gotoAndStop (1);
Symbol 818 MovieClip Frame 1
stop();
Symbol 819 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((_root._currentframe < 3) || (_root._currentframe == 4)) {
gotoAndStop (1);
}
if (((((!_root.bossMusic) && (!_root.cinematic)) && (!_root.freeze)) && (_root.lvl.pat.health > 0)) && (!_root.mute)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 819 MovieClip Frame 3540
gotoAndPlay (25);
Symbol 825 MovieClip Frame 1
if (((_root._currentframe == 4) || (random(7) < 6)) || (_root.lastLepRandom > 0)) {
stop();
_parent.gotoAndStop(1);
} else {
_root.lastLepRandom = 30;
gotoAndStop(random(4) + 2);
}
Symbol 825 MovieClip Frame 2
_parent.gotoAndStop(1);
Symbol 825 MovieClip Frame 3
_parent.gotoAndStop(1);
Symbol 825 MovieClip Frame 4
_parent.gotoAndStop(1);
Symbol 825 MovieClip Frame 5
_parent.gotoAndStop(1);
Symbol 835 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 2
gotoAndStop (1);
Symbol 843 MovieClip Frame 3
gotoAndStop (1);
Symbol 843 MovieClip Frame 4
gotoAndStop (1);
Symbol 843 MovieClip Frame 5
gotoAndStop (1);
Symbol 843 MovieClip Frame 6
gotoAndStop (1);
Symbol 843 MovieClip Frame 7
gotoAndStop (1);
Symbol 843 MovieClip Frame 8
gotoAndStop (1);
Symbol 843 MovieClip Frame 9
gotoAndStop (1);
Symbol 849 MovieClip Frame 1
stop();
Symbol 849 MovieClip Frame 2
gotoAndStop (1);
Symbol 849 MovieClip Frame 3
gotoAndStop (1);
Symbol 849 MovieClip Frame 4
gotoAndStop (1);
Symbol 849 MovieClip Frame 5
gotoAndStop (1);
Symbol 849 MovieClip Frame 6
gotoAndStop (1);
Symbol 851 MovieClip Frame 1
stop();
Symbol 851 MovieClip Frame 2
gotoAndStop (1);
Symbol 853 MovieClip Frame 1
if ((_root._currentframe == 4) || (random(3) == 0)) {
gotoAndStop (3);
}
Symbol 853 MovieClip Frame 3
_parent.gotoAndStop(1);
Symbol 857 MovieClip Frame 1
stop();
Symbol 862 MovieClip Frame 1
stop();
Symbol 862 MovieClip Frame 2
gotoAndStop (1);
Symbol 862 MovieClip Frame 3
gotoAndStop (1);
Symbol 862 MovieClip Frame 4
gotoAndStop (1);
Symbol 864 MovieClip Frame 1
stop();
Symbol 864 MovieClip Frame 2
gotoAndStop (1);
Symbol 864 MovieClip Frame 3
gotoAndStop (1);
Symbol 864 MovieClip Frame 4
gotoAndStop (1);
Symbol 866 MovieClip Frame 1
stop();
Symbol 866 MovieClip Frame 2
gotoAndStop (1);
Symbol 869 MovieClip Frame 1
stop();
Symbol 869 MovieClip Frame 2
gotoAndStop (1);
Symbol 869 MovieClip Frame 3
gotoAndStop (1);
Symbol 871 MovieClip Frame 1
stop();
Symbol 871 MovieClip Frame 2
gotoAndStop (1);
Symbol 874 MovieClip Frame 1
stop();
Symbol 874 MovieClip Frame 2
gotoAndStop (1);
Symbol 874 MovieClip Frame 3
gotoAndStop (1);
Symbol 879 MovieClip Frame 1
stop();
Symbol 879 MovieClip Frame 2
gotoAndStop (1);
Symbol 879 MovieClip Frame 3
gotoAndStop (1);
Symbol 879 MovieClip Frame 4
gotoAndStop (1);
Symbol 879 MovieClip Frame 5
gotoAndStop (1);
Symbol 881 MovieClip Frame 1
stop();
Symbol 881 MovieClip Frame 2
gotoAndStop (1);
Symbol 882 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (_root._currentframe < 3) {
gotoAndStop (1);
}
bossEndCondition = (_root._currentframe != 5) || (_root.lvl.enemies.biglep.health > 0);
if ((((_root.bossMusic && (!_root.freeze)) && (_root.lvl.pat.health > 0)) && (!_root.mute)) && (bossEndCondition)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 882 MovieClip Frame 2368
gotoAndPlay (3);
Symbol 886 MovieClip Frame 1
stop();
Symbol 886 MovieClip Frame 2
play();
Symbol 888 MovieClip Frame 1
stop();
Symbol 888 MovieClip Frame 2
gotoAndStop (1);
Symbol 889 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((_root._currentframe == 6) && (!_root.mute)) {
if (_currentframe == 1) {
play();
}
} else if (_currentframe != 1) {
gotoAndStop (1);
}
};
Symbol 889 MovieClip Frame 500
stop();
Symbol 891 MovieClip Frame 1
stop();
Symbol 891 MovieClip Frame 2
gotoAndStop (1);
Symbol 897 MovieClip Frame 1
stop();
Symbol 897 MovieClip Frame 2
gotoAndStop (1);
Symbol 897 MovieClip Frame 3
gotoAndStop (1);
Symbol 897 MovieClip Frame 4
gotoAndStop (1);
Symbol 897 MovieClip Frame 5
gotoAndStop (1);
Symbol 897 MovieClip Frame 6
gotoAndStop (1);
Symbol 898 MovieClip Frame 1
stop();
Symbol 898 MovieClip Frame 2
gotoAndStop (1);
Symbol 898 MovieClip Frame 3
gotoAndStop (1);
Symbol 898 MovieClip Frame 4
gotoAndStop (1);
Symbol 899 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root._currentframe != 4) {
gotoAndStop (1);
}
if ((((((_root._currentframe == 4) && (!_root.bossMusic)) && (!_root.cinematic)) && (!_root.freeze)) && (_root.lvl.pat.health > 0)) && (!_root.mute)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 907 MovieClip Frame 1
stop();
Symbol 907 MovieClip Frame 2
gotoAndStop (1);
Symbol 907 MovieClip Frame 3
gotoAndStop (1);
Symbol 907 MovieClip Frame 4
gotoAndStop (1);
Symbol 907 MovieClip Frame 5
gotoAndStop (1);
Symbol 907 MovieClip Frame 6
gotoAndStop (1);
Symbol 907 MovieClip Frame 7
gotoAndStop (1);
Symbol 907 MovieClip Frame 8
gotoAndStop (1);
Symbol 915 MovieClip Frame 1
stop();
Symbol 915 MovieClip Frame 2
gotoAndStop (1);
Symbol 915 MovieClip Frame 3
gotoAndStop (1);
Symbol 915 MovieClip Frame 4
gotoAndStop (1);
Symbol 915 MovieClip Frame 5
gotoAndStop (1);
Symbol 915 MovieClip Frame 6
gotoAndStop (1);
Symbol 915 MovieClip Frame 7
gotoAndStop (1);
Symbol 915 MovieClip Frame 8
gotoAndStop (1);
Symbol 917 MovieClip Frame 1
stop();
Symbol 917 MovieClip Frame 2
gotoAndStop (1);
Symbol 917 MovieClip Frame 3
gotoAndStop (1);
Symbol 917 MovieClip Frame 4
gotoAndStop (1);
Symbol 919 MovieClip Frame 1
stop();
Symbol 919 MovieClip Frame 2
gotoAndStop (1);
Symbol 919 MovieClip Frame 3
gotoAndStop (1);
Symbol 919 MovieClip Frame 4
gotoAndStop (1);
Symbol 927 MovieClip Frame 1
stop();
Symbol 927 MovieClip Frame 2
gotoAndStop (1);
Symbol 927 MovieClip Frame 3
gotoAndStop (1);
Symbol 927 MovieClip Frame 4
gotoAndStop (1);
Symbol 927 MovieClip Frame 5
gotoAndStop (1);
Symbol 927 MovieClip Frame 6
gotoAndStop (1);
Symbol 927 MovieClip Frame 7
gotoAndStop (1);
Symbol 927 MovieClip Frame 8
gotoAndStop (1);
Symbol 927 MovieClip Frame 9
gotoAndStop (1);
Symbol 929 MovieClip Frame 1
stop();
Symbol 937 MovieClip Frame 1
stop();
var _url = root.loaderInfo.url;
var host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
valid = false;
i = 0;
while (i < _root.correctDomains.length) {
if (host == _root.correctDomains[i]) {
valid = true;
}
i++;
}
if ((!valid) && (_root.correctDomains.length > 0)) {
gotoAndStop (2);
}
Symbol 637 MovieClip [__Packages.com.newgrounds.API] Frame 0
!!!ERROR
Symbol 638 MovieClip [__Packages.com.newgrounds.Bridge] Frame 0
!!!ERROR
Symbol 639 MovieClip [__Packages.com.newgrounds.SaveFile] Frame 0
!!!ERROR
Symbol 640 MovieClip [__Packages.com.newgrounds.SaveGroup] Frame 0
!!!ERROR
Symbol 643 MovieClip [__Packages.com.newgrounds.SaveGroupQuery] Frame 0
!!!ERROR
Symbol 645 MovieClip [__Packages.com.newgrounds.encoders.ImageScanner] Frame 0
!!!ERROR
Symbol 644 MovieClip [__Packages.com.newgrounds.encoders.BaseN] Frame 0
!!!ERROR
Symbol 654 MovieClip [__Packages.com.newgrounds.APIEventDispatcher] Frame 0
!!!ERROR
Symbol 642 MovieClip [__Packages.com.newgrounds.APIEvent] Frame 0
!!!ERROR
Symbol 650 MovieClip [__Packages.com.newgrounds.ScoreBoard] Frame 0
!!!ERROR
Symbol 636 MovieClip [__Packages.com.newgrounds.APIError] Frame 0
!!!ERROR
Symbol 2465 MovieClip [__Packages.NewgroundsAPI] Frame 0
!!!ERROR
Symbol 622 MovieClip [__Packages.com.newgrounds.components.FlashAd] Frame 0
!!!ERROR
Symbol 641 MovieClip [__Packages.com.newgrounds.ValidationTools] Frame 0
!!!ERROR
Symbol 646 MovieClip [__Packages.com.newgrounds.encoders.SerialXML] Frame 0
!!!ERROR
Symbol 647 MovieClip [__Packages.com.newgrounds.encoders.LZW2] Frame 0
!!!ERROR
Symbol 648 MovieClip [__Packages.com.newgrounds.encoders.LZW] Frame 0
!!!ERROR
Symbol 649 MovieClip [__Packages.com.newgrounds.Medal] Frame 0
!!!ERROR
Symbol 651 MovieClip [__Packages.com.newgrounds.Score] Frame 0
!!!ERROR
Symbol 652 MovieClip [__Packages.com.newgrounds.encoders.RC4] Frame 0
!!!ERROR
Symbol 653 MovieClip [__Packages.com.newgrounds.encoders.JSON] Frame 0
!!!ERROR
Symbol 655 MovieClip [__Packages.com.newgrounds.encoders.MD5] Frame 0
!!!ERROR
Symbol 656 MovieClip [__Packages.com.newgrounds.components.APIConnector] Frame 0
!!!ERROR
Symbol 950 Button
on (press) {
_root.loadFacebookSite();
}
Symbol 985 MovieClip Frame 1
function selectFunc() {
_parent._parent.gotoAndStop(2);
}
h._alpha = 0;
down = false;
selectNum = 2;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
_parent._parent.keyReleased = true;
_parent._parent.down = true;
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (h._alpha < 100) {
h._alpha = h._alpha + 20;
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
_parent._parent.keyReleased = false;
_parent._parent.down = false;
selectFunc();
}
} else {
down = false;
if (h._alpha > 0) {
h._alpha = h._alpha - 20;
}
}
};
Symbol 987 MovieClip Frame 1
function selectFunc() {
stopAllSounds();
_root.gotoAndStop(7);
}
h._alpha = 0;
down = false;
selectNum = 1;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (h._alpha < 100) {
h._alpha = h._alpha + 20;
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (h._alpha > 0) {
h._alpha = h._alpha - 20;
}
}
};
Symbol 989 MovieClip Frame 1
function selectFunc() {
_root.loadSponsorsSite();
}
h._alpha = 0;
down = false;
selectNum = 3;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (h._alpha < 100) {
h._alpha = h._alpha + 20;
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (h._alpha > 0) {
h._alpha = h._alpha - 20;
}
}
};
Symbol 990 MovieClip Frame 20
stop();
select = 1;
dRelease = true;
uRelease = true;
keyRelease = false;
prevSelect = 1;
_root.freeze = false;
onEnterFrame = function () {
if (select < 1) {
select = 3;
}
if (select > 3) {
select = 1;
}
if (prevSelect != select) {
_root.playRollOver();
prevSelect = select;
}
if (Key.isDown(40)) {
if (dRelease) {
select++;
}
dRelease = false;
} else {
dRelease = true;
}
if (Key.isDown(38)) {
if (uRelease) {
select--;
}
uRelease = false;
} else {
uRelease = true;
}
if (Key.isDown(13) || (Key.isDown(65))) {
keyRelease = false;
} else {
keyRelease = true;
}
};
stop();
Symbol 1033 Button
on (press) {
_root.loadPhantasmagor();
}
Symbol 1034 Button
on (press) {
_root.loadBgroup();
}
Symbol 1035 Button
on (press) {
_root.loadBrian();
}
Symbol 1036 Button
on (press) {
_root.loadJosh();
}
Symbol 1037 Button
on (press) {
_root.loadAndy();
}
Symbol 1038 Button
on (press) {
_root.loadSponsorsSite();
}
Symbol 1039 Button
on (press) {
Key.removeListener(KeyListener);
gotoAndStop (1);
}
Symbol 1040 MovieClip Frame 1
if (variables == undefined) {
stop();
variables = true;
keyReleased = false;
down = true;
} else {
inside.gotoAndStop(20);
}
Symbol 1040 MovieClip Frame 2
stop();
KeyListener = {};
KeyListener.onKeyDown = function () {
if (keyReleased) {
Key.removeListener(KeyListener);
gotoAndStop (1);
}
keyReleased = false;
};
KeyListener.onKeyUp = function () {
keyReleased = true;
};
Key.addListener(KeyListener);
Symbol 1050 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((_root.lvl.rb._currentframe < 6) || (_root.lvl.rb._currentframe > 70)) {
this.gotoAndStop(1);
} else if (!_root.freeze) {
this.play();
}
};
Symbol 1051 MovieClip Frame 1
numClouds = 5;
var xUsed = new Array();
var yUsed = new Array();
var x;
var y;
i = 0;
while (i < numClouds) {
do {
x = random(1100) - 150;
y = random(500) - 300;
found = true;
j = 0;
while (j < xUsed.length) {
xd = x - xUsed[j];
yd = y - yUsed[j];
if (Math.sqrt((xd * xd) + (yd * yd)) < 200) {
found = false;
break;
}
j++;
}
} while (!found);
xUsed.push(x);
yUsed.push(y);
f = random(5) + 1;
tmp = attachMovie("cloud", "cloud" + i, i);
tmp._y = y;
tmp._x = x;
tmp.gotoAndStop(f);
tmp2 = attachMovie("cloud", ("cloud" + i) + numClouds, i + numClouds);
tmp2._y = y + 800;
tmp2._x = x + 800;
tmp2.gotoAndStop(f);
i++;
}
Symbol 1057 MovieClip Frame 1
this._visible = false;
Symbol 1062 MovieClip Frame 1
number = _root.cloverNum;
origLeafY = leaves._y;
myGround = _root.lvl.slope.attachMovie("cloverground", "cloverground" + _root.cloverNum, _root.cloverNum);
myGround._x = _x;
myGround._y = (_y + origLeafY) + 20;
_root.cloverNum++;
stem._yscale = stem._yscale * Math.abs(origLeafY / 145);
origStemY = stem._yscale;
origStemX = stem._xscale;
onEnterFrame = function () {
if (!_root.freeze) {
leaves._y = origLeafY + (myGround._y - myGround.origY);
leaves._rotation = myGround._rotation;
stem._yscale = origStemY * Math.abs(leaves._y / origLeafY);
stem._xscale = origStemX / Math.abs(leaves._y / origLeafY);
}
};
Symbol 1110 MovieClip Frame 26
gotoAndPlay (8);
Symbol 1116 MovieClip Frame 1
_root.playJump();
Symbol 1116 MovieClip Frame 3
stop();
Symbol 1116 MovieClip Frame 6
_parent.gotoAndStop(1);
Symbol 1244 MovieClip Frame 4
_parent.attacking = true;
_parent.attackNum = 1;
_root.playWhoosh();
Symbol 1244 MovieClip Frame 5
_parent.contAttack = false;
Symbol 1244 MovieClip Frame 9
if (_parent.contAttack) {
gotoAndPlay (13);
} else {
_parent.attacking = false;
}
Symbol 1244 MovieClip Frame 12
_parent.gotoAndStop(1);
Symbol 1244 MovieClip Frame 13
_root.playWhoosh();
_parent.contAttack = false;
Symbol 1244 MovieClip Frame 15
_parent.attacking = true;
_parent.attackNum = 2;
_root.playWhoosh();
Symbol 1244 MovieClip Frame 17
_parent.attacking = true;
_root.playWhoosh();
Symbol 1244 MovieClip Frame 20
if (!_parent.contAttack) {
_parent.attacking = false;
_parent.gotoAndStop(1);
}
Symbol 1244 MovieClip Frame 21
_parent.contAttack = false;
_parent.attacking = true;
_parent.attackNum = 3;
Symbol 1244 MovieClip Frame 22
_root.playWhoosh();
Symbol 1244 MovieClip Frame 23
_root.playWhoosh();
Symbol 1244 MovieClip Frame 26
_parent.attackNum = 4;
Symbol 1244 MovieClip Frame 33
_parent.attackNum = 3;
Symbol 1244 MovieClip Frame 36
_root.playWhoosh();
Symbol 1244 MovieClip Frame 37
_root.playWhoosh();
Symbol 1244 MovieClip Frame 40
_parent.attackNum = 4;
Symbol 1244 MovieClip Frame 45
_parent.attacking = false;
_parent.gotoAndStop(1);
Symbol 1253 MovieClip Frame 1
if (_root.mute || (random(3) == 0)) {
stop();
}
Symbol 1259 MovieClip Frame 4
_parent.contAttack = false;
Symbol 1259 MovieClip Frame 8
_root.playWhoosh();
_parent.attacking = true;
_parent.attackNum = 1;
_root.playWhoosh();
Symbol 1259 MovieClip Frame 14
stop();
_parent.attacking = false;
Symbol 1259 MovieClip Frame 22
_parent.gotoAndStop(1);
Symbol 1262 MovieClip Frame 10
_parent.gotoAndStop(1);
Symbol 1272 MovieClip Frame 1
if (_root.mute) {
stop();
}
if (_root.lives < 0) {
gotoAndStop (3);
}
Symbol 1272 MovieClip Frame 2
stop();
Symbol 1348 MovieClip Frame 29
stop();
_parent._alpha = 100;
if (_root.lives < 0) {
gotoAndPlay (62);
}
Symbol 1348 MovieClip Frame 61
_parent.health = _parent.maxHealth;
_root.lvl.rb.gotoAndStop(1);
_root.lvl.hitTime = 60;
_root.freeze = false;
_parent.gotoAndStop(1);
Symbol 1348 MovieClip Frame 110
stopAllSounds();
_root.gotoAndStop(6);
Symbol 1357 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (random(60) == 1) {
play();
}
};
Symbol 1358 MovieClip Frame 1
goingBack = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (Key.isDown(40)) {
goingBack = false;
} else {
goingBack = true;
}
if (goingBack) {
if (this._currentframe == 1) {
_parent.gotoAndStop(1);
} else {
this.prevFrame();
}
} else {
this.nextFrame();
}
}
};
Symbol 1358 MovieClip Frame 7
stop();
Symbol 1359 MovieClip Frame 1
_parent.attacking = true;
_parent.attackNum = 2;
Symbol 1359 MovieClip Frame 2
_root.playSpecialWhoosh();
Symbol 1359 MovieClip Frame 14
_parent.attacking = false;
_parent.gotoAndStop(1);
Symbol 1361 MovieClip Frame 1
stop();
attackNum = 1;
attacking = false;
contAttack = false;
if (variables == undefined) {
variables = true;
minimumDamage = 5;
additionalDamage = 6;
var healthBar = _root.lvl.healths.attachMovie("healthBar", "patHealthBar", 601);
healthBar.target = this;
healthBar._width = healthBar._width * 0.6;
healthBar._height = healthBar._height * 0.6;
healthBar.alwaysShow = true;
healthBar.nameTxt.text = "St. Pattack";
maxHealth = 60 - (10 * _root.difficulty);
health = maxHealth;
}
Symbol 1361 MovieClip Frame 2
attacking = false;
Symbol 1361 MovieClip Frame 3
attacking = false;
Symbol 1361 MovieClip Frame 4
attacking = false;
Symbol 1361 MovieClip Frame 5
_xscale = _root.lvl.origScale;
attacking = false;
Symbol 1361 MovieClip Frame 6
attacking = false;
Symbol 1361 MovieClip Frame 7
attacking = false;
Symbol 1361 MovieClip Frame 8
attacking = false;
Symbol 1361 MovieClip Frame 10
attacking = false;
Symbol 1361 MovieClip Frame 11
attacking = false;
Symbol 1372 MovieClip Frame 56
stop();
_root.createPickup(_parent._parent._x, _parent._parent._y, 4);
_parent._parent.swapDepths(9999);
_parent._parent.removeMovieClip();
Symbol 1373 MovieClip Frame 1
stop();
Symbol 1373 MovieClip Frame 3
_root.sheepKilled = true;
Symbol 1374 MovieClip Frame 1
function setAttributes() {
maxHealth = 20 + (40 * _root.difficulty);
if (_root._currentframe == 4) {
maxHealth = 1;
}
health = maxHealth;
origDif = _root.difficulty;
}
function hitControl() {
if (hitTime == 0) {
xd = this._x - _root.lvl.pat._x;
front = (_root.lvl.pat.attackNum == 3) || (((_root.lvl.facing > 0) ? (((xd > 0) ? true : false)) : (((xd < 0) ? true : false))));
if ((front && (_root.lvl.pat.attacking)) && (_currentframe == 1)) {
xd = Math.abs(_x - _root.lvl.pat._x);
yd = Math.abs((_y - (_height / 2)) - (_root.lvl.pat._y - (_root.lvl.pat._height / 2)));
if ((xd < 140) && (yd < 80)) {
xSpd = ((_x - _root.lvl.pat._x) / 10) * ((random(6) + 5) / 10);
ySpd = -20;
this.health = this.health - (random(_root.lvl.pat.additionalDamage) + _root.lvl.pat.minimumDamage);
_root.playImpact();
_root.playBah();
_root.createRumble(5, 3);
hitTime++;
}
}
if ((_root.lvl.rb._currentframe > 1) && (this.hitTest(_root.lvl.rb.hitSpot))) {
this.health = this.health - (random(_root.lvl.rb.additionalDamage) + _root.lvl.rb.minimumDamage);
_root.playImpact();
_root.playBah();
_root.createRumble(5, 3);
hitTime++;
xSpd = 10 * ((random(6) + 5) / 10);
ySpd = -20;
}
} else {
hitTime++;
if ((hitTime % 10) == 0) {
_alpha = 100;
} else if ((hitTime % 5) == 0) {
_alpha = 60;
}
if (hitTime == 40) {
hitTime = 0;
}
}
}
stop();
_root.sheepNo++;
var healthBar = _root.lvl.healths.attachMovie("healthBar", "healthBar" + _root.sheepNo, _root.sheepNo + 330);
healthBar.target = this;
healthBar._width = healthBar._width * 0.5;
healthBar._height = healthBar._height * 0.5;
healthBar.nameTxt.text = "Sheep";
var maxHealth = (20 + (40 * _root.difficulty));
var health = maxHealth;
var arrPos = _root.sheepArr.length;
_root.sheepArr.push(this);
var ySpd = 0;
var gravity = 2;
var origScale = _xscale;
var hitTime = 0;
origDif = _root.difficulty;
setAttributes();
onEnterFrame = function () {
if (_root.difficulty != origDif) {
setAttributes();
}
if (!_root.freeze) {
_y = (_y + ySpd);
_x = (_x + xSpd);
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
if (((screenX > 750) && (xSpd > 0)) || ((screenX < 50) && (xSpd < 0))) {
xSpd = -xSpd;
}
while (_root.lvl.slope.hitTest(screenX, screenY - 5, true) && (ySpd >= 0)) {
_y = (_y-1);
screenY--;
}
if (_root.lvl.slope.hitTest(screenX, screenY, true)) {
if (ySpd >= 0) {
if (this.inside._currentframe < 3) {
inside.gotoAndStop(1);
}
ySpd = 0;
}
xSpd = xSpd * 0.7;
} else {
if (ySpd < 0) {
if (this.inside._currentframe < 3) {
inside.gotoAndStop(2);
}
}
ySpd = ySpd + gravity;
}
if (xSpd < 0) {
_xscale = origScale;
} else if (xSpd > 0) {
_xscale = (-origScale);
}
if (health <= 0) {
if (this.inside._currentframe < 3) {
health = 0;
this._alpha = 100;
this.inside.gotoAndStop(3);
this.healthBar.removeMovieClip();
_root.sheepArr.splice(arrPos, 1);
}
} else {
hitControl();
}
}
};
Symbol 1382 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1391 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1401 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1405 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1426 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1431 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1445 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1469 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1502 MovieClip Frame 47
_parent.gotoAndStop(1);
Symbol 1512 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 1551 MovieClip Frame 53
if (((_root.lives == 4) && (_root.difficulty == 2)) && (!_root.awd_LifeSaver)) {
_root.awd_LifeSaver = true;
_root.DisplayAward("Life Saver");
}
_root.createPickup(_parent._parent._x, _parent._parent._y, _parent._parent.pickup);
_parent._parent.swapDepths(9999);
_parent._parent.removeMovieClip();
Symbol 1598 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 1609 MovieClip Frame 1
stop();
Symbol 1609 MovieClip Frame 2
_root.cinematic = true;
_root.createRumble(15, 100);
_root.playRumble();
_root.borderFlash.play();
_root.bossMusic = true;
Symbol 1609 MovieClip Frame 123
_root.cinematic = false;
_parent.gotoAndStop(1);
Symbol 1630 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 1630 MovieClip Frame 10
_root.playWhoosh();
Symbol 1642 MovieClip Frame 41
_parent.gotoAndStop(1);
Symbol 1643 MovieClip Frame 1
stop();
attacking = false;
_parent.healthBar.offsetY = _parent._height + 30;
Symbol 1643 MovieClip Frame 2
attacking = false;
Symbol 1643 MovieClip Frame 3
attacking = false;
Symbol 1643 MovieClip Frame 4
attacking = false;
Symbol 1643 MovieClip Frame 5
attacking = false;
Symbol 1644 MovieClip Frame 1
function setAttributes() {
maxHealth = (60 - (10 * _root.difficulty)) * 3;
health = maxHealth;
minimumDamage = 3 * _root.difficulty;
additionalDamage = 3 + (2 * _root.difficulty);
origDif = _root.difficulty;
}
function chasePat() {
if (this.inside._currentframe == 7) {
xSpd = 0;
} else if (!charging) {
if (_root.lvl.pat.health > 0) {
timeAtPos++;
if (timeAtPos == 30) {
inside.gotoAndStop(5);
}
if ((timeAtPos == 10) && (readyForSounds)) {
if ((currPos == 2) || (currPos == 4)) {
_root.playDruidKiss();
}
if ((currPos == 1) || (currPos == 3)) {
_root.playDruidDrink();
}
}
if (this.inside._currentframe == 8) {
timeAtPos = 0;
if ((this.inside.thro._currentframe > 14) && (this.inside.thro._currentframe < 35)) {
if (hitDelay == 0) {
hitPat();
hitDelay = 30;
}
if (currPos == 1) {
_root.lvl.xSpd = -30;
} else {
_root.lvl.xSpd = 30;
}
_root.lvl.ySpd = -10;
}
}
if (currPos == 1) {
if (this._x < _root.lvl.pat._x) {
this.inside.gotoAndStop(8);
}
_xscale = origScale;
if (timeAtPos == 25) {
_parent.w1.gush = true;
}
if (timeAtPos == 40) {
_parent.w2.gush = true;
}
if (timeAtPos == 55) {
_parent.w3.gush = true;
}
}
if (currPos == 2) {
_xscale = origScale;
if ((timeAtPos == 30) || (timeAtPos == 60)) {
tmp = _root.lvl.enemies.attachMovie("rock", "rock" + _root.lepNo, _root.lepNo++);
tmp._x = _x - ((timeAtPos - 40) * 4);
tmp._y = _y - 400;
tmp.dir = -1;
}
}
if (currPos == 3) {
if (this._x > _root.lvl.pat._x) {
this.inside.gotoAndStop(8);
}
_xscale = (-origScale);
if (timeAtPos == 25) {
_parent.w3.gush = true;
}
if (timeAtPos == 40) {
_parent.w2.gush = true;
}
if (timeAtPos == 55) {
_parent.w1.gush = true;
}
}
if (currPos == 4) {
_xscale = (-origScale);
if ((timeAtPos == 30) || (timeAtPos == 60)) {
tmp = _root.lvl.enemies.attachMovie("rock", "rock" + _root.lepNo, _root.lepNo++);
tmp._x = _x + ((timeAtPos - 40) * 4);
tmp._y = _y - 400;
tmp.dir = 1;
}
}
if ((((Math.abs(_x - _root.lvl.pat._x) < 150) && (Math.abs(_y - _root.lvl.pat._y) < 180)) && (inside._currentframe < 7)) || (timeAtPos > 140)) {
timeAtPos = 0;
_root.playBoost();
charging = true;
} else if (inside._currentframe == 2) {
xSpd = 0;
inside.gotoAndStop(1);
}
}
} else {
readyForSounds = true;
this.inside.gotoAndStop(2);
if (this.hitSpot.hitTest(_root.lvl.pat.hitbox) && (hitDelay == 0)) {
if (random(5) < 3) {
_root.playClose();
}
hitDelay = 3;
hitPat();
}
targetSpot = rightPos;
if (currPos == 1) {
targetSpot = middlePos;
}
if (currPos == 2) {
targetSpot = leftPos;
}
if (currPos == 3) {
targetSpot = middlePos;
}
if (currPos == 4) {
targetSpot = rightPos;
}
if ((currPos == 1) || (currPos == 2)) {
_xscale = origScale;
xSpd = -walkSpd;
} else {
_xscale = (-origScale);
xSpd = walkSpd;
}
if (((xSpd > 0) && (_x >= targetSpot)) || ((xSpd < 0) && (_x <= targetSpot))) {
xSpd = 0;
charging = false;
currPos++;
if (currPos == 5) {
currPos = 1;
}
}
}
}
function hitPat() {
damage = random(additionalDamage) + minimumDamage;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -1 : 1), damage, true);
}
function hitControl() {
if ((hitTime == 0) && (this.inside._currentframe != 7)) {
if ((_root.lvl.rb._currentframe > 1) && (this.hitTest(_root.lvl.rb.hitSpot))) {
this.health = this.health - (random(_root.lvl.rb.additionalDamage) + _root.lvl.rb.minimumDamage);
_root.playImpact();
_root.playDruidHit();
_root.createRumble(5, 3);
if (random(10) == 0) {
_root.playLepRandom();
}
hitTime++;
ySpd = -15;
inside.gotoAndStop(4);
}
} else {
hitTime++;
if ((hitTime % 10) == 0) {
_alpha = 100;
} else if ((hitTime % 5) == 0) {
_alpha = 60;
}
if (hitTime == 30) {
hitTime = 0;
}
}
}
function takeRockHit() {
if (this.inside._currentframe < 6) {
ySpd = -15;
inside.gotoAndStop(4);
this.health = this.health - ((random(_root.lvl.pat.additionalDamage) + _root.lvl.pat.minimumDamage) * (4 / _root.difficulty));
_root.playImpact();
_root.playDruidHit();
_root.createRumble(5, 3);
}
}
stop();
if (_parent != _root.lvl.enemies) {
this.swapDepths(9999);
this.removeMovieClip();
}
_root.lepNo++;
var healthBar = _root.lvl.healths.attachMovie("healthBar", "healthBar" + (_root.lepNo + 777), _root.lepNo + 777);
healthBar.target = this;
healthBar._width = healthBar._width * 0.5;
healthBar._height = healthBar._height * 0.5;
healthBar.nameTxt.text = "Druid";
var typ = 0;
var pickup = 3;
var maxHealth = 60;
var health = maxHealth;
var minimumDamage = 3;
var additionalDamage = 5;
var timeAtPos = 0;
var currPos = 1;
var rightPos = 3300;
var middlePos = 2880;
var leftPos = 2460;
var screenX;
var screenY;
var xSpd = 0;
var ySpd = 0;
var gravity = 2;
var origScale = _xscale;
var hitTime = 0;
var walkSpd = 30;
var hitDelay = 0;
var hitRange = (150 + random(150));
inside.gotoAndStop(7);
wasFrozen = false;
origDif = _root.difficulty;
setAttributes();
onEnterFrame = function () {
healthBar.alwaysShow = true;
if (_root.difficulty != origDif) {
setAttributes();
}
if (_x < leftPos) {
_x = leftPos;
}
if (_x > rightPos) {
_x = rightPos;
}
if (!_root.freeze) {
if (inside._currentframe == 7) {
if (inside.spawn._currentframe == 1) {
if ((_root.area == 4) && (Math.abs(this._x - _root.lvl.pat._x) < 100)) {
inside.spawn.play();
}
} else if (Math.abs(this._x - _root.lvl.pat._x) < 450) {
_root.lvl.xSpd = (-_root.lvl.runSpd) * 2;
}
} else {
if (wasFrozen) {
wasFrozen = false;
this.inside.anim.play();
}
xd = _x - _root.lvl.pat._x;
yd = (_y - (_height / 2)) - (_root.lvl.pat._y - (_root.lvl.pat._height / 2));
if (hitDelay > 0) {
hitDelay--;
}
_y = (_y + ySpd);
_x = (_x + xSpd);
screenX = _x + _root.lvl._x;
screenY = _y + _root.lvl._y;
onLeafAbove = (Math.abs(xd) < 300) && (yd < -100);
while ((_root.lvl.slope.hitTest(screenX, screenY - 5, true) && (ySpd >= 0)) && (!onLeafAbove)) {
_y = (_y-1);
screenY--;
}
if (_root.lvl.slope.hitTest(screenX, screenY, true) && (!onLeafAbove)) {
if (ySpd >= 0) {
if ((this.inside._currentframe == 4) || (this.inside._currentframe == 3)) {
inside.gotoAndStop(1);
}
ySpd = 0;
}
xSpd = xSpd * 0.7;
} else {
ySpd = ySpd + gravity;
}
if (health <= 0) {
if (this.inside._currentframe < 6) {
health = 0;
this._alpha = 100;
this.inside.gotoAndStop(6);
var _local3 = 0;
_local3 = 0;
while (_local3 < lepArr.length) {
if (lepArr[_local3] == this) {
break;
}
_local3++;
}
_root.lepArr.splice(_local3, 1);
this.healthBar.removeMovieClip();
}
} else {
chasePat();
hitControl();
}
if ((this.inside._currentframe == 1) && (xSpd != 0)) {
this.inside.gotoAndStop(2);
}
}
} else {
this.inside.anim.stop();
wasFrozen = true;
}
};
charging = false;
readyForSounds = false;
Symbol 1650 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1657 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1675 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if ((!_root.freeze) && (_root.lvl.pat.health > 0)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1681 MovieClip Frame 1
function hitPat() {
damage = (random(5) + 5) * _root.difficulty;
_root.lvl.hitPat(((_x > _root.lvl.pat._x) ? -5 : 5), damage, true);
}
gush = false;
hitDelay = 0;
onEnterFrame = function () {
if (!_root.freeze) {
if (_root.lvl.pat.health <= 0) {
gush = false;
}
if (hitDelay > 0) {
hitDelay--;
}
if (gush) {
nextFrame();
} else {
prevFrame();
}
if (this.hitSpot.hitTest(_root.lvl.pat.hitbox) && (hitDelay == 0)) {
hitDelay = 10;
hitPat();
}
}
};
Symbol 1681 MovieClip Frame 3
if (gush) {
_root.playWaterBlast();
_root.createRumble(10, 30);
}
Symbol 1681 MovieClip Frame 31
gush = false;
Symbol 1690 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1727 MovieClip Frame 1
onEnterFrame = function () {
if (_root.freeze) {
stop();
} else {
play();
}
};
Symbol 1733 MovieClip Frame 20
stop();
Symbol 1776 MovieClip Frame 20
stop();
Symbol 1777 MovieClip Frame 1
function setAttributes() {
minimumDamage = 60 - (_root.difficulty * 20);
additionalDamage = 40 - (_root.difficulty * 15);
origDif = _root.difficulty;
}
stop();
attacking = false;
randX = 0;
randY = 0;
time = 0;
wasFrozen = false;
if (variables == undefined) {
this.swapDepths(52);
variables = true;
minimumDamage = 60;
additionalDamage = 40;
}
var lastY = 450;
origDif = _root.difficulty;
setAttributes();
onEnterFrame = function () {
if (_root.difficulty != origDif) {
setAttributes();
}
if ((!_root.freeze) || (_root.lvl.pat.health <= 0)) {
if ((_currentframe > 13) && (_currentframe < 60)) {
} else {
_root.lvl.groundSpray._x = -500;
}
if (wasFrozen) {
wasFrozen = false;
if (_currentframe > 1) {
play();
}
}
time++;
if (((_root.lvl.pat.health > 0) || (attacking)) && (_currentframe < 100)) {
targetX = ((-_root.lvl._x) + 400) + randX;
targetY = ((-_root.lvl._y) + 250) + randX;
} else {
targetX = _root.lvl.pat._x + 250;
targetY = ((-_root.lvl._y) + 250) + randX;
}
if (_root.lvl.pat.health <= 0) {
seekSpd = 2;
} else if (attacking) {
seekSpd = 5;
} else {
seekSpd = 20;
}
this._x = this._x - ((this._x - targetX) / seekSpd);
this._y = this._y - ((this._y - targetY) / seekSpd);
xd = (e1._x + _x) - _parent.pat._x;
yd = (e1._y + _y) - _parent.pat._y;
angle = 180 + ((Math.atan2(yd, xd) * 180) / Math.PI);
e1._rotation = angle;
xd = (e2._x + _x) - _parent.pat._x;
yd = (e2._y + _y) - _parent.pat._y;
angle = 180 + ((Math.atan2(yd, xd) * 180) / Math.PI);
e2._rotation = angle;
if ((((((!_root.cinematic) && (Key.isDown(83))) && (_root.lvl.onGround)) && (_currentframe == 1)) && (_root.superCharge > 0)) && ((_root.lvl.pat._currentframe <= 4) || (_root.lvl.pat._currentframe == 8))) {
if (!attacking) {
attacking = true;
_root.lvl.pat.gotoAndStop(5);
_root.superCharge--;
}
}
if (attacking) {
randX = 0;
randY = 0;
if ((Math.abs(this._x - targetX) + Math.abs(this._y - targetY)) < 100) {
this.play();
}
} else {
if ((_root.lvl.pat.health <= 0) && (_currentframe < 100)) {
if ((Math.abs(this._x - targetX) + Math.abs(this._y - targetY)) < 20) {
if (_root.lives >= 0) {
this.gotoAndPlay(100);
} else {
this.gotoAndStop(171);
}
}
}
if ((time % 30) == 0) {
randX = random(20) - 10;
randY = random(20) - 10;
}
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1777 MovieClip Frame 4
_root.playSpecial();
Symbol 1777 MovieClip Frame 15
_root.lvl.pat.attack.play();
_root.createRumble(20, 50);
Symbol 1777 MovieClip Frame 99
gotoAndStop (1);
Symbol 1777 MovieClip Frame 100
_root.createRumble(5, 50);
Symbol 1777 MovieClip Frame 101
_root.playRevive();
Symbol 1777 MovieClip Frame 145
_root.lvl.pat.death.play();
Symbol 1777 MovieClip Frame 170
stop();
Symbol 1779 MovieClip Frame 1
function setAttributes() {
trace(_root.difficulty);
pat.maxHealth = 60 - (10 * _root.difficulty);
pat.health = pat.maxHealth;
pat.minimumDamage = 9 - (2 * _root.difficulty);
pat.additionalDamage = 16 - (5 * _root.difficulty);
origDif = _root.difficulty;
}
function getDoubleTaps() {
if ((pat._currentframe > 3) || ((lTapTime == 0) && (rTapTime == 0))) {
sprint = false;
}
if (Key.isDown(37)) {
if (lReleased) {
boostTime = 10;
if (boostSequence[0] == 0) {
boostSequence[0] = 2;
} else {
boostSequence[1] = 2;
}
if ((lTapTime > 0) && (xSpd <= 0)) {
sprint = true;
}
}
lTapTime = 6;
lReleased = false;
rTapTime = 0;
} else if (!lReleased) {
if (sprint && (rTapTime > 0)) {
sprint = false;
}
lReleased = true;
}
if (Key.isDown(39)) {
if (rReleased) {
boostTime = 10;
if (boostSequence[0] == 0) {
boostSequence[0] = 1;
} else {
boostSequence[1] = 1;
}
if ((rTapTime > 0) && (xSpd >= 0)) {
sprint = true;
}
}
rTapTime = 6;
rReleased = false;
lTapTime = 0;
} else if (!rReleased) {
if (sprint && (lTapTime > 0)) {
sprint = false;
}
rReleased = true;
}
if (Key.isDown(40)) {
if (dReleased) {
if (dTapTime > 0) {
origClovers = _root.cloversHitFeet;
cloverDrop = true;
trace("HERE");
}
dTapTime = 10;
}
dReleased = false;
} else {
dReleased = true;
}
}
function hitPat(dir, damage, overriding) {
if (pat._currentframe != 7) {
if (overriding || (pat._currentframe != 8)) {
pat.health = pat.health - damage;
pat.gotoAndStop(6);
hitTime = 30;
}
xSpd = dir * 10;
ySpd = -5;
_root.createRumble(10, 5);
_root.borderFlash.play();
_root.playImpact();
_root.playPatHit();
}
}
var xSpd = 0;
var ySpd = 0;
var jumpSpd = -35;
var runSpd = 8;
var groundTime = 0;
var maxX = 800;
var maxY = -1000;
var onGround = false;
var gravity = 3;
var origScale = pat._xscale;
var health = 100;
var spacing = 20;
topscenery = createEmptyMovieClip("topScenery100", 50);
var hitTime = 0;
var facing = 1;
var upReleased = false;
var aReleased = false;
var rReleased = false;
var lReleased = false;
var dReleased = false;
var sprint = false;
var rTapTime = 0;
var lTapTime = 0;
var dTapTime = 0;
var screenX = (pat._x + _x);
var screenY = (pat._y + _y);
wasFrozen = false;
origDif = _root.difficulty;
setAttributes();
boostTime = 0;
boostSequence = new Array();
boostSequence[0] = 0;
boostSequence[1] = 0;
cloverDrop = false;
origClovers = 0;
finished = false;
onEnterFrame = function () {
if ((boostTime > 0) && (pat._currentframe <= 4)) {
boostTime--;
} else {
boostTime = 0;
boostSequence[0] = 0;
boostSequence[1] = 0;
}
if (_root.difficulty != origDif) {
setAttributes();
}
if (maxX < _root["maxX" + _root.area]) {
maxX = maxX + runSpd;
}
if (rTapTime > 0) {
rTapTime--;
}
if (lTapTime > 0) {
lTapTime--;
}
if (dTapTime > 0) {
dTapTime--;
}
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
pat.attack.play();
pat.anim.play();
}
screenX = pat._x + _x;
screenY = pat._y + _y;
bg._x = (-_x) / 2;
bg._y = (-_y) / 2;
clouds._x = (-_x) / 2;
clouds._y = (-_y) / 2;
pat._y = pat._y + ySpd;
pat._x = pat._x + xSpd;
if (_currentframe != 6) {
xSpd = xSpd * 0.7;
}
finished = (_root.coins == _root.cNeeded4) && (pat._x > 3400);
if (finished) {
_root.cinematic = true;
}
cloverCondition = ((!cloverDrop) || (_root.cloversHitFeet != origClovers)) || (_root.cloversHitFeet == 0);
if (ySpd >= 0) {
while (cloverCondition && (slope.hitTest(screenX, (screenY - 1) + ySpd, true))) {
pat._y--;
screenY--;
}
}
if (_root.cloversHit == 0) {
while (slope.hitTest(screenX - 45, screenY - 50, true)) {
pat._x++;
screenX++;
}
while (slope.hitTest(screenX + 45, screenY - 50, true)) {
pat._x--;
screenX--;
}
}
if ((cloverCondition && (slope.hitTest(screenX, screenY + ySpd, true))) && (!slope.hitTest(screenX, (screenY + ySpd) - 5, true))) {
cloverDrop = false;
if (ySpd >= 0) {
onGround = true;
groundTime++;
if (pat._currentframe == 3) {
pat.jump.play();
}
ySpd = 0;
if ((Key.isDown(38) && (!finished)) && (!_root.cinematic)) {
if (upReleased && (pat._currentframe <= 4)) {
pat.gotoAndStop(3);
pat.jump.gotoAndPlay(1);
ySpd = ySpd + jumpSpd;
upReleased = false;
}
} else {
upReleased = true;
}
}
} else {
groundTime = 0;
onGround = false;
ySpd = ySpd + gravity;
}
if (!finished) {
if (Key.isDown(40) && ((pat._currentframe <= 4) || (pat._currentframe == 8))) {
pat.gotoAndStop(8);
}
var _local2 = false;
if ((!slope.hitTest(screenX + 50, screenY - 50, true)) || (_root.cloversHit > 0)) {
if (((Key.isDown(39) && (!Key.isDown(37))) && (pat._currentframe < 5)) && (!_root.cinematic)) {
if (screenX < 750) {
if (sprint) {
xSpd = runSpd * 2;
} else {
xSpd = runSpd;
}
pat._xscale = origScale;
facing = 1;
_local2 = true;
if (pat._currentframe < 3) {
pat.gotoAndStop(2);
}
}
}
}
if ((!slope.hitTest(screenX - 50, screenY - 50, true)) || (_root.cloversHit > 0)) {
if (((Key.isDown(37) && (!Key.isDown(39))) && (pat._currentframe < 5)) && (!_root.cinematic)) {
if (screenX > 50) {
if (sprint) {
xSpd = (-runSpd) * 2;
} else {
xSpd = -runSpd;
}
lTapTime = 10;
pat._xscale = -origScale;
facing = -1;
_local2 = true;
if (pat._currentframe < 3) {
pat.gotoAndStop(2);
}
}
}
}
if (Key.isDown(65) && (!_root.cinematic)) {
if (aReleased) {
if (pat._currentframe < 5) {
if ((boostSequence[0] != 0) && (boostSequence[0] == boostSequence[1])) {
pat.gotoAndStop(9);
} else {
pat.gotoAndStop(4);
}
}
if (pat.attacking) {
pat.contAttack = true;
}
}
aReleased = false;
} else {
aReleased = true;
}
if (!_local2) {
if (pat._currentframe < 3) {
pat.gotoAndStop(1);
}
}
}
if (pat._currentframe == 4) {
if (facing < 0) {
if (screenX > 50) {
pat._x--;
}
} else if (screenX < 750) {
pat._x++;
}
}
if (pat._currentframe == 9) {
if (facing < 0) {
if (screenX > 50) {
pat._x = pat._x - (runSpd * 3);
}
} else if (screenX < 750) {
pat._x = pat._x + (runSpd * 3);
}
}
if (pat.health <= 0) {
if (pat._currentframe != 7) {
_root.lives--;
pat.gotoAndStop(7);
pat.health = 0;
}
}
if (hitTime > 0) {
hitTime--;
if ((hitTime % 10) == 0) {
pat._alpha = 100;
} else if ((hitTime % 5) == 0) {
pat._alpha = 60;
}
}
if (_root.cinematic) {
if (_x > (-(maxX - 800))) {
_root.origX = _root.origX - 5;
}
} else {
prevX = _x;
prevOrigX = _root.origX;
_root.origX = _root.origX - ((screenX - 400) / 5);
_x = (_x - ((screenX - 400) / 5));
if (((_root.area == 4) && (prevX < _x)) && (_x > -2300)) {
_x = prevX;
_root.origX = prevOrigX;
}
if (!finished) {
if (pat._x < 50) {
pat._x = 50;
}
if (pat._x > (maxX - 50)) {
pat._x = maxX - 50;
}
}
if (_x < (-(maxX - 800))) {
_x = (-(maxX - 800));
}
if (_x > 0) {
_x = 0;
}
if (_root.origX < (-(maxX - 800))) {
_root.origX = -(maxX - 800);
}
if (_root.origX > 0) {
_root.origX = 0;
}
}
_root.origY = _root.origY - ((screenY - 250) / 5);
_y = (_y - ((screenY - 250) / 5));
if (_y < 0) {
_y = 0;
}
if (_root.origY < 0) {
_root.origY = 0;
}
} else {
pat.attack.stop();
pat.anim.stop();
wasFrozen = true;
}
getDoubleTaps();
};
Instance of Symbol 1062 MovieClip in Symbol 1779 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 140;
}
Instance of Symbol 1062 MovieClip in Symbol 1779 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 250;
}
Instance of Symbol 1062 MovieClip in Symbol 1779 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y + 50;
}
Instance of Symbol 1062 MovieClip in Symbol 1779 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 80;
}
Instance of Symbol 1062 MovieClip in Symbol 1779 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 240;
}
Symbol 1794 MovieClip Frame 1
_root.coinsToLeft = 0;
_alpha = 0;
onEnterFrame = function () {
if (_root.coinsToLeft > 0) {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
} else if (_alpha > 0) {
_alpha = (_alpha - 20);
}
};
Symbol 1795 MovieClip Frame 1
_root.coinsToRight = 0;
_alpha = 0;
onEnterFrame = function () {
if (_root.coinsToRight > 0) {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
} else if (_alpha > 0) {
_alpha = (_alpha - 20);
}
};
Symbol 1801 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (!_root.freeze) {
if (goBack) {
prevFrame();
} else {
nextFrame();
}
}
};
if (goBack == undefined) {
goBack = false;
gotoAndStop (35);
}
Symbol 1801 MovieClip Frame 35
stop();
Symbol 1802 MovieClip Frame 1
onEnterFrame = function () {
g1.goBack = (g2.goBack = (g3.goBack = false));
i = 1;
while (i <= _root.superCharge) {
this["g" + i].goBack = true;
i++;
}
};
Symbol 1823 MovieClip Frame 1
stop();
Symbol 1823 MovieClip Frame 26
stop();
Symbol 1824 MovieClip Frame 1
onEnterFrame = function () {
i = 4;
while (i > _root.lives) {
if (this["c" + i]._currentframe == 1) {
this["c" + i].play();
}
i--;
}
};
Symbol 1837 MovieClip Frame 1
_alpha = 0;
showTime = 0;
onEnterFrame = function () {
if ((showTime > 0) || (_root.area == 5)) {
inside.play();
showTime--;
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
} else {
inside.gotoAndStop(1);
if (_alpha > 0) {
_alpha = (_alpha - 10);
}
}
};
Symbol 1848 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (((!_root.freeze) && (_currentframe < 110)) && (!_root.mute)) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 1848 MovieClip Frame 110
stop();
Symbol 1855 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((!_root.freeze) && (_currentframe < 110)) {
if (wasFrozen) {
wasFrozen = false;
_visible = true;
play();
}
} else {
wasFrozen = true;
_visible = false;
stop();
}
};
Symbol 1855 MovieClip Frame 110
stop();
Symbol 1859 MovieClip Frame 1
gotoAndStop(_root.mute + 1);
Symbol 1860 MovieClip Frame 1
function selectFunc() {
_root.mute = !_root.mute;
}
_alpha = 40;
down = false;
selectNum = 5;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
this.inside.gotoAndStop(_root.mute + 1);
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 1864 MovieClip Frame 1
if (_root._quality == "LOW") {
gotoAndStop (3);
} else if (_root._quality == "MEDIUM") {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
Symbol 1865 MovieClip Frame 1
function selectFunc() {
if (_root._quality == "LOW") {
_root._quality = "HIGH";
} else if (_root._quality == "MEDIUM") {
_root._quality = "LOW";
} else {
_root._quality = "MEDIUM";
}
}
_alpha = 40;
down = false;
selectNum = 4;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (_root._quality == "LOW") {
this.inside.gotoAndStop(3);
} else if (_root._quality == "MEDIUM") {
this.inside.gotoAndStop(2);
} else {
this.inside.gotoAndStop(1);
}
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 1867 MovieClip Frame 1
function selectFunc() {
_root.loadSponsorsSite();
}
_alpha = 40;
down = false;
selectNum = 3;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 1869 MovieClip Frame 1
function selectFunc() {
_root.freeze = false;
_root.inMenu.gotoAndStop(1);
}
_alpha = 40;
down = false;
selectNum = 1;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 1871 MovieClip Frame 1
function selectFunc() {
_parent._parent.gotoAndStop(3);
}
_alpha = 40;
down = false;
selectNum = 2;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 1873 MovieClip Frame 1
function selectFunc() {
_root.gotoAndStop(2);
}
_alpha = 40;
down = false;
selectNum = 6;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(38) || (Key.isDown(40))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 1883 MovieClip Frame 1
if (!_root.awd_Juggling) {
_visible = false;
}
Symbol 1886 MovieClip Frame 1
if (!_root.awd_Master) {
_visible = false;
}
Symbol 1889 MovieClip Frame 1
if (!_root.awd_GoodShepherd) {
_visible = false;
}
Symbol 1892 MovieClip Frame 1
if (!_root.awd_LifeSaver) {
_visible = false;
}
Symbol 1895 MovieClip Frame 1
if (!_root.awd_SpecialDay) {
_visible = false;
}
Symbol 1902 MovieClip Frame 1
_alpha = 0;
select = 1;
dRelease = true;
uRelease = true;
prevSelect = 1;
keyRelease = false;
onEnterFrame = function () {
if (select < 1) {
select = 6;
}
if (select > 6) {
select = 1;
}
if (prevSelect != select) {
_root.playRollOver();
prevSelect = select;
}
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
if (Key.isDown(40)) {
if (dRelease) {
select++;
}
dRelease = false;
} else {
dRelease = true;
}
if (Key.isDown(38)) {
if (uRelease) {
select--;
}
uRelease = false;
} else {
uRelease = true;
}
if (Key.isDown(13) || (Key.isDown(65))) {
keyRelease = false;
} else {
keyRelease = true;
}
};
Symbol 1934 MovieClip Frame 1
t = 0;
onEnterFrame = function () {
t++;
if ((t % 40) == 0) {
this.play();
}
};
Symbol 1934 MovieClip Frame 12
stop();
Symbol 1943 MovieClip Frame 1
stop();
t = 0;
onEnterFrame = function () {
t++;
if ((t % 100) < 50) {
this.nextFrame();
} else {
this.prevFrame();
}
};
Symbol 1943 MovieClip Frame 7
stop();
Symbol 1944 MovieClip Frame 1
t = 0;
stop();
onEnterFrame = function () {
t++;
if ((t % 30) == 0) {
this.play();
}
};
Symbol 1944 MovieClip Frame 3
stop();
Symbol 1948 Button
on (rollOver) {
gotoAndStop (2);
}
on (press) {
_root.selectedDiff = true;
_root.freeze = false;
_root.setCoinsNeeded();
_root.inMenu.gotoAndStop(1);
}
Symbol 1949 Button
on (rollOver) {
gotoAndStop (1);
}
on (press) {
_root.selectedDiff = true;
_root.freeze = false;
_root.setCoinsNeeded();
_root.inMenu.gotoAndStop(1);
}
Symbol 1951 MovieClip Frame 1
stop();
keyReleased = false;
onEnterFrame = function () {
if (Key.isDown(39)) {
gotoAndStop (2);
}
if (Key.isDown(37)) {
gotoAndStop (1);
}
if (Key.isDown(13) || (Key.isDown(65))) {
if (keyReleased) {
_root.selectedDiff = true;
_root.freeze = false;
_root.setCoinsNeeded();
_root.inMenu.gotoAndStop(1);
}
} else {
keyReleased = true;
}
};
if (variables == undefined) {
gotoAndStop (2);
} else {
_root.difficulty = 1;
_root.playChicken();
}
Symbol 1951 MovieClip Frame 2
if (!_root.selectedDiff) {
_root.difficulty = 2;
}
if (variables != undefined) {
_root.playImpact();
}
variables = true;
Symbol 1954 MovieClip Frame 1
stop();
if (_root.selectedDiff) {
gotoAndStop (2);
}
Symbol 1954 MovieClip Frame 2
stop();
keyReleased = false;
down = true;
onMouseDown = function () {
if (!down) {
_root.inMenu.gotoAndStop(2);
}
down = true;
};
onMouseUp = function () {
down = false;
};
KeyListener = {};
KeyListener.onKeyDown = function () {
if (keyReleased) {
_root.inMenu.gotoAndStop(2);
Key.removeListener(this);
}
keyReleased = false;
};
KeyListener.onKeyUp = function () {
keyReleased = true;
};
Key.addListener(KeyListener);
Symbol 1963 MovieClip Frame 1
stop();
Symbol 1963 MovieClip Frame 2
if (_root.superCharge < 3) {
_root.superCharge++;
}
Symbol 1963 MovieClip Frame 20
stop();
Symbol 1964 MovieClip Frame 1
stop();
Symbol 1964 MovieClip Frame 20
stop();
Symbol 1967 MovieClip Frame 1
stop();
Symbol 1967 MovieClip Frame 2
if (_root.lives < 4) {
_root.lives++;
}
Symbol 1967 MovieClip Frame 20
stop();
Symbol 1990 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_parent.counter + 1);
};
Symbol 1999 MovieClip Frame 1
stop();
if (!_root.mute) {
if (_root.soupCollected <= 5) {
gotoAndStop (2);
} else if (_root.soupCollected <= 9) {
gotoAndStop (3);
} else if (_root.soupCollected <= 15) {
gotoAndStop (4);
} else if (_root.soupCollected <= 19) {
gotoAndStop (5);
} else {
gotoAndStop (6);
}
}
Symbol 2000 MovieClip Frame 1
stop();
Symbol 2000 MovieClip Frame 2
stop();
keyReleased = true;
KeyListener = {};
KeyListener.onKeyDown = function () {
if (keyReleased) {
stopAllSounds();
_root.gotoAndStop(5);
Key.removeListener(this);
}
keyReleased = false;
};
KeyListener.onKeyUp = function () {
keyReleased = true;
};
Key.addListener(KeyListener);
Symbol 2008 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 2008 MovieClip Frame 350
stop();
Symbol 2009 MovieClip Frame 31
stop();
stop();
keyReleased = true;
KeyListener = {};
KeyListener.onKeyDown = function () {
if (keyReleased) {
_root.freeze = false;
_root.inMenu.gotoAndStop(1);
Key.removeListener(this);
}
keyReleased = false;
};
KeyListener.onKeyUp = function () {
keyReleased = true;
};
Key.addListener(KeyListener);
Symbol 2010 MovieClip Frame 1
stop();
if (tintAmount == undefined) {
_root.freeze = true;
gotoAndStop (3);
tintAmount = 100;
}
time = 0;
onEnterFrame = function () {
_root.lvlColor.setTint(0, 0, 0, tintAmount);
tintCondition = (this._currentframe > 1) || (_root.lvl.finished);
if (tintCondition) {
if (tintAmount < 100) {
tintAmount = tintAmount + 10;
} else if (_root.lvl.finished) {
if (_root._currentframe == 3) {
_root.gotoBonus();
} else {
_root.gotoAndStop(8);
}
}
} else if (tintAmount > 0) {
tintAmount = tintAmount - 10;
}
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
if (_currentframe == 4) {
time++;
if (((time > 20) && ((time % 8) == 0)) && (counter < _root.soupCollected)) {
_root.playDing();
counter++;
}
if (counter == _root.soupCollected) {
cont.gotoAndStop(2);
}
}
};
Symbol 2010 MovieClip Frame 4
_alpha = 0;
time = 0;
counter = 0;
Instance of Symbol 1963 MovieClip in Symbol 2010 MovieClip Frame 4
onClipEvent (load) {
_alpha = 0;
neededNum = 10;
}
onClipEvent (enterFrame) {
if ((_parent.counter >= neededNum) && (_alpha < 100)) {
play();
_alpha = (_alpha + 10);
}
}
Instance of Symbol 1964 MovieClip in Symbol 2010 MovieClip Frame 4
onClipEvent (load) {
_alpha = 0;
neededNum = 5;
}
onClipEvent (enterFrame) {
if ((_parent.counter >= neededNum) && (_alpha < 100)) {
play();
_alpha = (_alpha + 10);
}
}
Instance of Symbol 1963 MovieClip in Symbol 2010 MovieClip Frame 4
onClipEvent (load) {
_alpha = 0;
neededNum = 13;
}
onClipEvent (enterFrame) {
if ((_parent.counter >= neededNum) && (_alpha < 100)) {
play();
_alpha = (_alpha + 10);
}
}
Instance of Symbol 1963 MovieClip in Symbol 2010 MovieClip Frame 4
onClipEvent (load) {
_alpha = 0;
neededNum = 16;
}
onClipEvent (enterFrame) {
if ((_parent.counter >= neededNum) && (_alpha < 100)) {
play();
_alpha = (_alpha + 10);
}
}
Instance of Symbol 1967 MovieClip in Symbol 2010 MovieClip Frame 4
onClipEvent (load) {
_alpha = 0;
neededNum = 18;
}
onClipEvent (enterFrame) {
if ((_parent.counter >= neededNum) && (_alpha < 100)) {
play();
_alpha = (_alpha + 10);
}
}
Instance of Symbol 1967 MovieClip in Symbol 2010 MovieClip Frame 4
onClipEvent (load) {
_alpha = 0;
neededNum = 20;
}
onClipEvent (enterFrame) {
if ((_parent.counter >= neededNum) && (_alpha < 100)) {
play();
_alpha = (_alpha + 10);
}
}
Symbol 2012 MovieClip Frame 1
this._visible = false;
Symbol 2017 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 2018 MovieClip Frame 1
function setAttributes() {
trace(_root.difficulty);
pat.maxHealth = 60 - (10 * _root.difficulty);
pat.health = pat.maxHealth;
pat.minimumDamage = 9 - (2 * _root.difficulty);
pat.additionalDamage = 16 - (5 * _root.difficulty);
origDif = _root.difficulty;
}
function getDoubleTaps() {
if ((pat._currentframe > 3) || ((lTapTime == 0) && (rTapTime == 0))) {
sprint = false;
}
if (Key.isDown(37)) {
if (lReleased) {
boostTime = 10;
if (boostSequence[0] == 0) {
boostSequence[0] = 2;
} else {
boostSequence[1] = 2;
}
if ((lTapTime > 0) && (xSpd <= 0)) {
sprint = true;
}
}
lTapTime = 6;
lReleased = false;
rTapTime = 0;
} else if (!lReleased) {
if (sprint && (rTapTime > 0)) {
sprint = false;
}
lReleased = true;
}
if (Key.isDown(39)) {
if (rReleased) {
boostTime = 10;
if (boostSequence[0] == 0) {
boostSequence[0] = 1;
} else {
boostSequence[1] = 1;
}
if ((rTapTime > 0) && (xSpd >= 0)) {
sprint = true;
}
}
rTapTime = 6;
rReleased = false;
lTapTime = 0;
} else if (!rReleased) {
if (sprint && (lTapTime > 0)) {
sprint = false;
}
rReleased = true;
}
if (Key.isDown(40)) {
if (dReleased) {
if (dTapTime > 0) {
origClovers = _root.cloversHitFeet;
cloverDrop = true;
trace("HERE");
}
dTapTime = 10;
}
dReleased = false;
} else {
dReleased = true;
}
}
function hitPat(dir, damage, overriding) {
if (pat._currentframe != 7) {
if (overriding || (pat._currentframe != 8)) {
pat.health = pat.health - damage;
pat.gotoAndStop(6);
hitTime = 30;
}
xSpd = dir * 10;
ySpd = -5;
_root.createRumble(10, 5);
_root.borderFlash.play();
_root.playImpact();
_root.playPatHit();
}
}
var xSpd = 0;
var ySpd = 0;
var jumpSpd = -35;
var runSpd = 8;
var groundTime = 0;
var maxX = 800;
var maxY = -1000;
var onGround = false;
var gravity = 3;
var origScale = pat._xscale;
var health = 100;
var spacing = 20;
topscenery = createEmptyMovieClip("topScenery100", 50);
var hitTime = 0;
var facing = 1;
var upReleased = false;
var aReleased = false;
var rReleased = false;
var lReleased = false;
var dReleased = false;
var sprint = false;
var rTapTime = 0;
var lTapTime = 0;
var dTapTime = 0;
var screenX = (pat._x + _x);
var screenY = (pat._y + _y);
wasFrozen = false;
origDif = _root.difficulty;
setAttributes();
boostTime = 0;
boostSequence = new Array();
boostSequence[0] = 0;
boostSequence[1] = 0;
cloverDrop = false;
origClovers = 0;
onEnterFrame = function () {
if ((boostTime > 0) && (pat._currentframe <= 4)) {
boostTime--;
} else {
boostTime = 0;
boostSequence[0] = 0;
boostSequence[1] = 0;
}
if (_root.difficulty != origDif) {
setAttributes();
}
if (maxX < _root["maxX" + _root.area]) {
maxX = _root["maxX" + _root.area];
}
if (rTapTime > 0) {
rTapTime--;
}
if (lTapTime > 0) {
lTapTime--;
}
if (dTapTime > 0) {
dTapTime--;
}
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
pat.attack.play();
pat.anim.play();
}
screenX = pat._x + _x;
screenY = pat._y + _y;
bg._x = (-_x) / 2;
bg._y = (-_y) / 2;
clouds._x = (-_x) / 2;
clouds._y = (-_y) / 2;
pat._y = pat._y + ySpd;
pat._x = pat._x + xSpd;
if (_currentframe != 6) {
xSpd = xSpd * 0.7;
}
cloverCondition = ((!cloverDrop) || (_root.cloversHitFeet != origClovers)) || (_root.cloversHitFeet == 0);
if (ySpd >= 0) {
while (cloverCondition && (slope.hitTest(screenX, (screenY - 1) + ySpd, true))) {
pat._y--;
screenY--;
}
}
if (_root.cloversHit == 0) {
while (slope.hitTest(screenX - 45, screenY - 50, true)) {
pat._x++;
screenX++;
}
while (slope.hitTest(screenX + 45, screenY - 50, true)) {
pat._x--;
screenX--;
}
}
if (Key.isDown(40) && (pat._currentframe <= 4)) {
pat.gotoAndStop(8);
}
if ((cloverCondition && (slope.hitTest(screenX, screenY + ySpd, true))) && (!slope.hitTest(screenX, (screenY + ySpd) - 5, true))) {
cloverDrop = false;
if (ySpd >= 0) {
onGround = true;
groundTime++;
if (pat._currentframe == 3) {
pat.jump.play();
}
ySpd = 0;
if (Key.isDown(38)) {
if (upReleased && (pat._currentframe <= 4)) {
pat.gotoAndStop(3);
pat.jump.gotoAndPlay(1);
ySpd = ySpd + jumpSpd;
upReleased = false;
}
} else {
upReleased = true;
}
}
} else {
groundTime = 0;
onGround = false;
ySpd = ySpd + gravity;
}
var _local2 = false;
if ((!slope.hitTest(screenX + 50, screenY - 50, true)) || (_root.cloversHit > 0)) {
if (((Key.isDown(39) && (!Key.isDown(37))) && (pat._currentframe < 5)) && (!_root.cinematic)) {
if (screenX < 750) {
if (sprint) {
xSpd = runSpd * 2;
} else {
xSpd = runSpd;
}
pat._xscale = origScale;
facing = 1;
_local2 = true;
if (pat._currentframe < 3) {
pat.gotoAndStop(2);
}
}
}
}
if ((!slope.hitTest(screenX - 50, screenY - 50, true)) || (_root.cloversHit > 0)) {
if (((Key.isDown(37) && (!Key.isDown(39))) && (pat._currentframe < 5)) && (!_root.cinematic)) {
if (screenX > 50) {
if (sprint) {
xSpd = (-runSpd) * 2;
} else {
xSpd = -runSpd;
}
lTapTime = 10;
pat._xscale = -origScale;
facing = -1;
_local2 = true;
if (pat._currentframe < 3) {
pat.gotoAndStop(2);
}
}
}
}
if (pat._currentframe == 4) {
if (facing < 0) {
if (screenX > 50) {
pat._x--;
}
} else if (screenX < 750) {
pat._x++;
}
}
if (pat._currentframe == 9) {
if (facing < 0) {
if (screenX > 50) {
pat._x = pat._x - (runSpd * 3);
}
} else if (screenX < 750) {
pat._x = pat._x + (runSpd * 3);
}
}
if (pat.health <= 0) {
if (pat._currentframe != 7) {
_root.lives--;
pat.gotoAndStop(7);
pat.health = 0;
}
}
if (Key.isDown(65) && (!_root.cinematic)) {
if (aReleased) {
if (pat._currentframe < 5) {
if ((boostSequence[0] != 0) && (boostSequence[0] == boostSequence[1])) {
pat.gotoAndStop(9);
} else {
pat.gotoAndStop(4);
}
}
if (pat.attacking) {
pat.contAttack = true;
}
}
aReleased = false;
} else {
aReleased = true;
}
if (!_local2) {
if (pat._currentframe < 3) {
pat.gotoAndStop(1);
}
}
if (hitTime > 0) {
hitTime--;
if ((hitTime % 10) == 0) {
pat._alpha = 100;
} else if ((hitTime % 5) == 0) {
pat._alpha = 60;
}
}
if (_root.cinematic) {
if (_x > (-(maxX - 800))) {
_root.origX = _root.origX - 5;
}
} else {
prevX = _x;
prevOrigX = _root.origX;
_root.origX = _root.origX - ((screenX - 400) / 5);
_x = (_x - ((screenX - 400) / 5));
if (pat._x < 50) {
pat._x = 50;
}
if (pat._x > (maxX - 50)) {
pat._x = maxX - 50;
}
if (_x < (-(maxX - 800))) {
_x = (-(maxX - 800));
}
if (_x > 0) {
_x = 0;
}
if (_root.origX < (-(maxX - 800))) {
_root.origX = -(maxX - 800);
}
if (_root.origX > 0) {
_root.origX = 0;
}
}
_root.origY = _root.origY - ((screenY - 250) / 5);
_y = (_y - ((screenY - 250) / 5));
if (_y < 0) {
_y = 0;
}
if (_root.origY < 0) {
_root.origY = 0;
}
} else {
pat.attack.stop();
pat.anim.stop();
wasFrozen = true;
}
getDoubleTaps();
};
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 500;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 620;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 620;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 620;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 620;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 500;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 500;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 425;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 400;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 300;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 150;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 250;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 250;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 350;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y + 50;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y + 50;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 80;
}
Instance of Symbol 1062 MovieClip in Symbol 2018 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y + 50;
}
Symbol 2055 MovieClip Frame 1
stop();
onEnterFrame = function () {
this.gotoAndStop(Math.floor((_root.bTime._currentframe / 900) * 30) + 1);
};
Symbol 2077 MovieClip Frame 1
stop();
onEnterFrame = function () {
this.gotoAndStop(_root.soupCollected + 1);
};
Symbol 2079 MovieClip Frame 1
wasFrozen = false;
onEnterFrame = function () {
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
play();
}
} else {
wasFrozen = true;
stop();
}
};
Symbol 2079 MovieClip Frame 935
_root.inMenu.gotoAndStop(4);
_root.freeze = true;
stop();
Symbol 2084 MovieClip Frame 1
this._visible = false;
Symbol 2091 MovieClip Frame 1
function setAttributes() {
trace(_root.difficulty);
pat.maxHealth = 60 - (10 * _root.difficulty);
pat.health = pat.maxHealth;
pat.minimumDamage = 9 - (2 * _root.difficulty);
pat.additionalDamage = 16 - (5 * _root.difficulty);
origDif = _root.difficulty;
}
function getDoubleTaps() {
if ((pat._currentframe > 3) || ((lTapTime == 0) && (rTapTime == 0))) {
sprint = false;
}
if (Key.isDown(37)) {
if (lReleased) {
boostTime = 10;
if (boostSequence[0] == 0) {
boostSequence[0] = 2;
} else {
boostSequence[1] = 2;
}
if ((lTapTime > 0) && (xSpd <= 0)) {
sprint = true;
}
}
lTapTime = 6;
lReleased = false;
rTapTime = 0;
} else if (!lReleased) {
if (sprint && (rTapTime > 0)) {
sprint = false;
}
lReleased = true;
}
if (Key.isDown(39)) {
if (rReleased) {
boostTime = 10;
if (boostSequence[0] == 0) {
boostSequence[0] = 1;
} else {
boostSequence[1] = 1;
}
if ((rTapTime > 0) && (xSpd >= 0)) {
sprint = true;
}
}
rTapTime = 6;
rReleased = false;
lTapTime = 0;
} else if (!rReleased) {
if (sprint && (lTapTime > 0)) {
sprint = false;
}
rReleased = true;
}
if (Key.isDown(40)) {
if (dReleased) {
if (dTapTime > 0) {
if (!slope.hitTest(screenX, screenY + 75, true)) {
dropPos = pat._y + 75;
}
}
dTapTime = 10;
}
dReleased = false;
} else {
dReleased = true;
}
}
function hitPat(dir, damage, overriding, disabling) {
if (pat._currentframe != 7) {
ySpd = -5;
if (overriding || (pat._currentframe != 8)) {
pat.health = pat.health - damage;
if (disabling) {
pat.gotoAndStop(11);
if (dir > 0) {
pat._xscale = -origScale;
} else {
pat._xscale = origScale;
}
} else {
pat.gotoAndStop(6);
}
hitTime = 30;
}
xSpd = dir * 10;
_root.createRumble(10, 5);
_root.borderFlash.play();
_root.playImpact();
_root.playPatHit();
}
}
stop();
var xSpd = 0;
var ySpd = 0;
var jumpSpd = -35;
var runSpd = 8;
var groundTime = 0;
var maxX = 800;
var maxY = -1000;
var onGround = false;
var gravity = 3;
var origScale = pat._xscale;
var health = 100;
var spacing = 20;
topscenery = createEmptyMovieClip("topScenery100", 50);
var hitTime = 0;
var facing = 1;
var upReleased = false;
var aReleased = false;
var rReleased = false;
var lReleased = false;
var dReleased = false;
var sprint = false;
var rTapTime = 0;
var lTapTime = 0;
var dTapTime = 0;
var screenX = (pat._x + _x);
var screenY = (pat._y + _y);
wasFrozen = false;
origDif = _root.difficulty;
setAttributes();
boostTime = 0;
boostSequence = new Array();
boostSequence[0] = 0;
boostSequence[1] = 0;
dropPos = 800;
origClovers = 0;
finished = false;
onEnterFrame = function () {
if ((boostTime > 0) && (pat._currentframe <= 4)) {
boostTime--;
} else {
boostTime = 0;
boostSequence[0] = 0;
boostSequence[1] = 0;
}
if (_root.difficulty != origDif) {
setAttributes();
}
if (maxX < _root["maxX" + _root.area]) {
maxX = maxX + runSpd;
}
if (rTapTime > 0) {
rTapTime--;
}
if (lTapTime > 0) {
lTapTime--;
}
if (dTapTime > 0) {
dTapTime--;
}
if (!_root.freeze) {
if (wasFrozen) {
wasFrozen = false;
pat.attack.play();
pat.anim.play();
}
screenX = pat._x + _x;
screenY = pat._y + _y;
bg._x = (-_x) / 2;
bg._y = (-_y) / 2;
clouds._x = (-_x) / 2;
clouds._y = (-_y) / 2;
pat._y = pat._y + (ySpd / (((pat._currentframe == 11) * 3) + 1));
pat._x = pat._x + xSpd;
if (pat._currentframe == 11) {
if (pat._xscale == origScale) {
xSpd = 30;
} else {
xSpd = -30;
}
} else {
xSpd = xSpd * 0.7;
}
finished = (_root.coins == _root.cNeeded4) && (pat._x > 3400);
if (finished) {
_root.cinematic = true;
}
if (dropPos < pat._y) {
dropPos = 800;
}
if (ySpd >= 0) {
while ((dropPos >= 800) && (slope.hitTest(screenX, (screenY - 1) + ySpd, true))) {
pat._y--;
screenY--;
}
}
if (((dropPos >= 800) && (slope.hitTest(screenX, screenY + ySpd, true))) && (!slope.hitTest(screenX, (screenY + ySpd) - 5, true))) {
if (ySpd >= 0) {
onGround = true;
groundTime++;
if (pat._currentframe == 11) {
_root.lvl.enemies.biglep.hitPat();
}
if (pat._currentframe == 3) {
pat.jump.play();
}
ySpd = 0;
if ((Key.isDown(38) && (!finished)) && (!_root.cinematic)) {
if (upReleased && (pat._currentframe <= 4)) {
pat.gotoAndStop(3);
pat.jump.gotoAndPlay(1);
ySpd = ySpd + jumpSpd;
upReleased = false;
}
} else {
upReleased = true;
}
}
} else {
groundTime = 0;
onGround = false;
ySpd = ySpd + gravity;
}
if (!finished) {
if (Key.isDown(40) && (pat._currentframe <= 4)) {
pat.gotoAndStop(8);
}
var _local2 = false;
if (((Key.isDown(39) && (!Key.isDown(37))) && (pat._currentframe < 5)) && (!_root.cinematic)) {
if (screenX < 750) {
if (sprint) {
xSpd = runSpd * 2;
} else {
xSpd = runSpd;
}
pat._xscale = origScale;
facing = 1;
_local2 = true;
if (pat._currentframe < 3) {
pat.gotoAndStop(2);
}
}
}
if (((Key.isDown(37) && (!Key.isDown(39))) && (pat._currentframe < 5)) && (!_root.cinematic)) {
if (screenX > 50) {
if (sprint) {
xSpd = (-runSpd) * 2;
} else {
xSpd = -runSpd;
}
lTapTime = 10;
pat._xscale = -origScale;
facing = -1;
_local2 = true;
if (pat._currentframe < 3) {
pat.gotoAndStop(2);
}
}
}
if (Key.isDown(65) && (!_root.cinematic)) {
if (aReleased) {
if (pat._currentframe < 5) {
if ((boostSequence[0] != 0) && (boostSequence[0] == boostSequence[1])) {
pat.gotoAndStop(9);
} else {
pat.gotoAndStop(4);
}
}
if (pat.attacking) {
pat.contAttack = true;
}
}
aReleased = false;
} else {
aReleased = true;
}
if (!_local2) {
if (pat._currentframe < 3) {
pat.gotoAndStop(1);
}
}
}
if (pat._currentframe == 4) {
if (facing < 0) {
if (screenX > 50) {
pat._x--;
}
} else if (screenX < 750) {
pat._x++;
}
}
if (pat._currentframe == 9) {
if (facing < 0) {
if (screenX > 50) {
pat._x = pat._x - (runSpd * 3);
}
} else if (screenX < 750) {
pat._x = pat._x + (runSpd * 3);
}
}
if (pat.health <= 0) {
if (pat._currentframe != 7) {
_root.lives--;
pat.gotoAndStop(7);
pat.health = 0;
}
}
if (hitTime > 0) {
hitTime--;
if ((hitTime % 10) == 0) {
pat._alpha = 100;
} else if ((hitTime % 5) == 0) {
pat._alpha = 60;
}
}
if (_root.cinematic) {
} else {
prevX = _x;
prevOrigX = _root.origX;
_root.origX = _root.origX - ((screenX - 400) / 5);
_x = (_x - ((screenX - 400) / 5));
if (((_root.area == 3) && (prevX < _x)) && (_x > -2100)) {
_x = prevX;
_root.origX = prevOrigX;
}
if (!finished) {
if (pat._x < 50) {
pat._x = 50;
}
if (pat._x > (maxX - 50)) {
pat._x = maxX - 50;
}
}
if (_x < (-(maxX - 800))) {
_x = (-(maxX - 800));
}
if (_x > 0) {
_x = 0;
}
if (_root.origX < (-(maxX - 800))) {
_root.origX = -(maxX - 800);
}
if (_root.origX > 0) {
_root.origX = 0;
}
}
_root.origY = _root.origY - ((screenY - 250) / 5);
_y = (_y - ((screenY - 250) / 5));
if (_y < 0) {
_y = 0;
}
if (_root.origY < 0) {
_root.origY = 0;
}
} else {
pat.attack.stop();
pat.anim.stop();
wasFrozen = true;
}
getDoubleTaps();
};
Instance of Symbol 1062 MovieClip in Symbol 2091 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y - 150;
}
Instance of Symbol 1062 MovieClip in Symbol 2091 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y + 50;
}
Instance of Symbol 1062 MovieClip in Symbol 2091 MovieClip Frame 1
onClipEvent (load) {
leaves._y = leaves._y + 50;
}
Symbol 2102 MovieClip Frame 1
stop();
wasFrozen = true;
onEnterFrame = function () {
if (((!_root.freeze) && (_currentframe < 100)) && (!_root.mute)) {
if (wasFrozen) {
wasFrozen = false;
_visible = true;
play();
}
} else {
wasFrozen = true;
_visible = false;
stop();
}
};
Symbol 2102 MovieClip Frame 100
stop();
Symbol 2111 MovieClip Frame 1
function selectFunc() {
stopAllSounds();
_root.gotoAndStop(2);
}
_alpha = 40;
down = false;
selectNum = 1;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(37) || (Key.isDown(39))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 2113 MovieClip Frame 1
function selectFunc() {
_root.loadSponsorsSite();
}
_alpha = 40;
down = false;
selectNum = 2;
down = false;
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!down)) {
selectFunc();
}
down = true;
moving = true;
};
onMouseUp = function () {
down = false;
};
onMouseMove = function () {
moving = true;
};
onEnterFrame = function () {
if (Key.isDown(37) || (Key.isDown(39))) {
moving = false;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (moving)) {
_parent.select = selectNum;
}
if (_parent.select == selectNum) {
if (_alpha < 100) {
_alpha = (_alpha + 20);
}
if ((Key.isDown(13) || (Key.isDown(65))) && (_parent.keyRelease)) {
selectFunc();
}
} else {
down = false;
if (_alpha > 40) {
_alpha = (_alpha - 20);
}
}
};
Symbol 2114 MovieClip Frame 1
_alpha = 0;
select = 1;
dRelease = true;
uRelease = true;
prevSelect = 1;
keyRelease = false;
onEnterFrame = function () {
if (select < 1) {
select = 2;
}
if (select > 2) {
select = 1;
}
if (prevSelect != select) {
_root.playRollOver();
prevSelect = select;
}
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
if (Key.isDown(39)) {
if (dRelease) {
select++;
}
dRelease = false;
} else {
dRelease = true;
}
if (Key.isDown(37)) {
if (uRelease) {
select--;
}
uRelease = false;
} else {
uRelease = true;
}
if (Key.isDown(13) || (Key.isDown(65))) {
keyRelease = false;
} else {
keyRelease = true;
}
};
Symbol 2115 MovieClip Frame 1
stop();
Symbol 2117 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 2125 Button
on (press) {
_root.gotoAndStop(3);
}
on (keyPress "a") {
_root.gotoAndStop(3);
}
on (keyPress "<Enter>") {
_root.gotoAndStop(3);
}
Symbol 2161 MovieClip Frame 83
stop();
Symbol 2192 MovieClip Frame 26
gotoAndPlay (8);
Symbol 2216 MovieClip Frame 66
stop();
Symbol 2227 MovieClip Frame 73
stop();
Symbol 2252 MovieClip Frame 1057
_root.gotoAndStop(3);
Symbol 2254 MovieClip Frame 1
if (_root.mute) {
stop();
}
Symbol 2296 MovieClip Frame 26
gotoAndPlay (8);
Symbol 2327 MovieClip Frame 580
_root.gotoAndStop(2);
Symbol 2334 MovieClip Frame 316
_parent._parent.nextFrame();
Symbol 2338 Button
on (press) {
_root.loadPhantasmagor();
}
Symbol 2426 MovieClip Frame 159
stop();
_parent.nextFrame();
Symbol 2427 Button
on (press) {
_root.loadBgroup();
}
Symbol 2432 MovieClip Frame 20
stop();
Symbol 2433 MovieClip Frame 25
stop();
Symbol 2461 MovieClip Frame 1
_root.stop();
Symbol 2461 MovieClip Frame 267
_root.gotoAndStop(2);
Symbol 2462 Button
on (press) {
_root.loadSponsorsSite();
}
Symbol 2463 MovieClip Frame 1
stop();
Symbol 2463 MovieClip Frame 2
stop();
Symbol 2463 MovieClip Frame 3
stop();