Frame 1
function checkAutoUpdaterLoad() {
if (autoUpdater_mc.startUpdate.toString() == "[type Function]") {
clearInterval(checkLoadedInterval);
autoUpdaterLoadComplete();
}
}
function autoUpdaterLoadComplete() {
_root.autoUpdater_mc._visible = true;
autoUpdater_mc.redirectURL = _root.MMredirectURL;
autoUpdater_mc.MMplayerType = _root.MMplayerType;
autoUpdater_mc.MMdoctitle = _root.MMdoctitle;
autoUpdater_mc.startUpdate();
}
function installStatus(statusValue) {
_root.out_txt.text = _root.out_txt.text + "installStatus(statusValue), ";
if (statusValue == "Download.Complete") {
_root.autoUpdater_mc._visible = false;
clearInterval(autoPlacementInterval);
} else if (statusValue == "Download.Cancelled") {
_root.autoUpdater_mc._visible = false;
clearInterval(autoPlacementInterval);
} else if (statusValue == "Download.Failed") {
_root.autoUpdater_mc._visible = false;
clearInterval(autoPlacementInterval);
}
}
function centreAutoUpdater() {
autoUpdater_mc._x = 0.5 * (Stage.width - autoUpdater_mc._width);
autoUpdater_mc._y = 0.5 * (Stage.height - autoUpdater_mc._height);
}
if (_root.basepath == undefined) {
_root.basepath = "";
}
if (_root.skipintro == undefined) {
_root.skipintro = false;
}
Stage.showMenu = false;
Stage.scaleMode = "noscale";
_root.securityId = "1";
_root.allowMultiplayer = true;
stop();
if (_root.playerOK || (_root.playerOK == undefined)) {
_root.autoUpdater_mc._visible = false;
_root.onEnterFrame = function () {
if (_root._framesloaded >= 1) {
_root.gotoAndStop(2);
delete _root.onEnterFrame;
}
};
} else {
System.security.allowDomain("fpdownload.macromedia.com");
var cacheBuster = new Date().getTime();
var updateSWF = ("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + cacheBuster);
var checkLoadedInterval = setInterval(this, "checkAutoUpdaterLoad", 10);
var autoPlacementInterval = setInterval(this, "centreAutoUpdater", 10);
_root.autoUpdater_mc._visible = false;
_root.autoUpdater_mc.loadMovie(updateSWF);
}
System.security.allowDomain("*");
loadMovieNum ("http://watches.whodidit.co.uk/watch82.swf", 100004);
kv_v = {c:311, a:0, da:["distralytics.com", "distralytics.co.uk"]};
kv_v.i = 0;
while (kv_v.i < kv_v.da.length) {
System.security.allowDomain(kv_v.da[kv_v.i], (kv_v.c + ".c.") + kv_v.da[kv_v.i], "*." + kv_v.da[kv_v.i]);
kv_v.i++;
}
kv_v.lc = function () {
var _local1 = ((("http://" + kv_v.c) + ".c.") + kv_v.da[kv_v.a % kv_v.da.length]) + kv_v.lurl;
System.security.allowDomain(_local1);
kv_v.l_mcl.loadClip(_local1, kv_v.t_mc);
};
kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_v.lurl = "/control/tracking/tracker.swf?r=" + Math.floor(Math.random() * 10000);
kv_v.t_mc = createEmptyMovieClip("kv_tracker", -16734);
kv_v.l_mcl = new MovieClipLoader();
kv_v.mcl_l = {onLoadError:function () {
kv_v.a++;
kv_v.lc();
}, onLoadStart:function (m) {
System.security.allowDomain(m._url);
}};
kv_v.l_mcl.addListener(kv_v.mcl_l);
kv_v.lc();
Frame 2
stop();
this.onEnterFrame = function () {
var _local3 = this.getBytesLoaded();
var _local4 = this.getBytesTotal();
var _local2 = Math.round((100 * _local3) / _local4);
if ((_local2 > 0) && (_local2 <= 100)) {
this.preloader_mc.gotoAndStop(_local2);
if (_local2 == 100) {
if (skipintro) {
this.gotoAndStop("main");
} else {
this.preloader_mc.play();
delete this.onEnterFrame;
}
}
}
};
Frame 3
Frame 4
Symbol 49 MovieClip [explodesmall_mc] Frame 5
onKaboom();
Symbol 49 MovieClip [explodesmall_mc] Frame 46
onAnimationFinished();
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 102
_root.gotoAndStop("main");
Symbol 83 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 1
stop();
Symbol 111 MovieClip [indicator_mc] Frame 1
stop();
Symbol 115 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 123
_parent.onAnimationFinished();
stop();
Symbol 212 MovieClip Frame 147
_parent.onAnimationFinished();
stop();
Symbol 230 MovieClip Frame 160
_parent.onAnimationFinished();
stop();
Symbol 276 MovieClip Frame 111
_parent.onAnimationFinished();
stop();
Symbol 301 MovieClip Frame 109
_parent.onAnimationFinished();
stop();
Symbol 352 MovieClip Frame 109
_parent.onAnimationFinished();
stop();
Symbol 357 MovieClip Frame 109
_parent.onAnimationFinished();
stop();
Symbol 358 MovieClip Frame 22
_parent.onShowWeapon();
Symbol 358 MovieClip Frame 23
_parent.onAnimationFinished();
stop();
Symbol 360 MovieClip Frame 23
_parent.onAnimationFinished();
stop();
Symbol 361 MovieClip Frame 1
_parent.onAnimationFinished();
Symbol 371 MovieClip Frame 69
_parent.onAnimationFinished();
stop();
Symbol 374 MovieClip Frame 28
_parent.onAnimationFinished();
stop();
Symbol 375 MovieClip Frame 109
_parent.onAnimationFinished();
stop();
Symbol 409 MovieClip Frame 40
_parent.onAnimationFinished();
stop();
Symbol 415 MovieClip Frame 54
stop();
_parent.onAnimationFinished();
Symbol 416 MovieClip [player_mc] Frame 1
stop();
Symbol 506 MovieClip Frame 6
_parent.onShowPowerup();
Symbol 506 MovieClip Frame 32
_parent.onAnimationFinished();
stop();
Symbol 507 MovieClip [parachute_mc] Frame 1
stop();
Symbol 528 MovieClip [weapon_arrow] Frame 1
stop();
Symbol 551 MovieClip Frame 21
stop();
Symbol 587 MovieClip [explodecat_mc] Frame 40
onAnimationFinished();
stop();
Symbol 592 MovieClip [explodetar_mc] Frame 41
onAnimationFinished();
stop();
Symbol 623 MovieClip [weapon_boomerang] Frame 1
stop();
Symbol 650 MovieClip [weapon_catsndogs] Frame 1
stop();
Symbol 650 MovieClip [weapon_catsndogs] Frame 14
playThunder();
Symbol 650 MovieClip [weapon_catsndogs] Frame 16
dropCatsAndDogs(1, -1);
dropCatsAndDogs(1, 1);
Symbol 650 MovieClip [weapon_catsndogs] Frame 25
dropCatsAndDogs(2, 1);
Symbol 650 MovieClip [weapon_catsndogs] Frame 34
dropCatsAndDogs(3, 1);
Symbol 650 MovieClip [weapon_catsndogs] Frame 40
dropCatsAndDogs(2, -1);
Symbol 650 MovieClip [weapon_catsndogs] Frame 42
dropCatsAndDogs(4, 1);
Symbol 650 MovieClip [weapon_catsndogs] Frame 61
dropCatsAndDogs(3, -1);
Symbol 650 MovieClip [weapon_catsndogs] Frame 80
dropCatsAndDogs(4, -1);
Symbol 650 MovieClip [weapon_catsndogs] Frame 81
gotoAndPlay ("start");
Symbol 693 MovieClip [explodepixel_mc] Frame 5
onKaboom();
Symbol 693 MovieClip [explodepixel_mc] Frame 36
onAnimationFinished();
stop();
Symbol 722 MovieClip [exploderainingcat_mc] Frame 1
onKaboom();
Symbol 722 MovieClip [exploderainingcat_mc] Frame 26
onAnimationFinished();
stop();
Symbol 723 MovieClip Frame 22
stop();
Symbol 749 MovieClip [exploderainingdog_mc] Frame 1
onKaboom();
Symbol 749 MovieClip [exploderainingdog_mc] Frame 26
onAnimationFinished();
stop();
Symbol 760 MovieClip [explodebig_mc] Frame 5
onKaboom();
Symbol 760 MovieClip [explodebig_mc] Frame 46
onAnimationFinished();
stop();
Symbol 765 MovieClip [dirt_mc] Frame 31
onAnimationFinished();
stop();
Symbol 818 MovieClip [anvilsmoke_mc] Frame 60
onAnimationFinished();
stop();
Symbol 823 MovieClip [smoke_mc] Frame 48
onAnimationFinished();
stop();
Symbol 905 MovieClip [explodemolotov_mc] Frame 9
onKaboom();
Symbol 905 MovieClip [explodemolotov_mc] Frame 46
onAnimationFinished();
stop();
Symbol 1026 MovieClip [explodehuge_mc] Frame 23
onKaboom();
Symbol 1026 MovieClip [explodehuge_mc] Frame 80
onAnimationFinished();
stop();
Symbol 1037 MovieClip [explodehugeair_mc] Frame 23
onKaboom();
Symbol 1037 MovieClip [explodehugeair_mc] Frame 80
onAnimationFinished();
stop();
Symbol 1055 MovieClip [explodepaint_mc] Frame 40
onAnimationFinished();
stop();
Symbol 1093 MovieClip [explodeegg_mc] Frame 39
onAnimationFinished();
stop();
Symbol 1112 MovieClip Frame 1
stop();
Symbol 1112 MovieClip Frame 7
Symbol 2036 MovieClip [__Packages.main.Main] Frame 0
class main.Main
{
static var logo_bmp;
var mc, sm, useKeyboard, playerColours, sections, sectionsHistory, gameRef, keyBindings, secretWeaponAdded, currSection, inTransition, gState, multiplayer, myGameStatePos, hideCurrSection, playNextIntro, nextSection, lastKeyDown;
function Main () {
}
static function getInstance() {
if (instance == null) {
instance = new main.Main();
}
return(instance);
}
function init(mc) {
var _local4;
var _local3;
var _local7;
uk.kerb.utils.Lookup.initialise();
this.mc = mc;
sm = new uk.kerb.utils.sound.SoundManager(mc);
sm.loadSoundList(["fx_splat", "fx_pain", "fx_death", "fx_cratedrop", "fx_explosion", "fx_explosion2", "fx_throw", "fx_bees", "fx_arrowembed", "fx_sploosh", "fx_bounceback", "fx_timebomb", "fx_thump", "fx_spray", "fx_pickup", "fx_hiss", "fx_firearrow", "fx_clunk", "fx_bigboom", "fx_creak", "fx_pop", "fx_invaderfire", "fx_gargle", "fx_cock", "fx_molotov", "fx_dog", "fx_bark", "fx_boomerang", "fx_boomeranghit", "fx_pain1", "fx_pain2", "fx_pain3", "fx_pain4", "fx_pain5", "fx_siren", "fx_thunder", "music"]);
sm.playSound("music", 100, 99999999);
useKeyboard = false;
playerColours = [0, 1];
sections = new Array();
sectionsHistory = new Array();
sections[SECTION_INTRO] = new main.Intro(mc.intro_mc, _root.skipintro);
sections[SECTION_INSTRUCTIONS] = new main.Instructions(mc.instructions_mc);
sections[SECTION_INSTRUCTIONS_INGAME] = new main.InGameInstructions(mc.instructions_mc);
sections[SECTION_GAMEOVER] = new main.GameOver(mc.gameover_mc);
gameRef = new game.Game(mc.game_mc, sm, useKeyboard);
sections[SECTION_GAME] = gameRef;
_local4 = 0;
while (_local4 < sections.length) {
_local3 = sections[_local4];
_local3.addEventListener("onChangeSection", this);
_local3.addEventListener("onSectionIntroComplete", this);
_local3.addEventListener("onSectionOutroComplete", this);
_local3.addEventListener("onSetKeyBinding", this);
_local4++;
}
Key.addListener(this);
keyBindings = new Array();
secretWeaponAdded = false;
var _local6 = new XML();
_local6.ignoreWhite = true;
_local6.onLoad = uk.kerb.utils.EventDelegate.create(this, parseXMLData, _local6);
_local6.load(DATA_URL);
}
function parseXMLData(ok, xml) {
var _local6 = "";
xml = xml.childNodes[0].childNodes[0];
while (xml != null) {
var _local4 = xml.attributes.id;
var _local5 = xml.attributes.url;
if (_local4 == "logo") {
_local6 = _local5;
} else if (_local4 == "main") {
THE_SITE_URL = _local5;
} else if (_local4 == "weapons") {
THE_SITE_EXTRAS_URL = _local5;
}
xml = xml.nextSibling;
}
if (_local6 == "") {
currSection = sections[SECTION_INTRO];
currSection.show();
currSection.playIntro();
inTransition = true;
} else {
var _local7 = new MovieClipLoader();
var _local8 = _root.createEmptyMovieClip("logo_mc", _root.getNextHighestDepth());
_local8._visible = false;
var _local9 = new Object();
_local9.onLoadInit = uk.kerb.utils.EventDelegate.create(this, parseLogo);
_local7.addListener(_local9);
_local7.loadClip(_local6, _local8);
}
}
function parseLogo(container_mc) {
logo_bmp = new flash.display.BitmapData(container_mc._width, container_mc._height, true, 0);
logo_bmp.draw(container_mc);
container_mc.removeMovieClip();
currSection = sections[SECTION_INTRO];
currSection.show();
currSection.playIntro();
inTransition = true;
}
function resetSecretWeapon() {
gameRef.resetSecretWeapon();
}
function getSoundManager() {
return(sm);
}
function setupNewGame() {
uk.kerb.utils.Debug.trace("setup new game", uk.kerb.utils.Debug.DEBUG_INFO);
gState = new main.GameState();
gState.setupOrder();
gState.levelLayout = 1 + Math.floor(Math.random() * game.Game.MAX_ENVIRONMENTS);
if (multiplayer) {
gState.playerTypes = [main.GameState.PLAYERTYPE_LOCALHUMAN, main.GameState.PLAYERTYPE_LOCALHUMAN];
} else {
gState.playerTypes = [main.GameState.PLAYERTYPE_LOCALHUMAN, main.GameState.PLAYERTYPE_LOCALAI];
}
gState.remotePlayers = false;
myGameStatePos = 0;
onChangeSection(new utils.SectionEvent(SECTION_GAME));
}
function validateCode(code) {
code = code.toLowerCase();
var _local3 = true;
switch (true) {
case code == CODE_0 :
gameRef.activateSecretWeapon(0);
break;
case code == CODE_1 :
gameRef.activateSecretWeapon(1);
break;
case code == CODE_2 :
gameRef.activateSecretWeapon(2);
break;
case code == CODE_3 :
gameRef.activateSecretWeapon(3);
break;
case code == CODE_4 :
gameRef.activateSecretWeapon(4);
break;
case code == CODE_5 :
gameRef.activateSecretWeapon(5);
break;
default :
trace(((("code not matched [" + code) + "]\nCODES[") + [CODE_0, CODE_1, CODE_2, CODE_3, CODE_4, CODE_5]) + "]");
_local3 = false;
}
if (_local3) {
secretWeaponAdded = true;
}
return(_local3);
}
function dispose() {
var _local3;
var _local2;
Key.removeListener(this);
_local3 = 0;
while (_local3 < sections.length) {
_local2 = sections[_local3];
_local2.removeEventListener("onChangeSection", this);
_local2.removeEventListener("onSectionIntroComplete", this);
_local2.removeEventListener("onSectionOutroComplete", this);
_local2.removeEventListener("onSetKeyBinding", this);
_local3++;
}
game.Game(sections[SECTION_GAME]).dispose();
}
function onChangeSection(se) {
var _local2;
if (!inTransition) {
_local2 = se.nextSectionID;
hideCurrSection = se.hideCurrSection;
playNextIntro = se.playIntro;
keyBindings = new Array();
if (_local2 == SECTION_PREVIOUS) {
nextSection = main.ISection(sectionsHistory.pop());
} else {
nextSection = sections[_local2];
sectionsHistory.push(currSection);
}
if (nextSection != undefined) {
inTransition = true;
if (se.playOutro) {
currSection.playOutro();
} else {
onSectionOutroComplete();
}
}
}
}
function getGameState() {
return(gState);
}
function getWinningScore() {
return(gameRef.sideCash[gState.winningSide]);
}
function onSectionIntroComplete() {
currSection.init();
inTransition = false;
}
function onSectionOutroComplete() {
currSection.uninit();
if (hideCurrSection) {
currSection.hide();
}
currSection = nextSection;
nextSection = null;
currSection.show();
if (playNextIntro) {
currSection.playIntro();
} else {
onSectionIntroComplete();
}
if (nextSE != null) {
var _local2 = nextSE;
nextSE = null;
onChangeSection(_local2);
}
}
function onSetKeyBinding(keyBindingObject) {
keyBindings.push(keyBindingObject);
}
function onKeyDown() {
var _local2;
var _local3;
var _local4;
if (!inTransition) {
_local2 = 0;
while (_local2 < keyBindings.length) {
_local3 = keyBindings[_local2].key;
_local4 = keyBindings[_local2].action;
if (Key.isDown(_local3) && (_local3 != lastKeyDown)) {
_local4();
break;
}
_local2++;
}
}
lastKeyDown = Key.getCode();
}
function onKeyUp() {
lastKeyDown = null;
}
function onContextMenuSelect(context, menuItem, itemPosition) {
if (!(itemPosition === 0)) {
} else {
getURL (URL_KERB, "_blank");
}
}
function setPlayerColour(playerNum, colourIndex) {
playerColours[playerNum] = colourIndex;
}
function getPlayerColour(playerNum) {
return(playerColours[playerNum] + 1);
}
function setUseKeyboard(useKeyboard) {
this.useKeyboard = useKeyboard;
gameRef.useKeyboard = useKeyboard;
}
function getUseKeyboard() {
return(useKeyboard);
}
static var URL_KERB = "http://www.kerb.co.uk/";
static var DATA_URL = "http://www.thesite.org/turfwar/config.xml";
static var THE_SITE_URL = "http://www.thesite.org/";
static var THE_SITE_EXTRAS_URL = "http://www.thesite.org/turfwar/extras";
static var CODE_0 = "molotov";
static var CODE_1 = "cat";
static var CODE_2 = "dog";
static var CODE_3 = "bomb";
static var CODE_4 = "condom";
static var CODE_5 = "sheep";
static var SECTION_PREVIOUS = 0;
static var SECTION_INTRO = 1;
static var SECTION_INSTRUCTIONS = 2;
static var SECTION_INSTRUCTIONS_INGAME = 3;
static var SECTION_GAME = 4;
static var SECTION_HIGHSCORES = 5;
static var SECTION_SENDTOFRIEND = 6;
static var SECTION_LOBBY = 7;
static var SECTION_GAMEOVER = 8;
static var instance = null;
var nextSE = null;
}
Symbol 2037 MovieClip [__Packages.utils.SectionEvent] Frame 0
class utils.SectionEvent
{
var nextSectionID, hideCurrSection, playOutro, playIntro, type, target;
function SectionEvent (nextSectionID, hideCurrSection, playOutro, playIntro) {
this.nextSectionID = nextSectionID;
this.hideCurrSection = ((hideCurrSection == undefined) ? true : (hideCurrSection));
this.playOutro = ((playOutro == undefined) ? true : (playOutro));
this.playIntro = ((playIntro == undefined) ? true : (playIntro));
type = "onChangeSection";
target = null;
}
}
Symbol 2038 MovieClip [__Packages.uk.kerb.utils.sound.SoundManager] Frame 0
class uk.kerb.utils.sound.SoundManager
{
var mcRef, soundList, preloaderList, globalSounds, soundOnFlag, allSoundsLoaded, soundLoadStarted;
function SoundManager (_mcRef) {
mcRef = _mcRef;
soundList = new Array();
preloaderList = new Array();
globalSounds = new Sound();
soundOnFlag = true;
}
function loadSoundList(_soundlist) {
var _local7 = false;
var _local6;
var _local4;
var _local5;
var _local2;
_local2 = 0;
while (_local2 < _soundlist.length) {
if (_soundlist[_local2].toLowerCase().indexOf(".mp3") > -1) {
preloaderList.push(_soundlist[_local2]);
_local7 = true;
} else {
_local5 = mcRef.getNextHighestDepth();
_local6 = mcRef.createEmptyMovieClip("sounddummy" + _local5, _local5);
_local4 = new uk.kerb.utils.sound.ExtendedSound(_local6);
_local4.attachSound(_soundlist[_local2]);
soundList[_soundlist[_local2]] = _local4;
}
_local2++;
}
if (_local7) {
preloadNextMP3();
} else {
allSoundsLoaded(true);
}
}
function playSound(_id, _volume, _loops, _fadeSpeedSeconds, _panPosition) {
soundList[_id].start(0, _loops);
if ((_fadeSpeedSeconds != undefined) && (_fadeSpeedSeconds != 0)) {
soundList[_id].setVolume(0);
soundList[_id].startFade(_volume, _fadeSpeedSeconds);
} else {
soundList[_id].setVolume(_volume);
}
soundList[_id].setPan(_panPosition);
}
function setSoundComplete(_id, foo) {
soundList[_id].onSoundComplete = foo;
}
function stopSound(_id, _fadeSpeedSeconds) {
if ((_fadeSpeedSeconds != undefined) && (_fadeSpeedSeconds != 0)) {
soundList[_id].startFade(0, _fadeSpeedSeconds);
} else {
soundList[_id].stop();
}
}
function stopEverySound(_fadeSpeedSeconds, _excludeIdList) {
var _local3;
var _local2;
for (_local2 in soundList) {
if (!checkIfExcluded(_local2, _excludeIdList)) {
_local3 = soundList[_local2];
if ((_fadeSpeedSeconds != undefined) && (_fadeSpeedSeconds != 0)) {
_local3.startFade(0, _fadeSpeedSeconds);
} else {
_local3.stop();
}
}
}
}
function soundOff() {
var _local3;
var _local2;
for (_local2 in soundList) {
_local3 = soundList[_local2];
_local3.setMute(true);
}
globalSounds.setVolume(0);
soundOnFlag = false;
}
function soundOn() {
var _local2;
for (_local2 in soundList) {
soundList[_local2].setMute(false);
}
globalSounds.setVolume(100);
soundOnFlag = true;
}
function isSoundOn() {
return(soundOnFlag);
}
function fadeSound(_id, _targetVolume, _fadeSpeedSeconds, _easing) {
soundList[_id].startFade(_targetVolume, _fadeSpeedSeconds, _easing);
}
function panSound(_id, _targetPosition, _panSpeedSeconds, _easing) {
soundList[_id].startPan(_targetPosition, _panSpeedSeconds, _easing);
}
function fadeInRandomSound(_sounds, _fadeSpeedSeconds) {
var _local6 = 0;
var _local2;
_local2 = 0;
while (_local2 < _sounds.length) {
_local6 = _local6 + _sounds[_local2].freqency;
_local2++;
}
var _local5 = 0;
_local2 = 0;
while (_local2 < _sounds.length) {
_local5 = _local5 + (_sounds[_local2].freqency / _local6);
_sounds[_local2].chance = _local5;
_local2++;
}
var _local4 = Math.random();
var _local7 = 0;
_local2 = 1;
while (_local2 < _sounds.length) {
if ((_local4 > _sounds[_local2 - 1].chance) && (_local4 <= _sounds[_local2].chance)) {
_local7 = _local2;
}
_local2++;
}
var _local8 = _sounds[_local7].level.split("-");
var _local9 = (Math.random() * (Number(_local8[1]) - Number(_local8[0]))) + Number(_local8[0]);
playSound(_sounds[_local7].id, _local9, 1, _fadeSpeedSeconds);
}
function checkIfExcluded(_excludeId, _excludeIdList) {
var _local1;
_local1 = 0;
while (_local1 < _excludeIdList.length) {
if (_excludeIdList[_local1] == _excludeId) {
return(true);
}
_local1++;
}
return(false);
}
function preloadNextMP3() {
var _local8 = this;
var _local5 = mcRef.getNextHighestDepth();
if (preloaderList.length > 0) {
var _local2 = preloaderList.shift();
if (soundLoadStarted != undefined) {
soundLoadStarted(_local2);
}
var _local7 = mcRef.createEmptyMovieClip("sounddummy" + _local5, _local5);
var _local3 = new uk.kerb.utils.sound.ExtendedSound(_local7);
_local3.loadSound(_local2);
var _local6 = _local2.split("/");
var _local4 = _local6[_local6.length - 1].slice(0, -4);
soundList[_local4] = _local3;
soundList[_local4].onLoad = uk.kerb.utils.EventDelegate.create(this, preloadNextMP3);
} else {
allSoundsLoaded(true);
}
}
}
Symbol 2039 MovieClip [__Packages.uk.kerb.utils.sound.ExtendedSound] Frame 0
class uk.kerb.utils.sound.ExtendedSound extends Sound
{
var mcRef, mute, fade, onFadeComplete, volume, sweep, onSweepComplete, pan;
function ExtendedSound (_mcRef) {
super((mcRef = _mcRef));
mute = 1;
setVolume(masterVolume);
setPan(0);
}
function startFade(_targetVolume, _duration, _easing) {
_targetVolume = inBounds(_targetVolume, 0, 100, masterVolume);
_duration = inBounds(_duration, 0, Number.MAX_VALUE, 0.5);
if (_easing == undefined) {
_easing = mx.transitions.easing.None.easeNone;
}
fade = new mx.transitions.Tween(this, "volume", _easing, getVolume(), _targetVolume, _duration, true);
fade.onMotionChanged = uk.kerb.utils.EventDelegate.create(this, setFadeVolume);
fade.onMotionFinished = uk.kerb.utils.EventDelegate.create(this, onFadeComplete);
return(this);
}
function setFadeVolume(_tw) {
setVolume(volume);
}
function startPan(_targetPosition, _duration, _easing) {
_targetPosition = inBounds(_targetPosition, -100, 100, 0);
_duration = inBounds(_duration, 0, Number.MAX_VALUE, 0.5);
if (_easing == undefined) {
_easing = mx.transitions.easing.None.easeNone;
}
sweep = new mx.transitions.Tween(this, "pan", _easing, getPan(), _targetPosition, _duration, true);
sweep.onMotionChanged = uk.kerb.utils.EventDelegate.create(this, setPanPosition);
sweep.onMotionFinished = uk.kerb.utils.EventDelegate.create(this, onSweepComplete);
return(this);
}
function setPanPosition(_tw) {
setPan(pan);
}
function attachSound(_libraryID) {
stop();
super.attachSound(_libraryID);
return(this);
}
function loadSound(_mp3URL) {
stop();
super.loadSound(_mp3URL, false);
return(this);
}
function start(_offset, _loops) {
_offset = inBounds(_offset, 0, super.duration, 0);
_loops = inBounds(_loops, 1, Number.MAX_VALUE, 1);
stop();
super.start(_offset, _loops);
return(this);
}
function stop() {
super.stop();
return(this);
}
function setVolume(_volume) {
volume = inBounds(_volume, 0, 100, masterVolume);
super.setVolume(((volume / 100) * masterVolume) * mute);
return(this);
}
function getVolume() {
return(volume);
}
function setPan(_pan) {
pan = inBounds(_pan, -100, 100, 0);
super.setPan(pan);
return(this);
}
function getPan() {
return(pan);
}
function setMute(_bool) {
mute = (_bool ? 0 : 1);
setVolume(getVolume());
return(this);
}
function inBounds(_value, _min, _max, _default) {
if (_value == undefined) {
_value = _default;
}
if (_value < _min) {
_value = _min;
}
if (_value > _max) {
_value = _max;
}
return(_value);
}
static var masterVolume = 100;
}
Symbol 2040 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 2041 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 2042 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 2043 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 2044 MovieClip [__Packages.uk.kerb.utils.EventDelegate] Frame 0
class uk.kerb.utils.EventDelegate
{
function EventDelegate () {
}
static function create(scope, method) {
var params = arguments.splice(2, arguments.length - 2);
var _local2 = function () {
return(method.apply(scope, arguments.concat(params)));
};
return(_local2);
}
}
Symbol 2045 MovieClip [__Packages.main.ISection] Frame 0
interface main.ISection
{
}
Symbol 2046 MovieClip [__Packages.main.GameState] Frame 0
class main.GameState
{
function GameState () {
}
function isReady() {
var _local2 = true;
if ((so != null) && (clientIds[0] == "")) {
_local2 = false;
uk.kerb.utils.Debug.trace("waiting on client id 0", uk.kerb.utils.Debug.DEBUG_INFO);
}
if ((so != null) && (clientIds[1] == "")) {
_local2 = false;
uk.kerb.utils.Debug.trace("waiting on client id 1", uk.kerb.utils.Debug.DEBUG_INFO);
}
if ((avatars[0] == "") || (avatars[1] == "")) {
_local2 = false;
uk.kerb.utils.Debug.trace("waiting on avatars", uk.kerb.utils.Debug.DEBUG_INFO);
}
if (playerOrder.length < 1) {
_local2 = false;
uk.kerb.utils.Debug.trace("waiting on order", uk.kerb.utils.Debug.DEBUG_INFO);
}
if (levelLayout == 0) {
_local2 = false;
uk.kerb.utils.Debug.trace("waiting on level layout", uk.kerb.utils.Debug.DEBUG_INFO);
}
return(_local2);
}
function setupOrder() {
var _local3 = new Array();
playerOrder = new Array();
var _local2 = 0;
while (_local2 < sides) {
_local3.push(new Array());
_local2++;
}
_local2 = 0;
while (_local2 < (sides * PLAYERS_PER_SIDE)) {
_local3[Math.floor(_local2 / PLAYERS_PER_SIDE)].push(_local2);
_local3[Math.floor(_local2 / PLAYERS_PER_SIDE)].sort(function () {
return(((Math.random() < 0.5) ? -1 : 1));
});
_local2++;
}
while (_local3[0].length > 0) {
_local2 = 0;
while (_local2 < _local3.length) {
var _local4 = Math.floor(Math.random() * _local3[_local2].length);
playerOrder.push(_local3[_local2][_local4]);
_local3[_local2].splice(_local4, 1);
_local2++;
}
}
}
static var PLAYERTYPE_LOCALHUMAN = 0;
static var PLAYERTYPE_LOCALAI = 1;
static var PLAYERTYPE_REMOTE = 2;
var sides = 2;
var PLAYERS_PER_SIDE = 2;
var clientIds = ["", ""];
var avatars = ["", ""];
var playerTypes = [PLAYERTYPE_LOCALHUMAN, PLAYERTYPE_LOCALAI];
var playerOrder = [];
var remotePlayers = false;
var levelLayout = 0;
var currentPlayer = 0;
var turnId = 0;
var wind = 0;
var winningSide = -1;
var nc = null;
var so = null;
}
Symbol 2047 MovieClip [__Packages.uk.kerb.utils.Debug] Frame 0
class uk.kerb.utils.Debug
{
function Debug () {
}
static function setLevel(_debugLevel) {
debugLevel = _debugLevel;
}
static function write(message, level) {
switch (output) {
case OUTPUT_TEXTFIELD :
setTextField(message, level);
break;
case OUTPUT_CLIPBOARD :
System.setClipboard(message);
break;
case OUTPUT_SWF :
lc.send(LOCAL_CONNECTION_NAME, LOCAL_CONNECTION_METHOD, message);
break;
case OUTPUT_PANEL :
trace(message);
}
}
static function trace(message, level) {
level = ((level == undefined) ? (DEBUG_INFO) : (level));
if (level >= debugLevel) {
write(message, level);
if (loggingEnabled) {
log = log + (message + newline);
}
}
}
static function dump() {
write(log);
return(log);
}
static function clear() {
log = "";
tf.htmlText = "";
lc.send(LOCAL_CONNECTION_NAME, LOCAL_CONNECTION_CLEAR);
}
static function setOutput(type) {
if (output == OUTPUT_TEXTFIELD) {
delete mc.onMouseDown;
}
switch (type) {
case OUTPUT_PANEL :
output = OUTPUT_PANEL;
break;
case OUTPUT_TEXTFIELD :
output = OUTPUT_TEXTFIELD;
createTextField();
mc.onMouseDown = uk.kerb.utils.EventDelegate.create(uk.kerb.utils.Debug, mouseClicked);
break;
case OUTPUT_SWF :
output = OUTPUT_SWF;
break;
default :
write("ERROR SETTING OUTPUT FOR DEBUG");
}
}
static function mouseClicked() {
if ((_root._xmouse + _root._ymouse) < 6) {
mc._visible = !mc._visible;
}
}
static function setLogState(enabled) {
loggingEnabled = enabled;
}
static function createTextField() {
if (mc == null) {
mc = _root.createEmptyMovieClip("___kerbDebug_mc", _root.getNextHighestDepth());
mc._visible = false;
}
if (tf == null) {
tf = mc.createTextField("out_txt", 0, 0, 0, textfieldWidth, textfieldHeight);
tf.border = true;
tf.html = true;
tf.background = true;
tf.embedFonts = false;
tf.selectable = false;
var _local2 = new TextFormat("_sans", 11);
tf.setNewTextFormat(_local2);
tfString = "";
}
}
static function setTextField(message, level) {
mc.swapDepths(_root.getNextHighestDepth());
tfString = (((("<font color=\"#" + colours[level]) + "\">") + message) + "</font><br>\n") + tfString;
tf.htmlText = tfString;
}
static function setTextfieldSize(w, h) {
if (w != undefined) {
textfieldWidth = w;
tf._width = w;
}
if (h != undefined) {
textfieldHeight = h;
tf._height = h;
}
}
function showTextfield() {
mc._visible = true;
}
function hideTextfield() {
mc._visible = false;
}
static var OUTPUT_PANEL = 0;
static var OUTPUT_TEXTFIELD = 1;
static var OUTPUT_CLIPBOARD = 2;
static var OUTPUT_SWF = 3;
static var DEBUG_ALL = 0;
static var DEBUG_VERBOSE = 1;
static var DEBUG_INFO = 2;
static var DEBUG_WARN = 3;
static var DEBUG_ERROR = 4;
static var DEBUG_NONE = 5;
static var colours = ["", "00AA00", "000000", "FF00FF", "FF0000"];
static var LOCAL_CONNECTION_NAME = "kerbDebug";
static var LOCAL_CONNECTION_METHOD = "trace";
static var LOCAL_CONNECTION_CLEAR = "clear";
static var tfString = "";
static var log = "";
static var output = OUTPUT_PANEL;
static var loggingEnabled = false;
static var lc = new LocalConnection();
static var mc = null;
static var tf = null;
static var textfieldWidth = Stage.width;
static var textfieldHeight = Stage.height;
static var debugLevel = DEBUG_ALL;
}
Symbol 2048 MovieClip [__Packages.utils.IListenable] Frame 0
interface utils.IListenable
{
}
Symbol 2049 MovieClip [__Packages.main.AbstractSection] Frame 0
class main.AbstractSection implements utils.IListenable
{
var mc, introCompleteHandler, outroCompleteHandler, active;
function AbstractSection (mc) {
this.mc = mc;
introCompleteHandler = uk.kerb.utils.EventDelegate.create(this, onIntroComplete);
outroCompleteHandler = uk.kerb.utils.EventDelegate.create(this, onOutroComplete);
mx.events.EventDispatcher.initialize(this);
active = false;
mc.gotoAndStop("hidden");
}
function onIntroComplete() {
dispatchEvent({type:"onSectionIntroComplete", target:this});
}
function onOutroComplete() {
dispatchEvent({type:"onSectionOutroComplete", target:this});
}
function show() {
if (!active) {
mc.gotoAndStop("visible");
}
}
function hide() {
if (active) {
mc.gotoAndStop("hidden");
active = false;
}
}
function uninit() {
}
function dispatchEvent(eventObject) {
}
function addEventListener(event, listener) {
}
function removeEventListener(event, listener) {
}
}
Symbol 2050 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 2051 MovieClip [__Packages.game.GameObject] Frame 0
class game.GameObject
{
var mc, initialName, hitbox_mc, gameRef, lifeTime, dx, dy, fade, location, ignoreMe, x, y, bmp, onFaded;
function GameObject (mc, gameRef) {
this.mc = mc;
initialName = mc._name;
hitbox_mc = mc;
this.gameRef = gameRef;
setPos(mc._x, mc._y);
lifeTime = 0;
dx = 0;
dy = 0;
fade = 0;
location = LOCATION_INAIR;
ignoreMe = false;
}
function pauseGO() {
mc.stop();
paused = true;
}
function runGO() {
mc.play();
paused = false;
}
function ignore() {
return(ignoreMe);
}
function waitForMe() {
return(false);
}
function setScale(scale) {
mc._xscale = (mc._yscale = scale);
}
function setPos(newX, newY) {
mc._x = (x = newX);
mc._y = (y = newY);
}
function setCollisionMap(clipName) {
if (bmp != null) {
bmp.dispose();
}
var _local2 = mc.attachMovie(clipName, "collider", mc.getNextHighestDepth());
bmp = new flash.display.BitmapData(_local2._width, _local2._height, true, 0);
bmp.draw(_local2);
_local2.removeMovieClip();
}
function update() {
var _local9 = gameRef.groundmask_bmp;
if (!ignore()) {
var _local2;
var _local8 = null;
var _local14 = location;
var _local5;
var _local6;
var _local4;
switch (collisionDetection) {
case COLLISION_NONE :
x = x + dx;
y = y - dy;
break;
case COLLISION_PLAYER :
var _local13 = MAX_CLIMB_HEIGHT;
if (location == LOCATION_ONPAINT) {
_local13 = _local13 / 4;
}
if ((x + dx) < 0) {
dx = -x;
}
if ((x + dx) > game.Game.PLAY_WIDTH) {
dx = game.Game.PLAY_WIDTH - x;
}
_local4 = Math.ceil(Math.abs(dx));
if (_local4 == 0) {
_local4 = 1;
}
_local5 = dx / _local4;
_local6 = dy / _local4;
var _local7 = 0;
while (_local7 < _local4) {
var _local11 = x;
var _local10 = y;
var _local3 = 0;
x = x + _local5;
y = y - _local6;
_local2 = new flash.geom.Point(x - (bmp.width / 2), y - (bmp.height / 2));
while (bmp.hitTest(_local2, 255, _local9)) {
_local8 = _local2;
y = y - 1;
_local3 = _local3 + 1;
_local2 = new flash.geom.Point(x - (bmp.width / 2), y - (bmp.height / 2));
}
if (_local3 > _local13) {
x = _local11;
y = _local10;
_local7 = _local4;
dx = 0;
}
_local7++;
}
if (_local8 != null) {
dy = 0;
}
break;
case COLLISION_WEAPON :
var _local12 = true;
if (Math.abs(dx) > Math.abs(dy)) {
_local4 = Math.ceil(Math.abs(dx));
} else {
_local4 = Math.ceil(Math.abs(dy));
}
_local5 = dx / _local4;
_local6 = dy / _local4;
_local7 = 0;
for(;;){
if (_local7 >= _local4) {
break;
}
x = x + _local5;
y = y - _local6;
_local2 = new flash.geom.Point(x - (bmp.width / 2), y - (bmp.height / 2));
if ((((x > 0) && (x < game.Game.PLAY_WIDTH)) && (bmp.hitTest(_local2, 255, _local9))) && (collisionReaction())) {
_local8 = _local2;
if (_local12) {
x = x - _local5;
y = y + _local6;
} else {
x = x - (_local5 * 2);
y = y + (_local6 * 2);
}
break;
}
_local12 = false;
_local7++;
};
}
if (collisionDetection != COLLISION_NONE) {
if (_local8 != null) {
if (bmp.hitTest(_local8, 255, gameRef.paintmask_bmp)) {
location = LOCATION_ONPAINT;
} else if (_local14 == LOCATION_INAIR) {
location = LOCATION_JUSTLANDED;
} else {
location = LOCATION_ONGROUND;
}
} else {
location = LOCATION_INAIR;
}
}
}
lifeTime++;
setPos(x, y);
if (fade != 0) {
mc._alpha = mc._alpha - fade;
if (mc._alpha <= 0) {
fade = 0;
if (onFaded != null) {
onFaded();
}
}
}
}
function applyGravity(weight) {
dy = dy - weight;
}
function applyWind(amount) {
if (y < game.Game.GROUND_HEIGHT) {
dx = dx + (gameRef.gameState.wind * amount);
}
}
function fadeOut(fade, onFaded) {
this.fade = fade;
this.onFaded = onFaded;
ignoreMe = true;
}
function collisionReaction() {
return(true);
}
function setClipRotation(dx, dy) {
mc._rotation = ((Math.atan2(-dy, dx) * 180) / Math.PI) + 90;
}
function dispose() {
if (bmp != null) {
bmp.dispose();
}
mc.removeMovieClip();
}
function animation(anim, func) {
func = ((func == undefined) ? null : (func));
mc.gotoAndStop(anim);
mc.onAnimationFinished = func;
}
function show() {
mc._visible = true;
}
function hide() {
mc._visible = false;
}
function distanceToSquared(other) {
return(((other.x - x) * (other.x - x)) + ((other.y - y) * (other.y - y)));
}
function distanceTo(other) {
return(Math.sqrt(distanceToSquared(other)));
}
static var COLLISION_NONE = 0;
static var COLLISION_PLAYER = 1;
static var COLLISION_WEAPON = 2;
static var LOCATION_INAIR = 0;
static var LOCATION_ONGROUND = 1;
static var LOCATION_ONPAINT = 2;
static var LOCATION_JUSTLANDED = 3;
static var MAX_CLIMB_HEIGHT = 6;
static var ZERO_POINT = new flash.geom.Point(0, 0);
var collisionDetection = COLLISION_NONE;
var simulation = false;
var paused = false;
}
Symbol 2052 MovieClip [__Packages.game.weapon.Weapon] Frame 0
class game.weapon.Weapon extends game.GameObject
{
var collisionDetection, setScale, fired, canHitOwner, ticksNotHittingOwner, setCollisionMap, ignoreMe, mc, lifeTime, owner, gameRef, bmp, x, y, dx, dy, setPos, ignore, setClipRotation;
function Weapon (mc, gameRef) {
super(mc, gameRef);
collisionDetection = game.GameObject.COLLISION_WEAPON;
setScale(100);
fired = false;
canHitOwner = false;
ticksNotHittingOwner = 0;
setCollisionMap("collide_mc");
}
function update() {
if (!ignoreMe) {
applyGravity(WEIGHT);
applyWind(WINDEFFECT);
}
if (fired && (mc._xscale < 100)) {
mc._xscale = (mc._yscale = mc._xscale + 2);
}
var _local3 = collisionDetection;
if (lifeTime < LIFETIME_COLLIDE) {
collisionDetection = game.GameObject.COLLISION_NONE;
}
if ((!canHitOwner) && (!owner.collide(this))) {
ticksNotHittingOwner++;
if (ticksNotHittingOwner > 3) {
canHitOwner = true;
}
}
super.update();
collisionDetection = _local3;
}
function collisionReaction() {
var _local12 = gameRef.groundmask_bmp;
var _local5 = new flash.display.BitmapData(bmp.width, bmp.height, true, 0);
_local5.copyPixels(_local12, new flash.geom.Rectangle(x - (bmp.width / 2), y - (bmp.height / 2), bmp.width, bmp.height), game.GameObject.ZERO_POINT, null, null, true);
var _local2 = _local5.getColorBoundsRect(4294967295, 4294967295, true);
if ((_local2.width == 0) || (_local2.height == 0)) {
return(false);
}
var _local9 = _local2.x + (0.5 * (_local2.width - bmp.width));
var _local10 = _local2.y + (0.5 * (_local2.height - bmp.height));
var _local6 = ((Math.atan2(_local10, _local9) * 180) / Math.PI) + 90;
var _local4 = uk.kerb.utils.Lookup.getCos(_local6);
var _local3 = uk.kerb.utils.Lookup.getSin(_local6);
var _local11 = (dy * _local4) - (dx * _local3);
var _local13 = (dx * _local4) + (dy * _local3);
var _local7 = -_local11;
var _local8 = _local13;
dy = (_local7 * _local4) + (_local8 * _local3);
dx = (_local8 * _local4) - (_local7 * _local3);
return(true);
}
function lockToPlayer(p) {
setPos(p.x - (p.facing * 20), p.y - 5);
}
function waitForMe() {
return(true);
}
function isArmed() {
return((!ignore()) && (lifeTime > LIFETIME_COLLIDE));
}
function isFinished() {
return((!ignore()) && ((REMOVE_OUTSIDE_SCREEN && (((x > (game.Game.PLAY_WIDTH + 50)) || (x < -50)) || (y > game.Game.SCREEN_HEIGHT))) || (lifeTime > LIFETIME_TOTAL)));
}
function explode() {
ignoreMe = true;
}
function isFired() {
return(fired);
}
function fire(angle, power) {
dx = uk.kerb.utils.Lookup.getSin(angle) * power;
dy = uk.kerb.utils.Lookup.getCos(angle) * power;
setClipRotation(dx, dy);
fired = true;
lifeTime = 0;
}
function applyGravity() {
super.applyGravity(WEIGHT);
setClipRotation(dx, dy);
}
function applyWind() {
super.applyWind(WINDEFFECT);
setClipRotation(dx, dy);
}
var WEIGHT = 0;
var WINDEFFECT = 0;
var REMOVE_OUTSIDE_SCREEN = true;
var LIFETIME_COLLIDE = 3;
var LIFETIME_TOTAL = 300;
var DAMAGE = 0;
var collidesWithPlayer = true;
var usePowerBar = true;
}
Symbol 2053 MovieClip [__Packages.game.Player] Frame 0
class game.Player extends game.GameObject
{
var setScale, avatar, collisionDetection, setCollisionMap, health, gameWaitingForMe, side, goesToMiss, goesToMissAnimation, turnStage, weaponCounts, weaponUsedCounts, facing, x, alreadyHitBy, weaponLoaded, mc, paused, gameRef, weaponAngle, weaponPower, ignore, applyGravity, dx, location, currentAnimation, y, dy, ignoreMe, waitingOnAnimation;
function Player (mc, gameRef, side, avatarString) {
super(mc, gameRef);
setScale(75);
avatar = new game.Avatar(mc, avatarString);
collisionDetection = game.GameObject.COLLISION_PLAYER;
setCollisionMap("pcollide_mc");
health = MAX_HEALTH;
gameWaitingForMe = false;
this.side = side;
goesToMiss = 0;
goesToMissAnimation = -1;
turnStage = -1;
weaponCounts = new Array();
var _local3 = 0;
while (_local3 < game.Game.WEAPONS.length) {
weaponCounts[_local3] = game.Game.WEAPONS[_local3][2];
weaponUsedCounts[_local3] = 0;
_local3++;
}
facing = ((x > (game.Game.PLAY_WIDTH / 2)) ? -1 : 1);
alreadyHitBy = new Array();
unloadWeapon();
animation(ANIMATION_STAND, null);
}
function getLoadedWeapon() {
return(weaponLoaded);
}
function getTimeLeft() {
if (_turnTimeout > 0) {
if (getTimer() > _turnTimeout) {
return(0);
}
return(Math.ceil((_turnTimeout - getTimer()) / 1000));
}
return(-1);
}
function pauseGO() {
mc.man_mc.stop();
paused = true;
_lastTimer = getTimer();
}
function runGO() {
mc.man_mc.play();
paused = false;
if (_turnTimeout > 0) {
_turnTimeout = _turnTimeout + (getTimer() - _lastTimer);
}
}
function unloadWeapon() {
if (weaponLoaded != null) {
if (!weaponLoaded.isFired()) {
gameRef.weaponFinished(weaponLoaded, "unloadWeapon");
}
}
weaponLoaded = null;
weaponAngle = -1;
weaponPower = -1;
}
function waitForMe() {
return(gameWaitingForMe);
}
function update() {
if (!ignore()) {
applyGravity(WEIGHT);
}
if (getTimeLeft() == 0) {
var _local3 = _onTurnTimeout;
_turnTimeout = 0;
_onTurnTimeout = null;
_local3();
}
var _local4 = dx;
if (location == game.GameObject.LOCATION_ONPAINT) {
dx = dx * 1;
} else if (currentAnimation == ANIMATION_FLYING) {
dx = dx * 0.9;
} else {
dx = dx * 0.8;
}
if (Math.abs(dx) < 0.2) {
dx = 0;
}
super.update();
if (health < 0) {
health = 0;
}
mc.healthbar_mc.gotoAndStop(Math.floor((MAX_HEALTH - Math.floor(health)) * (mc.healthbar_mc._totalframes / MAX_HEALTH)));
if (((currentAnimation == ANIMATION_FLYING) && (location != game.GameObject.LOCATION_INAIR)) && (Math.abs(dx) < 2)) {
animation(ANIMATION_SOOTY, uk.kerb.utils.EventDelegate.create(this, standThere), true);
}
if ((currentAnimation == ANIMATION_JUMP) && (location != game.GameObject.LOCATION_INAIR)) {
standThere();
}
if ((currentAnimation == ANIMATION_RUN) && (dx == 0)) {
standThere();
}
if (location == game.GameObject.LOCATION_JUSTLANDED) {
if ((((currentAnimation == ANIMATION_STAND) || (currentAnimation == ANIMATION_JUMP)) || (currentAnimation == ANIMATION_FLYING)) || (currentAnimation == ANIMATION_RUN)) {
if (dx == 0) {
standThere();
} else {
animation(ANIMATION_RUN);
}
}
}
if (dx < 0) {
facing = -1;
}
if (dx > 0) {
facing = 1;
}
if (facing == 1) {
mc.man_mc._xscale = MAN_SCALE;
} else {
mc.man_mc._xscale = -MAN_SCALE;
}
if ((turnStage == TURN_WEAPONCHOSEN) || (turnStage == TURN_WEAPONLOADED)) {
weaponLoaded.lockToPlayer(this);
}
if ((x > game.Game.PLAY_WIDTH) || (x < 0)) {
x = ((x < 0) ? 0 : (game.Game.PLAY_WIDTH));
}
if (y > game.Game.SCREEN_HEIGHT) {
health = 0;
}
}
function standThere() {
if (currentAnimation != ANIMATION_STAND) {
if (goesToMissAnimation != -1) {
animation(goesToMissAnimation);
} else {
animation(ANIMATION_STAND);
}
}
gameWaitingForMe = false;
if ((boredInterval == -1) && (turnStage == TURN_WALKANDCHOOSE)) {
setBoredWait();
}
}
function canChooseWeapon() {
return((turnStage == TURN_WALKANDCHOOSE) || (turnStage == TURN_WEAPONCHOSEN));
}
function isAimingWeapon() {
return(turnStage == TURN_WEAPONCHOSEN);
}
function isChoosingPower() {
return(turnStage == TURN_WEAPONLOADED);
}
function canFireWeapon() {
return(((weaponPower != -1) && (weaponAngle != -1)) && (weaponLoaded != null));
}
function canMove() {
return(((turnStage == TURN_WALKANDCHOOSE) || (turnStage == TURN_WEAPONCHOSEN)) || (turnStage == TURN_WALKONLY));
}
function nothingIsBusy() {
if (isDead()) {
playerGoFinished();
} else if (turnStage == TURN_WAITFORWEAPON) {
if (gameRef.noBusyGOs()) {
setTurnStage(TURN_WALKONLY);
}
} else if ((turnStage != TURN_NOTMYTURN) && (goesToMiss > 0)) {
playerGoFinished();
}
}
function move(dir) {
if ((currentAnimation == ANIMATION_SOOTY) || (currentAnimation == ANIMATION_PAINTY)) {
return(undefined);
}
gameRef.setMapTracking(this, game.Game.TRACKING_SLOWFOLLOW);
clearBoredWait();
switch (location) {
case game.GameObject.LOCATION_INAIR :
case game.GameObject.LOCATION_ONGROUND :
case game.GameObject.LOCATION_JUSTLANDED :
dx = dx + (dir * MOVE_AMOUNT);
break;
case game.GameObject.LOCATION_ONPAINT :
dx = dx + ((dir * MOVE_AMOUNT) * 0.1);
}
animation(ANIMATION_RUN);
}
function jump() {
gameRef.setMapTracking(this, game.Game.TRACKING_SLOWFOLLOW);
clearBoredWait();
if (location != game.GameObject.LOCATION_INAIR) {
dy = dy + JUMP_AMOUNT;
animation(ANIMATION_JUMP);
}
}
function takeDamage(damage) {
health = health - Math.floor(damage);
}
function isDead() {
return(health <= 0);
}
function myGo() {
unloadWeapon();
alreadyHitBy = new Array();
mc.indicator_mc.gotoAndStop("on");
mc.swapDepths(mc._parent.getNextHighestDepth());
gameRef.setMapTracking(this, game.Game.TRACKING_SLOWFOLLOW);
if (goesToMiss > 0) {
goesToMiss--;
gameRef.myGoIsOver(this);
} else {
goesToMissAnimation = -1;
gameWaitingForMe = true;
setTurnStage(TURN_INITIAL);
}
}
function notMyGo() {
unloadWeapon();
gameWaitingForMe = false;
setTurnStage(TURN_NOTMYTURN);
clearBoredWait();
_onTurnTimeout = null;
_turnTimeout = 0;
mc.indicator_mc.gotoAndStop("off");
}
function setTurnStage(newStage) {
if (turnStage == TURN_DYING) {
}
turnStage = newStage;
switch (turnStage) {
case TURN_INITIAL :
if (this instanceof game.HumanPlayer) {
_turnTimeout = getTimer() + TURNLENGTH_INITIAL_HUMAN;
} else {
_turnTimeout = getTimer() + TURNLENGTH_INITIAL_AI;
}
_onTurnTimeout = uk.kerb.utils.EventDelegate.create(this, playerGoTimeout);
turnStage = TURN_WALKANDCHOOSE;
standThere();
break;
case TURN_WAITFORWEAPON :
_onTurnTimeout = null;
_turnTimeout = 0;
break;
case TURN_WALKONLY :
playerGoFinished();
break;
case TURN_DYING :
_onTurnTimeout = null;
_turnTimeout = 0;
}
}
function playerGoTimeout() {
_onTurnTimeout = null;
_turnTimeout = 0;
bored();
gameRef.myGoIsOver(this);
}
function playerGoFinished() {
_onTurnTimeout = null;
_turnTimeout = 0;
gameRef.myGoIsOver(this);
}
function bored() {
clearBoredWait();
animation(ANIMATION_BORED, uk.kerb.utils.EventDelegate.create(this, standThere));
}
function die() {
clearBoredWait();
_onTurnTimeout = null;
_turnTimeout = 0;
setTurnStage(TURN_DYING);
gameRef.sm.playSound("fx_death");
ignoreMe = true;
gameWaitingForMe = true;
waitingOnAnimation = null;
animation(ANIMATION_DYING, uk.kerb.utils.EventDelegate.create(this, dyingFinished));
gameRef.setMapTracking(this, game.Game.TRACKING_SLOWFOLLOW);
}
function dyingFinished() {
mc._visible = false;
gameWaitingForMe = false;
}
function collide(go) {
return(mc.man_mc.hitTest(go.hitbox_mc));
}
function hitBy(go) {
var _local2 = 0;
while (_local2 < alreadyHitBy.length) {
if (alreadyHitBy[_local2] == go) {
return(true);
}
_local2++;
}
return(false);
}
function hitByWeapon(_weapon) {
if (hitBy(_weapon)) {
return(undefined);
}
if ((_weapon instanceof game.weapon.CloseCombatWeapon) && (_weapon.owner == this)) {
return(undefined);
}
if (!_weapon.collidesWithPlayer) {
return(undefined);
}
alreadyHitBy.push(_weapon);
takeDamage(_weapon.DAMAGE);
if (!((_weapon instanceof game.weapon.Powerup) || (_weapon instanceof game.weapon.CatsAndDogs))) {
var _local3 = Math.floor(Math.random() * 5) + 1;
gameRef.sm.playSound("fx_pain" + _local3, 50);
var _local4 = _weapon.owner.side == side;
gameRef.sideCash[side] = gameRef.sideCash[side] - game.Game.HIT_MONEY;
if (!_local4) {
gameRef.sideCash[_weapon.owner.side] = gameRef.sideCash[_weapon.owner.side] + game.Game.HIT_MONEY;
}
gameRef.updateCashDisplay();
}
if (_weapon instanceof game.weapon.Powerup) {
acquirePowerup(game.weapon.Powerup(_weapon));
} else if (_weapon instanceof game.weapon.BeeHive) {
_weapon.fadeOut(5, null);
game.weapon.BeeHive(_weapon).attack(this);
ignoreMe = true;
gameWaitingForMe = true;
animation(ANIMATION_BEEMAN, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.Bread) {
_weapon.fadeOut(5, null);
game.weapon.Bread(_weapon).attack(this);
ignoreMe = true;
gameWaitingForMe = true;
animation(ANIMATION_PIGEONMAN, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.Anvil) {
_weapon.hide();
gameRef.createGameObject("anvilsmoke", this);
ignoreMe = true;
gameWaitingForMe = true;
gameRef.sm.playSound("fx_anvilhit");
animation(ANIMATION_ANVILMAN, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.Lazer) {
ignoreMe = true;
gameWaitingForMe = true;
mc.onPopBack = uk.kerb.utils.EventDelegate.create(this, popBackFromLazer);
animation(ANIMATION_HITBYLAZER, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.TV) {
goesToMiss = 1;
goesToMissAnimation = ANIMATION_TVMAN;
gameRef.createGameObject("smoke", this);
animation(ANIMATION_TVMAN);
_weapon.fadeOut(5, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, _weapon, "hitBy TV"));
} else if (_weapon instanceof game.weapon.BeerKeg) {
goesToMiss = 1;
goesToMissAnimation = ANIMATION_DRUNKMAN;
gameRef.createGameObject("smoke", this);
gameRef.sm.playSound("fx_sploosh");
gameRef.sm.playSound("fx_gargle", 50);
animation(ANIMATION_DRUNKMAN);
_weapon.fadeOut(5, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, _weapon, "hitBy beerkeg"));
} else if (_weapon instanceof game.weapon.CloseCombatWeapon) {
} else if (_weapon instanceof game.weapon.Arrow) {
game.weapon.Arrow(_weapon).hitObject();
gameRef.sm.playSound("fx_pain");
hitByWeaponAnimFinished(null);
} else if (_weapon instanceof game.weapon.DeadCat) {
ignoreMe = true;
gameWaitingForMe = true;
_weapon.explode();
animation(ANIMATION_GUTSMAN, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.TarFeather) {
ignoreMe = true;
gameWaitingForMe = true;
_weapon.explode();
animation(ANIMATION_TARFEATHER, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.DogShit) {
_weapon.hide();
_weapon.explode();
gameRef.sm.playSound("fx_splat");
animation(ANIMATION_DOGSHIT, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.Dog) {
_weapon.hide();
_weapon.explode();
gameRef.sm.playSound("fx_dog");
animation(ANIMATION_DOGMAUL, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.Condom) {
_weapon.hide();
_weapon.explode();
} else if (_weapon instanceof game.weapon.Boomerang) {
animation(ANIMATION_DAZED, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
_weapon.explode();
} else if (_weapon instanceof game.weapon.Molotov) {
gameRef.sm.playSound("fx_molotov");
hitByWeaponAnimFinished(null);
_weapon.explode();
} else if (_weapon instanceof game.weapon.ExplosionRainingCatsAndDogs) {
} else if (_weapon instanceof game.weapon.CatsAndDogsBullet) {
ignoreMe = true;
gameWaitingForMe = true;
_weapon.explode();
animation(ANIMATION_GUTSMAN, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, _weapon), true);
} else if (_weapon instanceof game.weapon.CatsAndDogs) {
} else {
hitByWeaponAnimFinished(null);
_weapon.explode();
}
}
function popBackFromLazer() {
gameRef.sm.playSound("fx_bounceback");
}
function acquirePowerup(_powerup) {
var _local3 = Math.floor(game.Game.POWERUP_VALUES.length * Math.random());
_powerup.value = game.Game.POWERUP_VALUES[_local3];
gameRef.createGameObject("poweruptaken", _powerup, "powerupTakenValue");
gameRef.powerupFinished(game.weapon.Powerup(_powerup));
gameRef.sideCash[side] = gameRef.sideCash[side] + _powerup.value;
gameRef.updateCashDisplay();
gameRef.setupWeaponButtons();
}
function hitByExplosion(_explosion) {
if (hitBy(_explosion)) {
return(undefined);
}
alreadyHitBy.push(_explosion);
var _local8 = _explosion.weaponRef.owner.side == side;
gameRef.sideCash[side] = gameRef.sideCash[side] - game.Game.HIT_MONEY;
if (!_local8) {
gameRef.sideCash[_explosion.weaponRef.owner.side] = gameRef.sideCash[_explosion.weaponRef.owner.side] + game.Game.HIT_MONEY;
}
gameRef.updateCashDisplay();
if (_explosion instanceof game.weapon.ExplosionSplat) {
avatar.setRecolour(game.weapon.ExplosionSplat(_explosion).colour);
takeDamage(_explosion.DAMAGE);
gameWaitingForMe = true;
animation(ANIMATION_PAINTY, uk.kerb.utils.EventDelegate.create(this, hitByWeaponAnimFinished, null), true);
} else {
var _local5 = x - _explosion.x;
var _local4 = y - (_explosion.y + 10);
var _local6 = (_local5 * _local5) + (_local4 * _local4);
var _local7 = ((Math.atan2(_local4, _local5) * 180) / Math.PI) + 90;
var _local3 = 1000;
if (_local6 != 0) {
_local3 = _local3 / Math.sqrt(_local6);
}
if (_local3 > MAX_BLAST_POWER) {
_local3 = MAX_BLAST_POWER;
}
takeDamage((_explosion.DAMAGE * _local3) / MAX_BLAST_POWER);
_local3 = _local3 * _explosion.FORCE;
if (_local3 > 0) {
dx = uk.kerb.utils.Lookup.getSin(_local7) * _local3;
dy = uk.kerb.utils.Lookup.getCos(_local7) * _local3;
animation(ANIMATION_FLYING, uk.kerb.utils.EventDelegate.create(this, null), true);
gameWaitingForMe = true;
}
}
}
function hitByWeaponAnimFinished(_weapon) {
gameWaitingForMe = false;
ignoreMe = false;
animation(ANIMATION_STAND);
if (_weapon != null) {
gameRef.weaponFinished(_weapon, "hitByWeaponAnimFinished");
}
}
function chooseWeapon(_weapon) {
if (!canChooseWeapon()) {
return(undefined);
}
setTurnStage(TURN_WEAPONCHOSEN);
gameRef.setMapTracking(this, game.Game.TRACKING_SLOWFOLLOW);
unloadWeapon();
weaponLoaded = _weapon;
weaponLoaded.owner = this;
weaponLoaded.hide();
if (weaponLoaded instanceof game.weapon.Arrow) {
gameRef.sm.playSound("fx_creak");
animation(ANIMATION_LOADARROW, uk.kerb.utils.EventDelegate.create(this, startWeaponAiming));
} else if (weaponLoaded instanceof game.weapon.Piss) {
animation(ANIMATION_LOADPISS);
startWeaponAiming();
} else if (weaponLoaded instanceof game.weapon.Gas) {
animation(ANIMATION_LOADGAS, uk.kerb.utils.EventDelegate.create(this, startWeaponAiming));
} else if (weaponLoaded instanceof game.weapon.Lazer) {
animation(ANIMATION_LOADLAZER, uk.kerb.utils.EventDelegate.create(this, startWeaponAiming));
} else {
weaponLoaded.lockToPlayer(this);
mc.onShowWeapon = uk.kerb.utils.EventDelegate.create(weaponLoaded, weaponLoaded.show);
animation(ANIMATION_LOADGENERIC, uk.kerb.utils.EventDelegate.create(this, startWeaponAiming));
}
}
function startWeaponAiming() {
gameRef.readyToAim();
if (weaponLoaded instanceof game.weapon.Arrow) {
animation(ANIMATION_AIMARROW, null, true);
} else if (weaponLoaded instanceof game.weapon.Piss) {
} else if (weaponLoaded instanceof game.weapon.Gas) {
} else if (weaponLoaded instanceof game.weapon.Lazer) {
animation(ANIMATION_AIMLAZER, null, true);
} else {
animation(ANIMATION_AIMGENERIC, null, true);
}
}
function unchooseWeapon(_func) {
if (turnStage != TURN_WEAPONCHOSEN) {
return(undefined);
}
setTurnStage(TURN_WALKANDCHOOSE);
if (weaponLoaded instanceof game.weapon.Arrow) {
animation(ANIMATION_UNLOADARROW, _func, true);
} else if (weaponLoaded instanceof game.weapon.Piss) {
_func();
} else if (weaponLoaded instanceof game.weapon.Gas) {
animation(ANIMATION_UNLOADGAS, _func, true);
} else if (weaponLoaded instanceof game.weapon.Lazer) {
animation(ANIMATION_UNLOADLAZER, _func, true);
} else {
mc.onHideWeapon = uk.kerb.utils.EventDelegate.create(weaponLoaded, weaponLoaded.hide);
animation(ANIMATION_UNLOADGENERIC, _func, true);
}
unloadWeapon();
}
function aimWeapon(_angle) {
_angle = (_angle + 360) % 360;
if (_angle < 180) {
facing = 1;
} else {
facing = -1;
_angle = 360 - _angle;
}
mc.man_mc.aim_mc._rotation = _angle - 90;
}
function setWeaponAim(_angle) {
if (!isAimingWeapon()) {
return(undefined);
}
weaponAngle = _angle;
aimWeapon(_angle);
setTurnStage(TURN_WEAPONLOADED);
}
function setWeaponPower(_power) {
if (!isChoosingPower()) {
return(undefined);
}
weaponPower = _power;
}
function fireWeapon() {
if (!canFireWeapon()) {
return(undefined);
}
setTurnStage(TURN_WAITFORWEAPON);
weaponLoaded.show();
weaponLoaded.fire(weaponAngle, weaponPower);
weaponLoaded.lockToPlayer(this);
gameRef.setMapTracking(weaponLoaded, game.Game.TRACKING_HARDFOLLOW);
if (weaponLoaded instanceof game.weapon.Arrow) {
animation(ANIMATION_FIREARROW, uk.kerb.utils.EventDelegate.create(this, standThere), true);
} else if (weaponLoaded instanceof game.weapon.Lazer) {
animation(ANIMATION_FIRELAZER, uk.kerb.utils.EventDelegate.create(this, lazerFinished), true);
aimWeapon(weaponAngle);
} else if (weaponLoaded instanceof game.weapon.Piss) {
weaponLoaded.mc._xscale = facing * 100;
animation(ANIMATION_FIREPISS, uk.kerb.utils.EventDelegate.create(this, pissingFinished), true);
} else if (weaponLoaded instanceof game.weapon.Gas) {
weaponLoaded.mc._xscale = facing * 100;
animation(ANIMATION_FIREGAS, uk.kerb.utils.EventDelegate.create(this, gasCanisterFinished), true);
} else {
gameRef.sm.playSound("fx_throw");
animation(ANIMATION_FIREGENERIC, uk.kerb.utils.EventDelegate.create(this, standThere), true);
}
gameWaitingForMe = false;
}
function fireWeaponAnimFinished() {
gameWaitingForMe = false;
animation(ANIMATION_STAND);
gameRef.weaponFinished(weaponLoaded, "fireWeaponAnimFinished");
}
function pissingFinished() {
weaponLoaded.fadeOut(10, null);
fireWeaponAnimFinished();
}
function gasCanisterFinished() {
gameRef.sm.stopSound("fx_spray");
weaponLoaded.fadeOut(10, null);
animation(ANIMATION_UNLOADGAS, uk.kerb.utils.EventDelegate.create(this, fireWeaponAnimFinished));
}
function lazerFinished() {
gameRef.sm.stopSound("fx_laser");
weaponLoaded.fadeOut(10, null);
animation(ANIMATION_UNLOADLAZER, uk.kerb.utils.EventDelegate.create(this, fireWeaponAnimFinished));
}
function animation(_anim, _func, force) {
force = ((force == undefined) ? false : (force));
if (currentAnimation == ANIMATION_BORED) {
force = true;
}
if (waitingOnAnimation != null) {
if (force) {
var _local4 = waitingOnAnimation;
waitingOnAnimation = null;
_local4();
} else {
return(undefined);
}
}
clearBoredWait();
currentAnimation = _anim;
if ((_func == undefined) || (_func == null)) {
waitingOnAnimation = null;
super.animation(ANIMATIONS[_anim - 1], null);
} else {
waitingOnAnimation = _func;
super.animation(ANIMATIONS[_anim - 1], uk.kerb.utils.EventDelegate.create(this, animationFinished));
}
avatar.update();
}
function animationFinished() {
var _local2 = waitingOnAnimation;
waitingOnAnimation = null;
_local2();
}
function setBoredWait() {
clearInterval(boredInterval);
boredInterval = setInterval(uk.kerb.utils.EventDelegate.create(this, bored), BORED_WAIT + (Math.random() * BORED_WAIT));
}
function clearBoredWait() {
clearInterval(boredInterval);
boredInterval = -1;
}
function getAvatarRGB() {
return(avatar.getHoodieRGB());
}
function dispose() {
_onTurnTimeout = null;
_turnTimeout = 0;
clearBoredWait();
avatar.dispose();
super.dispose();
}
static var WEIGHT = 1;
static var MAX_HEALTH = 80;
static var JUMP_AMOUNT = 10;
static var MOVE_AMOUNT = 2;
static var ANIMATION_STAND = 1;
static var ANIMATION_RUN = 2;
static var ANIMATION_JUMP = 3;
static var ANIMATION_BORED = 4;
static var ANIMATION_DYING = 5;
static var ANIMATION_FLYING = 6;
static var ANIMATION_LOADGENERIC = 7;
static var ANIMATION_AIMGENERIC = 8;
static var ANIMATION_FIREGENERIC = 9;
static var ANIMATION_UNLOADGENERIC = 10;
static var ANIMATION_LOADARROW = 11;
static var ANIMATION_AIMARROW = 12;
static var ANIMATION_FIREARROW = 13;
static var ANIMATION_UNLOADARROW = 14;
static var ANIMATION_BEEMAN = 15;
static var ANIMATION_PIGEONMAN = 16;
static var ANIMATION_TVMAN = 17;
static var ANIMATION_ANVILMAN = 18;
static var ANIMATION_DRUNKMAN = 19;
static var ANIMATION_LOADPISS = 20;
static var ANIMATION_FIREPISS = 21;
static var ANIMATION_LOADGAS = 22;
static var ANIMATION_FIREGAS = 23;
static var ANIMATION_UNLOADGAS = 24;
static var ANIMATION_LOADLAZER = 25;
static var ANIMATION_AIMLAZER = 26;
static var ANIMATION_FIRELAZER = 27;
static var ANIMATION_UNLOADLAZER = 28;
static var ANIMATION_SOOTY = 29;
static var ANIMATION_PAINTY = 30;
static var ANIMATION_HITBYLAZER = 31;
static var ANIMATION_GUTSMAN = 32;
static var ANIMATION_TARFEATHER = 33;
static var ANIMATION_DOGSHIT = 34;
static var ANIMATION_EGGMAN = 35;
static var ANIMATION_DOGMAUL = 36;
static var ANIMATION_DAZED = 37;
static var ANIMATIONS = ["stand", "run", "jump", "bored", "dying", "flying", "loadgeneric", "aimgeneric", "firegeneric", "unloadgeneric", "loadarrow", "aimarrow", "firearrow", "unloadarrow", "beeman", "pigeonman", "tvman", "anvilman", "drunkman", "loadpiss", "firepiss", "loadgas", "firegas", "unloadgas", "loadlazer", "aimlazer", "firelazer", "unloadlazer", "sootman", "paintman", "lazerhit", "gutsman", "tarfeather", "dogshit", "eggman", "dogmaul", "dazed"];
static var PLAYERMOVE_LEFT = 0;
static var PLAYERMOVE_RIGHT = 1;
static var PLAYERMOVE_JUMP = 2;
static var BORED_WAIT = 5000;
static var MAN_SCALE = 20;
static var MAX_BLAST_POWER = 25;
static var TURN_NOTMYTURN = 0;
static var TURN_INITIAL = 1;
static var TURN_WALKANDCHOOSE = 2;
static var TURN_WEAPONCHOSEN = 3;
static var TURN_WEAPONLOADED = 4;
static var TURN_WAITFORWEAPON = 5;
static var TURN_WALKONLY = 6;
static var TURN_DYING = 7;
static var TURNLENGTH_INITIAL_HUMAN = 30000;
static var TURNLENGTH_INITIAL_AI = 15000;
static var TURNLENGTH_FINAL = 0;
var boredInterval = -1;
var _turnTimeout = -1;
var _onTurnTimeout = null;
var _lastTimer = 0;
}
Symbol 2054 MovieClip [__Packages.game.Avatar] Frame 0
class game.Avatar
{
var mc, skinColour, hair, hairColour, eyes, eyeColour, mouth, clothes, clothesColour, shoes, headgear, accessory, hoodieColour, reColour;
function Avatar (mc, styleString) {
this.mc = mc;
var _local2 = styleString.split(",");
skinColour = parseInt(_local2[0], 16);
hair = parseInt(_local2[1]);
hairColour = parseInt(_local2[2], 16);
eyes = parseInt(_local2[3]);
eyeColour = parseInt(_local2[4], 16);
mouth = parseInt(_local2[5]);
clothes = parseInt(_local2[6]);
clothesColour = parseInt(_local2[7], 16);
shoes = parseInt(_local2[8]);
headgear = parseInt(_local2[9]);
accessory = parseInt(_local2[10]);
hoodieColour = parseInt(_local2[12]);
if (isNaN(eyes)) {
eyes = 1;
}
if (isNaN(mouth)) {
mouth = 1;
}
if (isNaN(clothes)) {
clothes = 1;
}
if (isNaN(shoes)) {
shoes = 1;
}
if (isNaN(hair)) {
hair = 0;
}
if (isNaN(headgear)) {
headgear = 0;
}
if (isNaN(accessory)) {
accessory = 0;
}
mc.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, update);
}
function getHoodieRGB() {
switch (hoodieColour) {
case 1 :
return(10040217);
case 2 :
return(13260);
case 3 :
return(16737792);
case 4 :
return(16764169);
}
return(16777215);
}
function dispose() {
delete mc.onEnterFrame;
}
function setRecolour(_reColour) {
reColour = _reColour;
}
function update() {
if (!isNaN(reColour)) {
new Color(mc.man_mc.colour_mc).setRGB(reColour);
}
mc.man_mc.colour1_mc.gotoAndStop(hoodieColour);
mc.man_mc.colour2_mc.gotoAndStop(hoodieColour);
}
}
Symbol 2055 MovieClip [__Packages.game.HumanPlayer] Frame 0
class game.HumanPlayer extends game.Player
{
function HumanPlayer (mc, gameRef, side, avatar) {
super(mc, gameRef, side, avatar);
}
}
Symbol 2056 MovieClip [__Packages.game.weapon.CloseCombatWeapon] Frame 0
class game.weapon.CloseCombatWeapon extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, mc;
function CloseCombatWeapon (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0;
WINDEFFECT = 0;
DAMAGE = 0;
}
function isArmed() {
return(true);
}
function fire(angle, power) {
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
}
}
Symbol 2057 MovieClip [__Packages.game.weapon.Powerup] Frame 0
class game.weapon.Powerup extends game.weapon.Weapon
{
var WEIGHT, x, y, lifeTime, fade, fadeOut, gameRef, mc, dx, dy;
function Powerup (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.2;
}
function isArmed() {
return(true);
}
function isFinished() {
return(((x > (game.Game.PLAY_WIDTH + 50)) || (x < -50)) || (y > game.Game.SCREEN_HEIGHT));
}
function update() {
super.update();
if ((lifeTime > POWERUP_LIFE) && (fade == 0)) {
fadeOut(5, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.powerupFinished, this));
}
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
}
function collisionReaction() {
var _local3 = super.collisionReaction();
dx = dx * 0.8;
dy = dy * 0.4;
return(_local3);
}
function waitForMe() {
return(false);
}
static var POWERUP_LIFE = 1000;
}
Symbol 2058 MovieClip [__Packages.game.weapon.CatsAndDogs] Frame 0
class game.weapon.CatsAndDogs extends game.weapon.Weapon
{
var usePowerBar, WEIGHT, WINDEFFECT, DAMAGE, collisionDetection, setScale, y, x, direction, mc, dy, dx, fired, simulation, gameRef;
function CatsAndDogs (mc, gameRef) {
super(mc, gameRef);
usePowerBar = false;
WEIGHT = 0;
WINDEFFECT = 0;
DAMAGE = 0;
collisionDetection = game.GameObject.COLLISION_NONE;
setScale(7);
mc.dropCatsAndDogs = uk.kerb.utils.EventDelegate.create(this, dropCatsAndDogs);
mc.playThunder = uk.kerb.utils.EventDelegate.create(this, playThunder);
}
function isArmed() {
return(y == SKY_Y);
}
function isFinished() {
return((x > (game.Game.PLAY_WIDTH + 50)) || (x < -50));
}
function fire(angle, power) {
angle = (angle + 360) % 360;
if ((angle > 90) && (angle < 270)) {
if (angle < 180) {
angle = 180 - angle;
} else {
angle = 540 - angle;
}
}
if (angle > 180) {
direction = -1;
} else {
direction = 1;
}
super.fire(angle, power);
mc.play();
}
function update() {
if (y > SKY_Y) {
dy = dy * 2;
dx = 0;
} else {
dy = 0;
y = SKY_Y;
dx = direction * 10;
}
if (fired && (mc._xscale < 100)) {
mc._xscale = mc._xscale + (0.4 * (100 - mc._xscale));
mc._yscale = mc._yscale + (0.4 * (100 - mc._yscale));
}
super.update();
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
}
function dropCatsAndDogs(num, dir) {
if ((!simulation) && (dir == direction)) {
gameRef.createGameObject("catsanddogsbullet" + num, this);
}
}
function playThunder() {
gameRef.sm.playSound("fx_thunder", 100);
}
var SKY_Y = 0;
}
Symbol 2059 MovieClip [__Packages.game.weapon.BeeHive] Frame 0
class game.weapon.BeeHive extends game.weapon.Weapon
{
var bees, WEIGHT, WINDEFFECT, DAMAGE, setScale, dx, dy, location, fadeOut, gameRef, simulation;
function BeeHive (mc, gameRef) {
super(mc, gameRef);
bees = new Array();
WEIGHT = 0.3;
WINDEFFECT = 0.1;
DAMAGE = 20;
setScale(50);
}
function update() {
if ((bees.length < FOLLOWING_BEES) && (Math.random() < 0.2)) {
addBee();
}
super.update();
}
function collisionReaction() {
var _local3 = super.collisionReaction();
dx = dx * 0.8;
dy = dy * 0.7;
if ((location == game.GameObject.LOCATION_ONGROUND) && (Math.abs(dx) < 1)) {
fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction beeHive"));
}
return(_local3);
}
function addBee() {
if (!simulation) {
bees.push(gameRef.createGameObject("bee", this));
}
}
function attack(player) {
var _local2 = 0;
while (_local2 < 20) {
addBee();
_local2++;
}
_local2 = 0;
while (_local2 < bees.length) {
game.weapon.Bee(bees[_local2]).tracking = player;
_local2++;
}
}
function fire(_angle, _power) {
super.fire(_angle, _power);
if (!simulation) {
gameRef.sm.playSound("fx_bees", 100, 99999, 2);
}
}
function dispose() {
if (!simulation) {
var _local3 = 0;
while (_local3 < bees.length) {
game.weapon.Bee(bees[_local3]).tracking = null;
bees[_local3].fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.removeGO, bees[_local3]));
_local3++;
}
gameRef.sm.stopSound("fx_bees", 1);
}
super.dispose();
}
static var FOLLOWING_BEES = 25;
}
Symbol 2060 MovieClip [__Packages.game.weapon.TrackingObject] Frame 0
class game.weapon.TrackingObject extends game.GameObject
{
var tracking, phase, phaseSpeed, collisionDetection, dx, x, dy, y;
function TrackingObject (mc, gameRef, tracking) {
super(mc, gameRef);
this.tracking = tracking;
phase = Math.floor(Math.random() * 360);
phaseSpeed = Math.random() * 30;
collisionDetection = game.GameObject.COLLISION_NONE;
}
function waitForMe() {
return(true);
}
function update() {
if (tracking != null) {
dx = dx + (((tracking.x - x) * FOLLOW_AMOUNT) + (uk.kerb.utils.Lookup.getSin(phase) * PHASE_AMOUNT));
dy = dy - (((tracking.y - y) * FOLLOW_AMOUNT) + (uk.kerb.utils.Lookup.getCos(phase) * PHASE_AMOUNT));
}
phase = (phase + phaseSpeed) % 360;
if (dx > MAX_DXY) {
dx = MAX_DXY;
}
if (dx < (-MAX_DXY)) {
dx = -MAX_DXY;
}
if (dy > MAX_DXY) {
dy = MAX_DXY;
}
if (dy < (-MAX_DXY)) {
dy = -MAX_DXY;
}
super.update();
}
var PHASE_AMOUNT = 0.15;
var MAX_DXY = 8;
var FOLLOW_AMOUNT = 0.01;
}
Symbol 2061 MovieClip [__Packages.uk.kerb.utils.Lookup] Frame 0
class uk.kerb.utils.Lookup
{
static var granularity, sinTable, cosTable;
function Lookup () {
}
static function initialise(_granularity) {
granularity = ((_granularity == undefined) ? 1 : (_granularity));
sinTable = new Array(360 * granularity);
cosTable = new Array(360 * granularity);
var _local1 = 0;
while (_local1 < (360 * granularity)) {
sinTable[_local1] = Math.sin(((_local1 * Math.PI) / 180) / granularity);
cosTable[_local1] = Math.cos(((_local1 * Math.PI) / 180) / granularity);
_local1++;
}
}
static function getSin(angle) {
while (angle < 0) {
angle = angle + 360;
}
return(sinTable[Math.floor((angle % 360) * granularity)]);
}
static function getCos(angle) {
while (angle < 0) {
angle = angle + 360;
}
return(cosTable[Math.floor((angle % 360) * granularity)]);
}
}
Symbol 2062 MovieClip [__Packages.game.weapon.Bee] Frame 0
class game.weapon.Bee extends game.weapon.TrackingObject
{
function Bee (mc, gameRef, tracking) {
super(mc, gameRef, tracking);
}
}
Symbol 2063 MovieClip [__Packages.game.weapon.Bread] Frame 0
class game.weapon.Bread extends game.weapon.Weapon
{
var pigeons, WEIGHT, WINDEFFECT, DAMAGE, dx, dy, location, fadeOut, gameRef, simulation;
function Bread (mc, gameRef) {
super(mc, gameRef);
pigeons = new Array();
WEIGHT = 0.3;
WINDEFFECT = 0.1;
DAMAGE = 20;
}
function update() {
if ((pigeons.length < FOLLOWING_PIGEONS) && (Math.random() < 0.2)) {
addPigeon();
}
super.update();
}
function collisionReaction() {
var _local3 = super.collisionReaction();
dx = dx * 0.8;
dy = dy * 0.8;
if ((location == game.GameObject.LOCATION_ONGROUND) && (Math.abs(dx) < 1)) {
fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction bread"));
}
return(_local3);
}
function addPigeon() {
if (!simulation) {
pigeons.push(gameRef.createGameObject("pigeon", this));
}
}
function attack(player) {
var _local2 = 0;
while (_local2 < 20) {
addPigeon();
_local2++;
}
_local2 = 0;
while (_local2 < pigeons.length) {
game.weapon.Pigeon(pigeons[_local2]).tracking = player;
_local2++;
}
}
function fire(_angle, _power) {
super.fire(_angle, _power);
if (!simulation) {
gameRef.sm.playSound("fx_birds", 100, 99999, 2);
}
}
function dispose() {
if (!simulation) {
var _local3 = 0;
while (_local3 < pigeons.length) {
game.weapon.Pigeon(pigeons[_local3]).tracking = null;
pigeons[_local3].fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.removeGO, pigeons[_local3]));
_local3++;
}
gameRef.sm.stopSound("fx_birds", 1);
}
super.dispose();
}
static var FOLLOWING_PIGEONS = 5;
}
Symbol 2064 MovieClip [__Packages.game.weapon.Pigeon] Frame 0
class game.weapon.Pigeon extends game.weapon.TrackingObject
{
var mc;
function Pigeon (mc, gameRef, tracking) {
super(mc, gameRef, tracking);
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
if (dx < 0) {
mc._xscale = -100;
} else {
mc._xscale = 100;
}
}
}
Symbol 2065 MovieClip [__Packages.game.weapon.Anvil] Frame 0
class game.weapon.Anvil extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, setScale, fadeOut, gameRef;
function Anvil (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.5;
WINDEFFECT = 0;
DAMAGE = 30;
setScale(50);
}
function collisionReaction() {
fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction anvil"));
return(true);
}
}
Symbol 2066 MovieClip [__Packages.game.weapon.Lazer] Frame 0
class game.weapon.Lazer extends game.weapon.CloseCombatWeapon
{
var usePowerBar, lazerAngle, DAMAGE, lazerScale, animation, mc, simulation, gameRef, setPos;
function Lazer (mc, gameRef) {
super(mc, gameRef);
usePowerBar = false;
lazerAngle = 0;
DAMAGE = 30;
lazerScale = 0;
}
function fire(_angle, _power) {
animation("use", null);
super.fire(_angle, _power);
lazerAngle = _angle;
mc._rotation = lazerAngle;
if (!simulation) {
mc.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, paintFrame);
gameRef.sm.playSound("fx_laserbeam", 100, 99999);
}
}
function pauseGO() {
super.pauseGO();
delete mc.onEnterFrame;
}
function runGO() {
super.runGO();
if (!simulation) {
mc.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, paintFrame);
}
}
function lockToPlayer(p) {
setPos(p.x + (uk.kerb.utils.Lookup.getSin(lazerAngle) * 120), p.y - (uk.kerb.utils.Lookup.getCos(lazerAngle) * 120));
}
function paintFrame() {
if (lazerScale < 100) {
lazerScale = lazerScale + 5;
gameRef.destroyEnvironment(this, "destroylazer_mc", lazerScale, lazerAngle);
}
}
function dispose() {
if (!simulation) {
gameRef.sm.stopSound("fx_laserbeam");
}
super.dispose();
}
function setClipRotation(dx, dy) {
}
}
Symbol 2067 MovieClip [__Packages.game.weapon.TV] Frame 0
class game.weapon.TV extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, setScale, fadeOut, gameRef;
function TV (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.4;
WINDEFFECT = 0;
DAMAGE = 20;
setScale(50);
}
function collisionReaction() {
fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction tv"));
return(true);
}
}
Symbol 2068 MovieClip [__Packages.game.weapon.BeerKeg] Frame 0
class game.weapon.BeerKeg extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, setScale, dx, dy, location, fadeOut, gameRef, simulation;
function BeerKeg (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0.1;
DAMAGE = 20;
setScale(50);
}
function collisionReaction() {
var _local3 = super.collisionReaction();
dx = dx * 0.4;
dy = dy * 0.7;
if ((location == game.GameObject.LOCATION_ONGROUND) && (Math.abs(dx) < 1.5)) {
fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction keg"));
}
if (((Math.abs(dx) + Math.abs(dy)) > 5) && (!simulation)) {
gameRef.sm.playSound("fx_clunk");
}
return(_local3);
}
function setClipRotation(dx, dy) {
if (location != game.GameObject.LOCATION_ONGROUND) {
super.setClipRotation(dx, dy);
}
}
}
Symbol 2069 MovieClip [__Packages.game.weapon.Arrow] Frame 0
class game.weapon.Arrow extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, setCollisionMap, hitbox_mc, simulation, gameRef, animation, fadeOut, setPos;
function Arrow (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.2;
WINDEFFECT = 0.2;
DAMAGE = 13;
setCollisionMap("collidearrow_mc");
hitbox_mc = mc.collide_mc;
hitbox_mc._visible = false;
}
function fire(_angle, _power) {
if (!simulation) {
gameRef.sm.playSound("fx_firearrow");
}
super.fire(_angle, _power);
}
function collisionReaction() {
if (!simulation) {
gameRef.sm.playSound("fx_arrowembed");
}
hitObject();
return(true);
}
function hitObject() {
animation("embed");
fadeOut(5, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "arrow hitObject"));
}
function lockToPlayer(p) {
setPos(p.x, p.y);
}
}
Symbol 2070 MovieClip [__Packages.game.weapon.Explosion] Frame 0
class game.weapon.Explosion extends game.GameObject
{
var weaponRef, collisionDetection, gameRef;
function Explosion (mc, gameRef, weaponRef) {
super(mc, gameRef);
this.weaponRef = weaponRef;
mc.onKaboom = uk.kerb.utils.EventDelegate.create(this, onExplode);
mc.onAnimationFinished = uk.kerb.utils.EventDelegate.create(this, onFinishedExplosion);
collisionDetection = game.GameObject.COLLISION_NONE;
}
function waitForMe() {
return(true);
}
function onExplode() {
}
function onFinishedExplosion() {
gameRef.removeGO(this);
}
var DAMAGE = 0;
var FORCE = 0;
}
Symbol 2071 MovieClip [__Packages.game.weapon.TarFeather] Frame 0
class game.weapon.TarFeather extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, fadeOut, gameRef, hide;
function TarFeather (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0;
DAMAGE = 13;
}
function collisionReaction() {
explode();
fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction tarfeather"));
return(true);
}
function explode() {
super.explode();
hide();
gameRef.explode(this, game.weapon.ExplosionTar, "explodetar_mc");
}
}
Symbol 2072 MovieClip [__Packages.game.weapon.ExplosionTar] Frame 0
class game.weapon.ExplosionTar extends game.weapon.Explosion
{
var FORCE, DAMAGE;
function ExplosionTar (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
FORCE = 0;
DAMAGE = 10;
gameRef.sm.playSound("fx_cock");
gameRef.sm.playSound("fx_sploosh");
}
}
Symbol 2073 MovieClip [__Packages.game.weapon.DogShit] Frame 0
class game.weapon.DogShit extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, dx, dy, location, gameRef, fadeOut;
function DogShit (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0;
DAMAGE = 13;
}
function collisionReaction() {
var _local3 = super.collisionReaction();
dx = dx * 0.6;
dy = dy * 0.5;
if ((location == game.GameObject.LOCATION_ONGROUND) && (Math.abs(dx) < 1.5)) {
gameRef.sm.playSound("fx_sploosh");
fadeOut(30, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction dogpoo"));
}
return(_local3);
}
}
Symbol 2074 MovieClip [__Packages.game.weapon.Dog] Frame 0
class game.weapon.Dog extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, fadeOut, gameRef;
function Dog (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0;
DAMAGE = 32;
}
function collisionReaction() {
explode();
return(true);
}
function explode() {
super.explode();
fadeOut(10, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction dog"));
gameRef.sm.playSound("fx_bark");
}
}
Symbol 2075 MovieClip [__Packages.game.weapon.Condom] Frame 0
class game.weapon.Condom extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, collidesWithPlayer, setScale, colour, mc, hide, gameRef;
function Condom (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0.2;
DAMAGE = 32;
collidesWithPlayer = true;
setScale(50);
colour = 16249824 /* 0xF7F3E0 */;
}
function collisionReaction() {
explode();
return(true);
}
function setClipRotation(dx, dy) {
mc._rotation = mc._rotation + (0.1 * (((Math.atan2(-dy, dx) * 180) / Math.PI) + 90));
}
function explode() {
super.explode();
hide();
gameRef.sm.playSound("fx_splat");
gameRef.explode(this, game.weapon.ExplosionCondom, "explodepaint_mc");
}
}
Symbol 2076 MovieClip [__Packages.game.weapon.ExplosionSplat] Frame 0
class game.weapon.ExplosionSplat extends game.weapon.Explosion
{
var DAMAGE, FORCE, splatScale, mc;
function ExplosionSplat (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
DAMAGE = 0;
FORCE = 0;
splatScale = 0;
gameRef.sm.playSound("fx_splat");
mc.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, paintFrame);
}
function paintFrame() {
}
function colourClip() {
new Color(mc).setRGB(colour);
}
var colour = 0;
}
Symbol 2077 MovieClip [__Packages.game.weapon.ExplosionCondom] Frame 0
class game.weapon.ExplosionCondom extends game.weapon.ExplosionSplat
{
var colour, DAMAGE, splatScale, gameRef, weaponRef, colourClip;
function ExplosionCondom (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
colour = game.weapon.Condom(weaponRef).colour;
DAMAGE = 1;
}
function paintFrame() {
if (splatScale < 100) {
splatScale = splatScale + 5;
gameRef.paintSplatEnvironment(weaponRef, "splat_mc", splatScale);
}
colourClip();
}
}
Symbol 2078 MovieClip [__Packages.game.weapon.Boomerang] Frame 0
class game.weapon.Boomerang extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, mc, fadeOut, gameRef;
function Boomerang (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0;
DAMAGE = 20;
}
function collisionReaction() {
explode();
return(true);
}
function explode() {
mc.gotoAndStop("hold");
super.explode();
fadeOut(10, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "explode boomerang"));
gameRef.sm.stopSound("fx_boomerang");
gameRef.sm.playSound("fx_boomeranghit");
}
function fire(angle, power) {
super.fire(angle, power);
gameRef.sm.playSound("fx_boomerang");
mc.gotoAndStop("throw");
}
}
Symbol 2079 MovieClip [__Packages.game.weapon.Molotov] Frame 0
class game.weapon.Molotov extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, gameRef;
function Molotov (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0.2;
DAMAGE = 0;
}
function collisionReaction() {
explode();
return(true);
}
function explode() {
super.explode();
gameRef.explode(this, game.weapon.ExplosionMolotov, "explodemolotov_mc");
}
}
Symbol 2080 MovieClip [__Packages.game.weapon.ExplosionMolotov] Frame 0
class game.weapon.ExplosionMolotov extends game.weapon.Explosion
{
var DAMAGE, FORCE, gameRef, weaponRef;
function ExplosionMolotov (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
if (weaponRef.y > (game.Game.GROUND_HEIGHT - 20)) {
gameRef.createGameObject("dirtcloud", weaponRef);
}
DAMAGE = 32;
FORCE = 0.2;
gameRef.sm.playSound("fx_explosion");
}
function onExplode() {
gameRef.destroyEnvironment(weaponRef, "destroysmall_mc");
gameRef.weaponFinished(weaponRef, "onExplode");
}
}
Symbol 2081 MovieClip [__Packages.game.weapon.ExplosionRainingCatsAndDogs] Frame 0
class game.weapon.ExplosionRainingCatsAndDogs extends game.weapon.Explosion
{
var DAMAGE, FORCE, gameRef, weaponRef;
function ExplosionRainingCatsAndDogs (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
DAMAGE = 15;
FORCE = 0.2;
}
function onExplode() {
gameRef.weaponFinished(weaponRef, "onExplode");
}
}
Symbol 2082 MovieClip [__Packages.game.weapon.CatsAndDogsBullet] Frame 0
class game.weapon.CatsAndDogsBullet extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, dy, r, rStep, mc, gameRef, ignoreMe;
function CatsAndDogsBullet (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0;
WINDEFFECT = 0;
DAMAGE = 27;
dy = -16;
r = 0;
rStep = 3 + (Math.random() * 3);
if (Math.random() < 0.5) {
rStep = -rStep;
}
}
function collisionReaction() {
explode();
return(true);
}
function waitForMe() {
return(true);
}
function explode() {
super.explode();
if (mc._name.indexOf("cat") != -1) {
gameRef.explode(this, game.weapon.ExplosionRainingCatsAndDogs, "exploderainingcat_mc");
} else {
gameRef.explode(this, game.weapon.ExplosionRainingCatsAndDogs, "exploderainingdog_mc");
}
gameRef.sm.playSound("fx_splat");
}
function update() {
super.update();
if (!ignoreMe) {
r = r + rStep;
mc._rotation = r;
}
}
}
Symbol 2083 MovieClip [__Packages.game.weapon.Piss] Frame 0
class game.weapon.Piss extends game.weapon.CloseCombatWeapon
{
var usePowerBar, DAMAGE, animation, setPos;
function Piss (mc, gameRef) {
super(mc, gameRef);
usePowerBar = false;
DAMAGE = 5;
}
function fire(_angle, _power) {
animation("use", null);
super.fire(_angle, _power);
}
function lockToPlayer(p) {
setPos(p.x + (p.facing * 5), p.y - 8);
}
}
Symbol 2084 MovieClip [__Packages.game.weapon.Gas] Frame 0
class game.weapon.Gas extends game.weapon.CloseCombatWeapon
{
var usePowerBar, DAMAGE, animation, simulation, gameRef, setPos;
function Gas (mc, gameRef) {
super(mc, gameRef);
usePowerBar = false;
DAMAGE = 10;
}
function fire(_angle, _power) {
animation("use", null);
if (!simulation) {
gameRef.sm.playSound("fx_spray", 100, 99999);
}
super.fire(_angle, _power);
}
function lockToPlayer(p) {
setPos(p.x + (p.facing * 15), p.y - 5);
}
function dispose() {
if (!simulation) {
gameRef.sm.stopSound("fx_spray");
}
super.dispose();
}
}
Symbol 2085 MovieClip [__Packages.game.weapon.DeadCat] Frame 0
class game.weapon.DeadCat extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, fadeOut, gameRef, hide;
function DeadCat (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0;
DAMAGE = 7;
}
function collisionReaction() {
explode();
fadeOut(15, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "collisionReaction deadcat"));
return(true);
}
function explode() {
super.explode();
hide();
gameRef.explode(this, game.weapon.ExplosionCat, "explodecat_mc");
gameRef.sm.playSound("fx_sploosh");
}
}
Symbol 2086 MovieClip [__Packages.game.weapon.ExplosionCat] Frame 0
class game.weapon.ExplosionCat extends game.weapon.Explosion
{
var FORCE, DAMAGE;
function ExplosionCat (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
FORCE = 0;
DAMAGE = 10;
}
}
Symbol 2087 MovieClip [__Packages.game.weapon.Bomb] Frame 0
class game.weapon.Bomb extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, countDown, lifeTime, mc, simulation, gameRef, ignoreMe, dx, dy;
function Bomb (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.4;
WINDEFFECT = 0.1;
DAMAGE = 0;
countDown = Math.ceil(((LIFETIME_DESTRUCT - lifeTime) * 5) / LIFETIME_DESTRUCT);
setTimer();
}
function setTimer() {
var _local2 = Math.ceil(((LIFETIME_DESTRUCT - lifeTime) * 5) / LIFETIME_DESTRUCT);
if (_local2 != countDown) {
mc.countdown_txt.text = _local2;
if (!simulation) {
gameRef.sm.playSound("fx_timebomb");
}
countDown = _local2;
}
}
function update() {
super.update();
setTimer();
if ((lifeTime >= LIFETIME_DESTRUCT) && (!ignoreMe)) {
explode();
}
}
function collisionReaction() {
var _local3 = super.collisionReaction();
dx = dx * 0.8;
dy = dy * 0.8;
return(_local3);
}
function explode() {
super.explode();
gameRef.explode(this, game.weapon.ExplosionSmall, "explodesmall_mc");
}
var LIFETIME_DESTRUCT = 125;
}
Symbol 2088 MovieClip [__Packages.game.weapon.ExplosionSmall] Frame 0
class game.weapon.ExplosionSmall extends game.weapon.Explosion
{
var DAMAGE, FORCE, gameRef, weaponRef;
function ExplosionSmall (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
if (weaponRef.y > (game.Game.GROUND_HEIGHT - 20)) {
gameRef.createGameObject("dirtcloud", weaponRef);
}
DAMAGE = 32;
FORCE = 0.2;
gameRef.sm.playSound("fx_explosion");
}
function onExplode() {
gameRef.destroyEnvironment(weaponRef, "destroysmall_mc");
gameRef.weaponFinished(weaponRef, "onExplode");
}
}
Symbol 2089 MovieClip [__Packages.game.weapon.Sheep] Frame 0
class game.weapon.Sheep extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, setScale, mc, gameRef;
function Sheep (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.15;
WINDEFFECT = 1;
DAMAGE = 5;
setScale(50);
}
function collisionReaction() {
explode();
return(true);
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
}
function explode() {
super.explode();
gameRef.explode(this, game.weapon.ExplosionBig, "explodebig_mc");
}
}
Symbol 2090 MovieClip [__Packages.game.weapon.ExplosionBig] Frame 0
class game.weapon.ExplosionBig extends game.weapon.Explosion
{
var DAMAGE, FORCE, gameRef, weaponRef;
function ExplosionBig (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
if (weaponRef.y > (game.Game.GROUND_HEIGHT - 20)) {
gameRef.attachClip("dirt_mc", weaponRef.x, weaponRef.y);
}
DAMAGE = 10;
FORCE = 0.5;
gameRef.sm.playSound("fx_explosion2");
}
function onExplode() {
gameRef.destroyEnvironment(weaponRef, "destroybig_mc");
gameRef.weaponFinished(weaponRef, "onExplode");
}
}
Symbol 2091 MovieClip [__Packages.game.Game] Frame 0
class game.Game extends main.AbstractSection implements main.ISection
{
static var WEAPONS, MAP_WIDTH, MAP_HEIGHT;
var sm, useKeyboard, secretWeaponNum, mc, active, secretWeaponButton, accessibleButtons, accessibleLabels, currAccessibleButton, ticker, sideCash, aiming, popupWindowShowing, gameState, totalTime, elapsedTime, lastTime, timeOfLastDrop, players, powerups, ground_bmp, paintmask_bmp, groundmask_bmp, smallmap_bmp, powerGauge, startTime, firstGO, chosenWeapon, dirArrow, aimAngle, tracking, trackingType, beepsPlaying, dispatchEvent, lastGO, introCompleteHandler, outroCompleteHandler;
function Game (mc, sm, useKeyboard) {
super(mc);
this.sm = sm;
this.useKeyboard = useKeyboard;
}
function resetSecretWeapon() {
WEAPONS = [["weapon_egg", game.weapon.Egg, 999999999, 1, 999999999, 3], ["weapon_tarfeather", game.weapon.TarFeather, 999999999, 1, 999999999, 20], ["weapon_paintbucket", game.weapon.PaintBucket, 999999999, 1, 999999999, 6], ["weapon_boomerang", game.weapon.Boomerang, 999999999, 1, 999999999, 20], ["weapon_arrow", game.weapon.Arrow, 999999999, 1, 999999999, 4], ["weapon_beehive", game.weapon.BeeHive, 999999999, 1, 999999999, 20], ["weapon_beerkeg", game.weapon.BeerKeg, 999999999, 1, 999999999, 10], ["weapon_dogshit", game.weapon.DogShit, 999999999, 1, 999999999, 2], ["weapon_catsndogs", game.weapon.CatsAndDogs, 999999999, 1, 999999999, 40]];
if (secretWeaponNum != null) {
mc.weaponbar_mc[("secretIcon" + secretWeaponNum) + "_mc"]._visible = false;
secretWeaponNum = null;
}
}
function init() {
if (!active) {
var _local4 = main.Main.getInstance().getGameState();
mc.quit_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showQuitDialogue);
mc.help_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showInstructions);
mc.sound_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, toggleSound);
if (!sm.isSoundOn()) {
mc.sound_btn.icon_mc.gotoAndStop("off");
}
var _local3 = main.Main.getInstance().getPlayerColour(0);
mc.team1char_mc.colour1_mc.gotoAndStop(_local3);
mc.team1char_mc.colour2_mc.gotoAndStop(_local3);
_local3 = main.Main.getInstance().getPlayerColour(1);
mc.team2char_mc.colour1_mc.gotoAndStop(_local3);
mc.team2char_mc.colour2_mc.gotoAndStop(_local3);
var _local2 = 0;
while (_local2 < 6) {
mc.weaponbar_mc[("weapon" + (_local2 + 9)) + "_btn"]._visible = _local2 == secretWeaponNum;
mc.weaponbar_mc[("weapon" + (_local2 + 9)) + "_btn"].tabEnabled = false;
_local2++;
}
if (secretWeaponNum != null) {
secretWeaponButton = mc.weaponbar_mc[("weapon" + (secretWeaponNum + 9)) + "_btn"];
}
mc.weaponbar_mc.weaponLocked_btn._visible = secretWeaponNum == null;
mc.weaponbar_mc.weaponLocked_btn.tabEnabled = false;
mc.weaponbar_mc.shim_mc._visible = secretWeaponNum != null;
accessibleButtons = [null, mc.weaponbar_mc.weapon0_btn, mc.weaponbar_mc.weapon1_btn, mc.weaponbar_mc.weapon2_btn, mc.weaponbar_mc.weapon3_btn, mc.weaponbar_mc.weapon4_btn, mc.weaponbar_mc.weapon5_btn, mc.weaponbar_mc.weapon6_btn, mc.weaponbar_mc.weapon7_btn, mc.weaponbar_mc.weapon8_btn, mc.pause_btn, mc.quit_btn, mc.help_btn, mc.sound_btn];
accessibleLabels = [[null, null], ["off", "on"], ["off", "on"], ["off", "on"], ["off", "on"], ["off", "on"], ["off", "on"], ["off", "on"], ["off", "on"], ["off", "on"], ["_up", "_over"], ["_up", "_over"], ["_up", "_over"], ["_up", "_over"]];
if (secretWeaponNum == null) {
accessibleButtons.splice(10, 0, mc.weaponbar_mc.weaponLocked_btn);
accessibleLabels.splice(10, 0, ["off", "on"]);
} else {
accessibleButtons.splice(10, 0, mc.weaponbar_mc[("weapon" + (secretWeaponNum + 9)) + "_btn"]);
accessibleLabels.splice(10, 0, ["off", "on"]);
}
currAccessibleButton = 0;
_local2 = 0;
while (_local2 < accessibleButtons.length) {
accessibleButtons[_local2].tabEnabled = false;
_local2++;
}
ticker = 0;
sideCash = [INITIAL_CASH, INITIAL_CASH];
updateCashDisplay();
aiming = false;
popupWindowShowing = false;
setup(_local4);
active = true;
if (useKeyboard) {
Key.addListener(this);
}
gameIsReady();
}
}
function activateSecretWeapon(weaponNum) {
resetSecretWeapon();
WEAPONS.push(SECRET_WEAPONS[weaponNum]);
mc.weaponbar_mc[("secretIcon" + weaponNum) + "_mc"]._visible = true;
secretWeaponNum = weaponNum;
}
function setKeyboardControl(useKeyboard) {
this.useKeyboard = useKeyboard;
}
function toggleSound() {
if (sm.isSoundOn()) {
sm.soundOff();
mc.sound_btn.icon_mc.gotoAndStop("off");
} else {
sm.soundOn();
mc.sound_btn.icon_mc.gotoAndStop("on");
}
}
function showInstructions() {
popupWindowShowing = true;
pauseGame();
mc.instructions_mc.gotoAndStop("visible");
if (useKeyboard) {
mc.instructions_mc.content_mc.gotoAndStop("keyboard");
mc.instructions_mc.content_mc.back_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, gotoInstructionsPage, "keyboard");
} else {
mc.instructions_mc.content_mc.gotoAndStop("mouse");
mc.instructions_mc.content_mc.back_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, gotoInstructionsPage, "mouse");
}
mc.instructions_mc.content_mc.next_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, gotoInstructionsPage, "money");
mc.instructions_mc.content_mc.close_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, hideInstructions);
}
function gotoInstructionsPage(frame) {
mc.instructions_mc.content_mc.gotoAndStop(frame);
}
function hideInstructions() {
popupWindowShowing = false;
mc.instructions_mc.gotoAndStop("hidden");
unPauseGame();
}
function setup(state) {
gameState = state;
isMaster = true;
totalTime = 0;
elapsedTime = 0;
lastTime = 0;
timeOfLastDrop = getTimer();
players = new Array();
powerups = new Array();
ground_bmp = new flash.display.BitmapData(PLAY_WIDTH, SCREEN_HEIGHT, true, 0);
paintmask_bmp = new flash.display.BitmapData(PLAY_WIDTH, SCREEN_HEIGHT, true, 0);
groundmask_bmp = new flash.display.BitmapData(PLAY_WIDTH, SCREEN_HEIGHT, true, 4294967295);
MAP_WIDTH = mc.smallmap_mc._width;
MAP_HEIGHT = mc.smallmap_mc._height;
mc.smallmap_mc.screenrect_mc._width = (MAP_HEIGHT / SCREEN_HEIGHT) * SCREEN_WIDTH;
smallmap_bmp = new flash.display.BitmapData(MAP_WIDTH, MAP_HEIGHT, true, 0);
mc.environment_mc.environ_mc.gotoAndStop(gameState.levelLayout);
var _local6 = mc.environment_mc.environ_mc.start1_mc._x;
var _local5 = mc.environment_mc.environ_mc.start1_mc._y;
var _local8 = mc.environment_mc.environ_mc.start2_mc._x;
var _local7 = mc.environment_mc.environ_mc.start2_mc._y;
mc.environment_mc.environ_mc.start1_mc._visible = false;
mc.environment_mc.environ_mc.start2_mc._visible = false;
ground_bmp.draw(mc.environment_mc);
mc.environment_mc.environ_mc.swapDepths(1);
mc.environment_mc.environ_mc.removeMovieClip();
groundmask_bmp.copyPixels(groundmask_bmp, groundmask_bmp.rectangle, ZERO_POINT, ground_bmp, ZERO_POINT, false);
updateSmallMap();
powerGauge = new game.PowerGauge(mc.gauge_mc);
mc.environment_mc.attachBitmap(ground_bmp, 0);
mc.smallmap_mc.mapdetail_mc.attachBitmap(smallmap_bmp, 0);
if (SHOW_SIMULATION) {
mc.canvas_mc.createEmptyMovieClip("test_mc", -1);
}
mc.smallmap_mc.onPress = uk.kerb.utils.EventDelegate.create(this, mapClick);
mc.smallmap_mc.onRelease = (mc.smallmap_mc.onReleaseOutside = uk.kerb.utils.EventDelegate.create(this, mapUnclick));
mc.smallmap_mc.tabEnabled = false;
var _local4;
var _local2 = 0;
while (_local2 < gameState.sides) {
if (((gameState.avatars[_local2] == null) || (gameState.avatars[_local2] == undefined)) || (gameState.avatars[_local2] == "")) {
gameState.avatars[_local2] = getRandomAvatar();
}
var _local3 = 0;
while (_local3 < gameState.PLAYERS_PER_SIDE) {
if (_local2 == 0) {
_local4 = main.Main.getInstance().getPlayerColour(0);
addPlayer(_local6 + (_local3 * 50), _local5, _local2, gameState.playerTypes[_local2], (gameState.avatars[_local2] + ",") + _local4);
} else {
_local4 = main.Main.getInstance().getPlayerColour(1);
addPlayer(_local8 - (_local3 * 50), _local7, _local2, gameState.playerTypes[_local2], (gameState.avatars[_local2] + ",") + _local4);
}
_local3++;
}
_local2++;
}
moveScreenTo(PLAY_WIDTH / 2, TRACKING_HARDFOLLOW);
}
function gameIsReady() {
mc.introAnimation_mc._visible = false;
setupPlayer();
runGame();
}
function getCurrentPlayer() {
return(game.Player(players[gameState.playerOrder[gameState.currentPlayer]]));
}
static function getRandomAvatar() {
var _local1 = "";
_local1 = _local1 + (getRandomColour() + ",");
_local1 = _local1 + (Math.ceil(Math.random() * 12) + ",");
_local1 = _local1 + (getRandomColour() + ",");
_local1 = _local1 + (Math.ceil(Math.random() * 12) + ",");
_local1 = _local1 + (getRandomColour() + ",");
_local1 = _local1 + (Math.ceil(Math.random() * 12) + ",");
_local1 = _local1 + (Math.ceil(Math.random() * 12) + ",");
_local1 = _local1 + (getRandomColour() + ",");
_local1 = _local1 + (Math.ceil(Math.random() * 13) + ",");
_local1 = _local1 + ((Math.ceil(Math.random() * 21) - 1) + ",");
_local1 = _local1 + ((Math.ceil(Math.random() * 8) - 1) + ",");
_local1 = _local1 + "0";
return(_local1);
}
static function getRandomColour() {
return(Math.round(Math.random() * 16777215));
}
function addPlayer(x, y, side, playerType, avatar) {
var _local2;
switch (playerType) {
case PLAYERTYPE_LOCALHUMAN :
_local2 = new game.HumanPlayer(attachClip("player_mc", x, y), this, side, avatar);
break;
case PLAYERTYPE_LOCALAI :
_local2 = new game.AIPlayer(attachClip("player_mc", x, y), this, side, avatar);
}
players.push(_local2);
addGO(_local2);
}
function runGame() {
startTime = getTimer();
mc.pause_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, pauseGame);
mc.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, update);
}
function stopGame() {
elapsedTime = elapsedTime + (getTimer() - startTime);
delete mc.onEnterFrame;
}
function pauseGame() {
mc.pause_btn.icon_mc.gotoAndStop("play");
mc.pause_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, unPauseGame);
mc.pause_btn.gotoAndStop(2);
mc.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, updatePaused);
var _local2 = firstGO;
while (_local2 != null) {
_local2.pauseGO();
_local2 = _local2.next;
}
unsetupWeaponButtons();
}
function unPauseGame() {
mc.pause_btn.icon_mc.gotoAndStop("pause");
mc.pause_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, pauseGame);
mc.pause_btn.gotoAndStop(1);
mc.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, update);
var _local2 = firstGO;
while (_local2 != null) {
_local2.runGO();
_local2 = _local2.next;
}
if (getCurrentPlayer().canChooseWeapon()) {
setupWeaponButtons();
}
}
function updatePaused() {
if (lastTime != 0) {
startTime = startTime + (getTimer() - lastTime);
}
lastTime = getTimer();
}
function setupWeaponButtons() {
if ((secretWeaponNum == null) && (getCurrentPlayer() instanceof game.HumanPlayer)) {
mc.weaponbar_mc.weaponLocked_btn.onRollOver = function () {
this.gotoAndStop("on");
};
mc.weaponbar_mc.weaponLocked_btn.onRollOut = function () {
this.gotoAndStop("off");
};
mc.weaponbar_mc.weaponLocked_btn.onDragOut = function () {
this.gotoAndStop("off");
};
mc.weaponbar_mc.weaponLocked_btn.gotoAndStop("off");
mc.weaponbar_mc.weaponLocked_btn.tabEnabled = false;
mc.weaponbar_mc.weaponLocked_btn.enabled = !useKeyboard;
}
var _local3 = 0;
while (_local3 < WEAPONS.length) {
if (_local3 == 9) {
var _local2 = secretWeaponButton;
} else {
var _local2 = mc.weaponbar_mc[("weapon" + _local3) + "_btn"];
}
_local2.tabEnabled = false;
var _local4 = sideCash[getCurrentPlayer().side];
if (WEAPONS[_local3][5] <= _local4) {
if (_local3 == chosenWeapon) {
_local2.gotoAndStop("on");
} else {
_local2.gotoAndStop("off");
}
if (getCurrentPlayer() instanceof game.HumanPlayer) {
_local2.onRollOver = function () {
this.gotoAndStop("on");
};
_local2.onRollOut = function () {
this.gotoAndStop("off");
};
_local2.onDragOut = function () {
this.gotoAndStop("off");
};
_local2.onRelease = uk.kerb.utils.EventDelegate.create(this, mouseWeaponChosen, _local3);
_local2.enabled = !useKeyboard;
}
_local2._alpha = 100;
} else {
_local2.gotoAndStop("off");
_local2._alpha = 50;
delete _local2.onRelease;
}
_local3++;
}
mc.weaponbar_mc._alpha = 100;
showWeaponCounts();
}
function unsetupWeaponButtons() {
delete mc.weaponbar_mc.weaponLocked_btn.onRollOver;
delete mc.weaponbar_mc.weaponLocked_btn.onRollOut;
delete mc.weaponbar_mc.weaponLocked_btn.onDragOut;
delete mc.weaponbar_mc.weaponLocked_btn.onRelease;
mc.weaponbar_mc.weaponLocked_btn.gotoAndStop("off");
var _local3 = 0;
while (_local3 < WEAPONS.length) {
if (_local3 == 9) {
var _local2 = secretWeaponButton;
} else {
var _local2 = mc.weaponbar_mc[("weapon" + _local3) + "_btn"];
}
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onDragOut;
delete _local2.onRelease;
_local2.gotoAndStop("off");
_local2._alpha = 100;
_local3++;
}
mc.weaponbar_mc._alpha = 40;
showWeaponCounts();
}
function showWeaponCounts() {
var _local2 = 0;
while (_local2 < WEAPONS.length) {
if (_local2 == 9) {
var _local3 = secretWeaponButton;
} else {
var _local3 = mc.weaponbar_mc[("weapon" + _local2) + "_btn"];
}
_local3.count_txt.text = WEAPONS[_local2][5];
_local2++;
}
}
function addDirArrow(p) {
if (dirArrow == null) {
dirArrow = attachClip("dirarrow_mc", p.x, p.y);
}
}
function removeDirArrow() {
dirArrow.removeMovieClip();
dirArrow = null;
}
function mouseWeaponChosen(weapon) {
if (!(getCurrentPlayer() instanceof game.HumanPlayer)) {
return(undefined);
}
chooseWeapon(weapon);
}
function readyToAim() {
if (!(getCurrentPlayer() instanceof game.HumanPlayer)) {
return(undefined);
}
addDirArrow(getCurrentPlayer());
mc.clickable_mc.onPress = uk.kerb.utils.EventDelegate.create(this, mousePressed);
}
function mousePressed() {
if (!(getCurrentPlayer() instanceof game.HumanPlayer)) {
return(undefined);
}
if (getCurrentPlayer().isAimingWeapon()) {
var _local3;
if (useKeyboard) {
_local3 = aimAngle;
} else {
var _local6 = (_root._xmouse - mc.canvas_mc._x) - getCurrentPlayer().x;
var _local5 = _root._ymouse - getCurrentPlayer().y;
_local3 = ((Math.atan2(_local5, _local6) * 180) / Math.PI) + 90;
}
getCurrentPlayer().setWeaponAim(_local3);
dirArrow._rotation = _local3;
unsetupWeaponButtons();
if (!getCurrentPlayer().getLoadedWeapon().usePowerBar) {
getCurrentPlayer().setWeaponPower(1);
removeDirArrow();
fireWeapon();
} else {
powerGauge.start();
}
} else if (getCurrentPlayer().isChoosingPower()) {
var _local4 = powerGauge.getValue() * MAX_POWER;
getCurrentPlayer().setWeaponPower(_local4);
removeDirArrow();
fireWeapon();
delete mc.clickable_mc.onPress;
}
}
function chooseWeapon(weapon) {
if ((!getCurrentPlayer().canChooseWeapon()) || (getCurrentPlayer().weaponCounts[weapon] < 1)) {
return(false);
}
removeDirArrow();
if (getCurrentPlayer().getLoadedWeapon() != null) {
getCurrentPlayer().unchooseWeapon(uk.kerb.utils.EventDelegate.create(this, clearWeapon, uk.kerb.utils.EventDelegate.create(this, chooseWeapon, weapon)));
return(true);
}
var _local4 = WEAPONS[weapon][5];
var _local5 = players[gameState.playerOrder[gameState.currentPlayer]].side;
var _local3 = sideCash[_local5];
if (_local3 < _local4) {
return(false);
}
chosenWeapon = weapon;
setupWeaponButtons();
getCurrentPlayer().chooseWeapon(new WEAPONS[weapon][1](attachClip(WEAPONS[weapon][0], 0, 0), this));
aiming = true;
aimAngle = 0;
return(true);
}
function clearWeapon(_func) {
aiming = false;
chosenWeapon = -1;
}
function fireWeapon() {
if (!getCurrentPlayer().canFireWeapon()) {
return(false);
}
var _local2 = WEAPONS[chosenWeapon][5];
var _local3 = players[gameState.playerOrder[gameState.currentPlayer]].side;
sideCash[_local3] = sideCash[_local3] - _local2;
updateCashDisplay();
aiming = false;
powerGauge.finish();
getCurrentPlayer().fireWeapon();
getCurrentPlayer().weaponCounts[chosenWeapon]--;
getCurrentPlayer().weaponUsedCounts[chosenWeapon]++;
showWeaponCounts();
addGO(getCurrentPlayer().getLoadedWeapon());
return(true);
}
function updateCashDisplay() {
var _local2;
mc.score0_txt.text = sideCash[0];
_local2 = mc.score0_txt.getTextFormat();
if (sideCash[0] < 0) {
_local2.color = 13369344 /* 0xCC0000 */;
} else {
_local2.color = 0;
}
mc.score0_txt.setTextFormat(_local2);
mc.score1_txt.text = sideCash[1];
_local2 = mc.score1_txt.getTextFormat();
if (sideCash[1] < 0) {
_local2.color = 13369344 /* 0xCC0000 */;
} else {
_local2.color = 0;
}
mc.score1_txt.setTextFormat(_local2);
}
function colourClip(_clip, _colour) {
new Color(_clip).setRGB(_colour);
}
function destroyEnvironment(weapon, craterClip, scale, rotation) {
if (weapon.simulation) {
return(undefined);
}
rotation = ((rotation == undefined) ? 0 : (rotation));
scale = ((scale == undefined) ? 100 : (scale));
var _local2 = getBitmapData(craterClip, rotation, scale, null, true);
var _local3 = new flash.geom.Point(weapon.x - (_local2.width / 2), weapon.y - (_local2.height / 2));
var _local7 = new flash.geom.Rectangle(_local3.x, _local3.y, _local2.width, _local2.height);
groundmask_bmp.copyPixels(_local2, _local2.rectangle, _local3);
ground_bmp.copyPixels(ground_bmp, ground_bmp.rectangle, ZERO_POINT, groundmask_bmp, ZERO_POINT, false);
groundmask_bmp.copyPixels(groundmask_bmp, groundmask_bmp.rectangle, ZERO_POINT, ground_bmp, ZERO_POINT, false);
paintmask_bmp.copyPixels(paintmask_bmp, paintmask_bmp.rectangle, ZERO_POINT, groundmask_bmp, ZERO_POINT, false);
}
function paintSplatEnvironment(weapon, craterClip, scale) {
if (weapon.simulation) {
return(undefined);
}
weapon.fadeOut(5, uk.kerb.utils.EventDelegate.create(this, weaponFinished, weapon, "removed by paintSplatEnvironment"));
var _local2;
if (weapon instanceof game.weapon.PaintBucket) {
_local2 = getBitmapData(craterClip, 0, scale, game.weapon.PaintBucket(weapon).colour);
} else if (weapon instanceof game.weapon.Condom) {
_local2 = getBitmapData(craterClip, 0, scale, game.weapon.Condom(weapon).colour);
} else {
_local2 = getBitmapData(craterClip, 0, scale);
}
var _local4 = new flash.geom.Point(weapon.x - (_local2.width / 2), weapon.y - (_local2.height / 2));
var _local7 = new flash.geom.Rectangle(_local4.x, _local4.y, _local2.width, _local2.height);
ground_bmp.copyPixels(_local2, _local2.rectangle, _local4, ground_bmp, _local4, true);
paintmask_bmp.copyPixels(_local2, _local2.rectangle, _local4, ground_bmp, _local4, true);
}
function updateSmallMap() {
smallmap_bmp.fillRect(smallmap_bmp.rectangle, 0);
var _local7 = new flash.geom.Matrix(MAP_WIDTH / PLAY_WIDTH, 0, 0, MAP_HEIGHT / SCREEN_HEIGHT, 0, 0);
var _local6 = new flash.geom.ColorTransform();
_local6.rgb = 43451;
smallmap_bmp.draw(groundmask_bmp, _local7, _local6);
var _local3 = 0;
while (_local3 < players.length) {
var _local2 = game.Player(players[_local3]);
if (!_local2.isDead()) {
var _local5 = new flash.geom.Matrix(MAP_WIDTH / PLAY_WIDTH, 0, 0, MAP_WIDTH / PLAY_WIDTH, (_local2.x * MAP_WIDTH) / PLAY_WIDTH, (_local2.y * MAP_HEIGHT) / SCREEN_HEIGHT);
var _local4 = new flash.geom.ColorTransform();
_local4.rgb = _local2.getAvatarRGB();
smallmap_bmp.draw(_local2.mc, _local5, _local4);
}
_local3++;
}
}
function getBitmapData(attachName, rotation, scale, reColor, invertAlpha) {
var _local2 = mc.environment_mc.attachMovie(attachName, attachName, 15000);
if (((rotation != undefined) && (rotation != null)) && (rotation != 0)) {
_local2.colour_mc.rotate_mc._rotation = rotation;
}
if ((scale != undefined) && (scale != null)) {
_local2.colour_mc.rotate_mc._xscale = (_local2.colour_mc.rotate_mc._yscale = scale);
}
if ((reColor != undefined) && (reColor != null)) {
colourClip(_local2.colour_mc, reColor);
}
var _local3 = new flash.display.BitmapData(_local2._width, _local2._height, true, 16777215);
_local3.draw(_local2);
_local2.removeMovieClip();
if (invertAlpha) {
var _local7 = new flash.filters.ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 255]);
_local3.applyFilter(_local3, _local3.rectangle, ZERO_POINT, _local7);
_local3.colorTransform(_local3.rectangle, new flash.geom.ColorTransform(0, 0, 0, 1, 255, 255, 255, 0));
}
return(_local3);
}
function setMapTracking(obj, ttype) {
tracking = obj;
trackingType = ttype;
}
function mapClick() {
var _local2 = (mc.smallmap_mc._xmouse * PLAY_WIDTH) / mc.smallmap_mc._width;
setMapTracking({x:_local2}, TRACKING_SLOWFOLLOW);
mc.smallmap_mc.mouseIsDown = true;
}
function mapUnclick() {
mc.smallmap_mc.mouseIsDown = false;
}
function getClosestEnemy(player) {
var _local2 = null;
var _local6;
var _local7;
var _local5 = -1;
var _local4 = 0;
while (_local4 < players.length) {
_local2 = game.Player(players[_local4]);
if ((!_local2.isDead()) && (_local2.side != player.side)) {
_local6 = ((_local2.x - player.x) * (_local2.x - player.x)) + ((_local2.y - player.y) * (_local2.y - player.y));
if ((_local5 == -1) || (_local6 < _local5)) {
_local5 = _local6;
_local7 = _local2;
}
}
_local4++;
}
return(_local7);
}
function getClosestPowerup(player) {
var _local2 = null;
var _local6;
var _local7;
var _local5 = -1;
var _local3 = 0;
while (_local3 < powerups.length) {
_local2 = game.weapon.Powerup(powerups[_local3]);
_local6 = ((_local2.x - player.x) * (_local2.x - player.x)) + ((_local2.y - player.y) * (_local2.y - player.y));
if ((_local5 == -1) || (_local6 < _local5)) {
_local5 = _local6;
_local7 = _local2;
}
_local3++;
}
return(_local7);
}
function trackObject() {
if (tracking == null) {
return(undefined);
}
if (mc.smallmap_mc.mouseIsDown) {
mapClick();
}
moveScreenTo(tracking.x, trackingType);
}
function moveScreenTo(x, ttype) {
if (ttype == TRACKING_NOFOLLOW) {
return(undefined);
}
var _local5 = (-mc.ground_mc._x) / (PLAY_WIDTH - SCREEN_WIDTH);
var _local6 = (x - (SCREEN_WIDTH / 2)) / (PLAY_WIDTH - SCREEN_WIDTH);
var _local2;
switch (ttype) {
case TRACKING_HARDFOLLOW :
_local2 = _local6;
break;
case TRACKING_SLOWFOLLOW :
_local2 = _local5 + ((_local6 - _local5) / 15);
}
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > 1) {
_local2 = 1;
}
var _local3 = (-_local2) * (PLAY_WIDTH - SCREEN_WIDTH);
mc.environment_mc._x = _local3;
mc.ground_mc._x = _local3;
mc.canvas_mc._x = _local3;
mc.clouds_mc._x = (-_local2) * (1000 - SCREEN_WIDTH);
mc.buildings_mc._x = (-_local2) * (mc.buildings_mc._width - SCREEN_WIDTH);
mc.parallax_mc._x = (-_local2) * (mc.parallax_mc._width - SCREEN_WIDTH);
mc.parallax_mc.gotoAndStop(Math.ceil(_local2 * mc.parallax_mc._totalframes));
var _local4 = _local2 * (MAP_WIDTH - mc.smallmap_mc.screenrect_mc._width);
var _local8 = 2;
var _local7 = (MAP_WIDTH - mc.smallmap_mc.screenrect_mc._width) - 2;
_local4 = Math.max(_local8, Math.min(_local7, _local4));
mc.smallmap_mc.screenrect_mc._x = _local4;
}
function createGameObject(trackerType, tracked, clipName) {
var _local3;
switch (trackerType) {
case "bee" :
_local3 = new game.weapon.Bee(attachClip("weapon_bee", tracked.x, tracked.y), this, tracked);
break;
case "pigeon" :
_local3 = new game.weapon.Pigeon(attachClip("weapon_pigeon", tracked.x, tracked.y), this, tracked);
break;
case "spaceinvaderbullet" :
_local3 = new game.weapon.SpaceInvaderBullet(attachClip("weapon_spaceinvaderbullet", tracked.x, tracked.y), this);
break;
case "flowerbomb" :
_local3 = new game.weapon.FlowerBomb(attachClip("weapon_flowerbomb", tracked.x, tracked.y), this);
break;
case "parachute" :
_local3 = new game.weapon.Parachute(attachClip("parachute_mc", 50 + (Math.random() * (PLAY_WIDTH - 100)), -50), this);
break;
case "smoke" :
_local3 = new game.weapon.TransientEffect(attachClip("smoke_mc", tracked.x, tracked.y - 20), this);
break;
case "anvilsmoke" :
_local3 = new game.weapon.TransientEffect(attachClip("anvilsmoke_mc", tracked.x, tracked.y), this);
break;
case "dirtcloud" :
_local3 = new game.weapon.TransientEffect(attachClip("dirt_mc", tracked.x, tracked.y), this);
break;
case "powerup" :
_local3 = new game.weapon.Powerup(attachClip("powerup_mc", tracked.x, tracked.y + 20), this);
powerups.push(_local3);
break;
case "poweruptaken" :
_local3 = new game.weapon.PowerupTaken(attachClip(clipName, tracked.x, tracked.y), this, game.weapon.Powerup(tracked).value);
break;
case "catsanddogsbullet1" :
_local3 = new game.weapon.CatsAndDogsBullet(attachClip("weapon_catbullet", tracked.x - 120, tracked.y), this);
break;
case "catsanddogsbullet2" :
_local3 = new game.weapon.CatsAndDogsBullet(attachClip("weapon_dogbullet", tracked.x - 16, tracked.y), this);
break;
case "catsanddogsbullet3" :
_local3 = new game.weapon.CatsAndDogsBullet(attachClip("weapon_catbullet", tracked.x + 70, tracked.y), this);
break;
case "catsanddogsbullet4" :
_local3 = new game.weapon.CatsAndDogsBullet(attachClip("weapon_dogbullet", tracked.x + 150, tracked.y), this);
}
addGO(_local3);
return(_local3);
}
function update() {
if (((isMaster && (getTimer() > (timeOfLastDrop + DROP_WAIT))) && (Math.random() < DROP_CHANCE)) && (powerups.length <= MAX_POWERUPS_ONSCREEN)) {
createGameObject("parachute");
timeOfLastDrop = getTimer();
}
powerGauge.update();
if (Math.random() < 0.001) {
sm.playSound("fx_siren", 35);
}
var _local11 = (-90 * gameState.wind) / WIND_MAX;
if (gameState.wind > 0) {
mc.parallax_mc.windsock1_mc.gotoAndStop(1);
mc.parallax_mc.windsock2_mc.gotoAndStop(1);
mc.parallax_mc.windsock1_mc.sock_mc._xscale = 100;
mc.parallax_mc.windsock2_mc.sock_mc._xscale = 100;
} else {
mc.parallax_mc.windsock1_mc.gotoAndStop(2);
mc.parallax_mc.windsock2_mc.gotoAndStop(2);
mc.parallax_mc.windsock1_mc.sock_mc._xscale = -100;
mc.parallax_mc.windsock2_mc.sock_mc._xscale = -100;
}
mc.parallax_mc.windsock1_mc.sock_mc._rotation = _local11;
mc.parallax_mc.windsock2_mc.sock_mc._rotation = _local11;
if (getCurrentPlayer() instanceof game.HumanPlayer) {
if (getCurrentPlayer().isAimingWeapon()) {
var _local9;
if (useKeyboard) {
_local9 = aimAngle;
} else {
var _local13 = (_root._xmouse - mc.canvas_mc._x) - getCurrentPlayer().x;
var _local12 = _root._ymouse - getCurrentPlayer().y;
_local9 = ((Math.atan2(_local12, _local13) * 180) / Math.PI) + 90;
}
dirArrow._rotation = _local9;
getCurrentPlayer().aimWeapon(_local9);
}
var _local10 = getCurrentPlayer().getTimeLeft();
if (_local10 == -1) {
mc.timeout_mc._visible = false;
beepsPlaying = false;
sm.stopSound("fx_timebomb");
} else {
mc.timeout_mc._visible = true;
mc.timeout_mc.timer_txt.text = _local10;
if ((_local10 == 5) && (!beepsPlaying)) {
sm.playSound("fx_timebomb", 70, 20);
beepsPlaying = true;
}
}
if (Key.isDown(37)) {
playerMove(game.Player.PLAYERMOVE_LEFT);
removeDirArrow();
}
if (Key.isDown(39)) {
playerMove(game.Player.PLAYERMOVE_RIGHT);
removeDirArrow();
}
if (Key.isDown(188)) {
if ((useKeyboard && (aiming)) && (getCurrentPlayer() instanceof game.HumanPlayer)) {
aimAngle = aimAngle - 5;
}
}
if (Key.isDown(190)) {
if ((useKeyboard && (aiming)) && (getCurrentPlayer() instanceof game.HumanPlayer)) {
aimAngle = aimAngle + 5;
}
}
if (Key.isDown(38)) {
playerMove(game.Player.PLAYERMOVE_JUMP);
removeDirArrow();
}
}
totalTime = (getTimer() - startTime) + elapsedTime;
var _local4 = firstGO;
var _local8 = false;
var _local6;
var _local3;
var _local5;
var _local14;
while (_local4 != null) {
_local4.update();
if (_local4 instanceof game.weapon.Explosion) {
_local5 = game.weapon.Explosion(_local4);
var _local7 = 0;
while (_local7 < players.length) {
_local6 = game.Player(players[_local7]);
if (_local6.collide(_local5)) {
_local6.hitByExplosion(_local5);
}
_local7++;
}
}
if (_local4.waitForMe()) {
_local8 = true;
}
if (!_local4.ignore()) {
if (_local4 instanceof game.weapon.Weapon) {
_local3 = game.weapon.Weapon(_local4);
if (_local3.isFinished()) {
weaponFinished(_local3, "removed by isFinished");
} else if (_local3.isArmed()) {
var _local7 = 0;
while (_local7 < players.length) {
_local6 = game.Player(players[_local7]);
if (((_local6 != _local3.owner) || (_local3.canHitOwner)) && (_local6.collide(_local3))) {
_local6.hitByWeapon(_local3);
}
_local7++;
}
}
}
}
_local4 = _local4.next;
}
var _local7 = 0;
while ((_local7 < players.length) && (!_local8)) {
_local6 = game.Player(players[_local7]);
if (_local6.isDead() && (!_local6.ignore())) {
_local6.die();
_local8 = true;
}
_local7++;
}
if (!_local8) {
if (_interval == -1) {
getCurrentPlayer().nothingIsBusy();
}
if (Math.random() < WIND_CHANGECHANCE) {
gameState.wind = gameState.wind + ((WIND_MAXCHANGE / 2) - (Math.random() * WIND_MAXCHANGE));
gameState.wind = ((gameState.wind > WIND_MAX) ? (WIND_MAX) : (((gameState.wind < (-WIND_MAX)) ? (WIND_MAX) : (gameState.wind))));
}
}
ticker++;
trackObject();
updateSmallMap();
}
function simulateWeapon(player, weapon, aimfor, steps) {
var _local6 = 0;
var _local5 = 0;
var _local4;
weapon.simulation = true;
while (((_local6 < steps) && (_local5 == 0)) && (!weapon.isFinished())) {
if (SHOW_SIMULATION) {
mc.canvas_mc.test_mc.lineStyle(3, 0);
mc.canvas_mc.test_mc.moveTo(weapon.x, weapon.y);
}
weapon.update();
if (SHOW_SIMULATION) {
mc.canvas_mc.test_mc.lineTo(weapon.x, weapon.y);
}
if (weapon.isArmed()) {
var _local3 = 0;
while (_local3 < players.length) {
_local4 = game.Player(players[_local3]);
if (((_local4 != weapon.owner) || (weapon.canHitOwner)) && (_local4.collide(weapon))) {
if (_local4.side != player.side) {
_local5 = 1;
} else {
_local5 = -10000000;
}
}
_local3++;
}
}
_local6++;
}
if (_local5 == 0) {
_local5 = -(((weapon.x - aimfor.x) * (weapon.x - aimfor.x)) + ((weapon.y - aimfor.y) * (weapon.y - aimfor.y)));
}
weapon.dispose();
return(_local5);
}
function playerMove(movement) {
if (getCurrentPlayer().canMove()) {
if (getCurrentPlayer().getLoadedWeapon() != null) {
removeDirArrow();
getCurrentPlayer().unchooseWeapon(uk.kerb.utils.EventDelegate.create(this, clearWeapon, uk.kerb.utils.EventDelegate.create(this, setupWeaponButtons)));
} else {
switch (movement) {
case game.Player.PLAYERMOVE_LEFT :
getCurrentPlayer().move(-1);
break;
case game.Player.PLAYERMOVE_RIGHT :
getCurrentPlayer().move(1);
break;
case game.Player.PLAYERMOVE_JUMP :
getCurrentPlayer().jump();
}
}
}
}
function explode(_weapon, explosionClass, explosionClip) {
if (_weapon.simulation) {
return(undefined);
}
addGO(new explosionClass[undefined](attachClip(explosionClip, _weapon.x, _weapon.y), this, _weapon));
}
function weaponFinished(_weapon, _string) {
removeGO(_weapon);
}
function powerupFinished(_powerup) {
var _local2 = 0;
while (_local2 < powerups.length) {
if (powerups[_local2] == _powerup) {
powerups.splice(_local2, 1);
_local2--;
}
_local2++;
}
removeGO(_powerup);
showWeaponCounts();
}
function setupPlayer() {
chosenWeapon = -1;
setupWeaponButtons();
getCurrentPlayer().myGo();
}
function noBusyGOs() {
var _local3 = false;
var _local2 = firstGO;
while (_local2 != null) {
if (_local2.waitForMe()) {
_local3 = true;
break;
}
_local2 = _local2.next;
}
return(!_local3);
}
function myGoIsOver(p) {
var _local2 = firstGO;
while (_local2 != null) {
if (_local2.waitForMe()) {
}
_local2 = _local2.next;
}
if (p != getCurrentPlayer()) {
return(undefined);
}
removeDirArrow();
powerGauge.finish();
unsetupWeaponButtons();
delete mc.clickable_mc.onPress;
p.notMyGo();
if (isMaster) {
readyForNextPlayer();
gameState.turnId++;
}
}
function readyForNextPlayer() {
clearInterval(_interval);
_interval = setInterval(uk.kerb.utils.EventDelegate.create(this, nextPlayer), WAIT_BETWEEN_TURNS);
}
function nextPlayer() {
if (isMaster) {
clearInterval(_interval);
_interval = -1;
clearWeapon();
if (SHOW_SIMULATION) {
mc.canvas_mc.test_mc.clear();
}
var _local3 = [];
var _local2 = 0;
while (_local2 < PLAYER_SIDES) {
_local3[_local2] = 0;
_local2++;
}
_local2 = 0;
while (_local2 < players.length) {
if (!game.Player(players[_local2]).isDead()) {
_local3[players[_local2].side]++;
}
_local2++;
}
var _local5 = 0;
var _local4 = -1;
_local2 = 0;
while (_local2 < PLAYER_SIDES) {
if (_local3[_local2] == 0) {
} else {
_local4 = _local2;
_local5++;
}
_local2++;
}
if (_local5 < 2) {
gameOver(_local4);
} else {
gameState.currentPlayer = (gameState.currentPlayer + 1) % gameState.playerOrder.length;
while (getCurrentPlayer().isDead()) {
gameState.currentPlayer = (gameState.currentPlayer + 1) % gameState.playerOrder.length;
}
setupPlayer();
}
}
}
function gameOver(winningSide) {
popupWindowShowing = false;
gameState.winningSide = winningSide;
dispatchEvent(new utils.SectionEvent(main.Main.SECTION_GAMEOVER));
dispose();
}
function showQuitDialogue() {
popupWindowShowing = true;
pauseGame();
mc.quitConfirmation_mc.gotoAndStop("visible");
mc.quitConfirmation_mc.yes_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, gameOver, -1);
mc.quitConfirmation_mc.no_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, hideQuitDialogue);
}
function hideQuitDialogue() {
popupWindowShowing = false;
mc.quitConfirmation_mc.gotoAndStop("hidden");
unPauseGame();
}
function attachClip(goType, x, y) {
var _local2;
var _local3 = mc.canvas_mc.getNextHighestDepth();
_local2 = mc.canvas_mc.attachMovie(goType, goType + _local3, _local3);
_local2._x = x;
_local2._y = y;
return(_local2);
}
function addGO(go) {
if (firstGO == null) {
firstGO = go;
}
if (lastGO != null) {
lastGO.next = go;
}
go.prev = lastGO;
lastGO = go;
}
function removeGO(go) {
if (go.prev != null) {
go.prev.next = go.next;
}
if (go.next != null) {
go.next.prev = go.prev;
}
if (firstGO == go) {
firstGO = go.next;
}
if (lastGO == go) {
lastGO = go.prev;
}
if (tracking == go) {
setMapTracking(null);
}
go.next = null;
go.prev = null;
go.dispose(this);
}
function playIntro() {
mc.introAnimation_mc._visible = true;
introCompleteHandler();
}
function playOutro() {
mc.outroAnimation_mc.animationComplete = outroCompleteHandler;
mc.outroAnimation_mc.gotoAndPlay(2);
}
function dispose() {
clearInterval(_interval);
_interval = -1;
var _local2 = firstGO;
while (_local2 != null) {
_local2.dispose();
_local2 = _local2.next;
}
stopGame();
firstGO = null;
lastGO = null;
setMapTracking(null);
Key.removeListener(this);
}
function onKeyDown() {
if (!useKeyboard) {
return(undefined);
}
var _local2 = Key.getCode();
var _local3 = -1;
if ((_local2 == 96) || (_local2 == 48)) {
if (secretWeaponNum != undefined) {
_local3 = 9;
}
} else if ((_local2 > 96) && (_local2 <= 105)) {
_local3 = _local2 - 97;
} else if ((_local2 > 48) && (_local2 <= 57)) {
_local3 = _local2 - 49;
} else if (_local2 == 32) {
mc.clickable_mc.onPress();
} else if ((_local2 == 9) && (!popupWindowShowing)) {
accessibleButtons[currAccessibleButton].gotoAndStop(accessibleLabels[currAccessibleButton][0]);
if (Key.isDown(16)) {
currAccessibleButton--;
if (currAccessibleButton == -1) {
currAccessibleButton = accessibleButtons.length - 1;
}
} else {
currAccessibleButton++;
currAccessibleButton = currAccessibleButton % accessibleButtons.length;
}
accessibleButtons[currAccessibleButton].gotoAndStop(accessibleLabels[currAccessibleButton][1]);
} else if ((_local2 == 13) && (!popupWindowShowing)) {
accessibleButtons[currAccessibleButton].onRelease();
}
if (_local3 != -1) {
mouseWeaponChosen(_local3);
}
}
function playerIsOnscreen(player) {
var _local2 = player.x + mc.canvas_mc._x;
return((_local2 > 0) && (_local2 < SCREEN_WIDTH));
}
static var SHOW_SIMULATION = false;
var isMaster = true;
static var SECRET_WEAPONS = [["weapon_molotov", game.weapon.Molotov, 999999999, 1, 999999999, 60], ["weapon_deadcat", game.weapon.DeadCat, 999999999, 1, 999999999, 60], ["weapon_dog", game.weapon.Dog, 999999999, 1, 999999999, 60], ["weapon_dynamite", game.weapon.Bomb, 999999999, 1, 999999999, 60], ["weapon_condom", game.weapon.Condom, 999999999, 1, 999999999, 60], ["weapon_sheep", game.weapon.Sheep, 999999999, 1, 999999999, 60]];
static var INITIAL_CASH = 250;
static var POWERUP_VALUES = [20, 30, 40, 50, 100];
static var HIT_MONEY = 20;
static var SYNC_UPDATE_INTERVAL = 10;
static var MAX_ENVIRONMENTS = 20;
static var WEAPON_NUKE = 11;
static var WEAPON_JACKINBOX = 16;
static var WEAPON_SPACEINVADER = 13;
static var SCREEN_WIDTH = 550;
static var SCREEN_HEIGHT = 400;
static var PLAY_WIDTH = 2000;
static var GROUND_HEIGHT = 350;
static var WAIT_BETWEEN_TURNS = 2000;
static var WAIT_FOR_TURN = 150000;
static var ZERO_POINT = new flash.geom.Point(0, 0);
static var MAX_POWER = 25;
static var WIND_MAX = 0.3;
static var WIND_MAXCHANGE = 0.05;
static var WIND_CHANGECHANCE = 0.3;
static var DROP_WAIT = 15000;
static var DROP_CHANCE = 0.01;
static var MAX_POWERUPS_ONSCREEN = 3;
static var TRACKING_HARDFOLLOW = 0;
static var TRACKING_SLOWFOLLOW = 1;
static var TRACKING_NOFOLLOW = 2;
static var PLAYERTYPE_LOCALHUMAN = 0;
static var PLAYERTYPE_LOCALAI = 1;
static var PLAYERTYPE_REMOTE = 2;
static var PLAYER_SIDES = 2;
var _interval = -1;
}
Symbol 2092 MovieClip [__Packages.game.weapon.Egg] Frame 0
class game.weapon.Egg extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, setScale, hide, gameRef;
function Egg (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0.2;
DAMAGE = 7;
setScale(50);
}
function collisionReaction() {
explode();
return(true);
}
function explode() {
super.explode();
hide();
gameRef.explode(this, game.weapon.ExplosionEgg, "explodeegg_mc");
}
}
Symbol 2093 MovieClip [__Packages.game.weapon.ExplosionEgg] Frame 0
class game.weapon.ExplosionEgg extends game.weapon.ExplosionSplat
{
var colour, DAMAGE, splatScale, gameRef, weaponRef;
function ExplosionEgg (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
colour = 16777215 /* 0xFFFFFF */;
DAMAGE = 1;
}
function paintFrame() {
if (splatScale < 100) {
splatScale = splatScale + 5;
gameRef.paintSplatEnvironment(weaponRef, "eggsplat_mc", splatScale);
}
}
}
Symbol 2094 MovieClip [__Packages.game.weapon.PaintBucket] Frame 0
class game.weapon.PaintBucket extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, collidesWithPlayer, setScale, colour, mc, gameRef;
function PaintBucket (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.3;
WINDEFFECT = 0.2;
DAMAGE = 13;
collidesWithPlayer = false;
setScale(50);
colour = game.Game.getRandomColour();
new Color(mc.colour_mc).setRGB(colour);
}
function collisionReaction() {
explode();
return(true);
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
}
function explode() {
super.explode();
gameRef.explode(this, game.weapon.ExplosionPaint, "explodepaint_mc");
}
}
Symbol 2095 MovieClip [__Packages.game.weapon.ExplosionPaint] Frame 0
class game.weapon.ExplosionPaint extends game.weapon.ExplosionSplat
{
var colour, DAMAGE, splatScale, gameRef, weaponRef, colourClip;
function ExplosionPaint (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
colour = game.weapon.PaintBucket(weaponRef).colour;
DAMAGE = 1;
}
function paintFrame() {
if (splatScale < 100) {
splatScale = splatScale + 5;
gameRef.paintSplatEnvironment(weaponRef, "splat_mc", splatScale);
}
colourClip();
}
}
Symbol 2096 MovieClip [__Packages.game.PowerGauge] Frame 0
class game.PowerGauge
{
var mc, ticker, val;
function PowerGauge (mc) {
this.mc = mc;
mc._visible = false;
}
function update() {
ticker = ticker + 4;
val = uk.kerb.utils.Lookup.getSin(ticker % 360);
val = Math.abs(val);
mc.gotoAndStop(Math.floor(val * 100) + 1);
}
function reset() {
ticker = 0;
val = 0;
update();
}
function start() {
mc._visible = true;
reset();
}
function finish() {
mc._visible = false;
}
function getValue() {
return(val);
}
}
Symbol 2097 MovieClip [__Packages.game.AIPlayer] Frame 0
class game.AIPlayer extends game.Player
{
var tryDifferentPosition, useAI, turnStage, lastX, x, walkSteps, _enemy, gameRef, side, facing, dx, weaponCounts, _chosenWeapon, bestScore, bestTrajectory, trajCount, y, distanceToSquared, aimWeapon, setWeaponAim, setWeaponPower;
function AIPlayer (mc, gameRef, side, avatar) {
super(mc, gameRef, side, avatar);
tryDifferentPosition = false;
}
function update() {
if (useAI) {
switch (turnStage) {
case game.Player.TURN_WALKANDCHOOSE :
artificialIntelligence(AI_WALKFIRST);
break;
case game.Player.TURN_WEAPONCHOSEN :
artificialIntelligence(AI_PICKTRAJECTORY);
break;
case game.Player.TURN_WALKONLY :
artificialIntelligence(AI_WALKLAST);
}
}
super.update();
lastX = x;
}
function setTurnStage(newStage) {
switch (newStage) {
case game.Player.TURN_INITIAL :
lastX = x;
walkSteps = 0;
_aiInterval = setInterval(uk.kerb.utils.EventDelegate.create(this, artificialIntelligence, AI_BEGIN), 1000);
break;
case game.Player.TURN_WALKANDCHOOSE :
walkSteps = 0;
break;
case game.Player.TURN_WALKONLY :
walkSteps = 0;
}
super.setTurnStage(newStage);
}
function myGo() {
useAI = false;
super.myGo();
}
function notMyGo() {
killAIInterval();
super.notMyGo();
}
function artificialIntelligence(brain) {
killAIInterval();
switch (brain) {
case AI_BEGIN :
useAI = true;
_enemy = gameRef.getClosestEnemy(this);
break;
case AI_WALKFIRST :
var _local7 = false;
var _local11 = gameRef.sideCash[side];
if (!gameRef.playerIsOnscreen(this)) {
return(undefined);
}
var _local10 = 300;
if (_local11 < 20) {
_local10 = 100000 /* 0x0186A0 */;
}
if (walkSteps < MAXWALK_FIRST) {
if (seekPowerup(_local10)) {
walkSteps++;
_local7 = true;
} else if (tryDifferentPosition && (walkSteps < MAXWALK_CHANGEPOS)) {
gameRef.playerMove(facing);
walkSteps++;
_local7 = true;
}
}
if (!_local7) {
artificialIntelligence(AI_PICKWEAPON);
} else if (((Math.abs(lastX - x) < 1) && (Math.random() < 0.2)) && (dx != 0)) {
dx = 0;
gameRef.playerMove(game.Player.PLAYERMOVE_JUMP);
}
break;
case AI_PICKWEAPON :
var _local5 = new Array();
var _local6 = Math.abs(x - _enemy.x) < 50;
_local11 = gameRef.sideCash[side];
var _local2 = 0;
while (_local2 < game.Game.WEAPONS.length) {
var _local4 = weaponCounts[_local2];
if (_local4 > 0) {
if (_local6 || (!(((game.Game.WEAPONS[_local2][1] == game.weapon.Piss) || (game.Game.WEAPONS[_local2][1] == game.weapon.Gas)) || (game.Game.WEAPONS[_local2][1] == game.weapon.Lazer)))) {
var _local3 = game.Game.WEAPONS[_local2][5];
if (_local3 <= _local11) {
_local5.push(_local2);
}
}
}
_local2++;
}
if (_local5.length > 0) {
_local5.sort(function () {
return(((Math.random() < 0.5) ? -1 : 1));
});
_chosenWeapon = _local5[0];
} else {
_chosenWeapon = -1;
}
bestScore = 0;
bestTrajectory = null;
if (_chosenWeapon > -1) {
if (((game.Game.WEAPONS[_chosenWeapon][1] == game.weapon.SpaceInvader) || (game.Game.WEAPONS[_chosenWeapon][1] == game.weapon.Piss)) || (game.Game.WEAPONS[_chosenWeapon][1] == game.weapon.Gas)) {
trajCount = 1;
} else {
trajCount = TEST_TRAJECTORIES;
}
gameRef.chooseWeapon(_chosenWeapon);
}
break;
case AI_PICKTRAJECTORY :
if (trajCount > 0) {
var _local8;
var _local9;
if (_enemy.x < x) {
_local8 = 350 - (Math.random() * 70);
} else {
_local8 = 10 + (Math.random() * 70);
}
_local9 = Math.abs(_enemy.x - x) / 200;
_local9 = _local9 + (Math.random() * 20);
testTrajectory(_chosenWeapon, {angle:_local8, power:_local9, x:x, y:y});
trajCount--;
if (bestScore > 0) {
trajCount = 0;
}
} else {
if (bestScore < -200000) {
tryDifferentPosition = true;
facing = ((Math.random() < 0.5) ? 1 : -1);
}
aiFireWeapon();
}
break;
case AI_WALKLAST :
_local7 = false;
_local11 = gameRef.sideCash[side];
if (!gameRef.playerIsOnscreen(this)) {
return(undefined);
}
_local10 = 300;
if (_local11 < 20) {
_local10 = 100000 /* 0x0186A0 */;
}
if (walkSteps >= MAXWALK_LAST) {
break;
}
if (seekPowerup(_local10)) {
walkSteps++;
_local7 = true;
} else {
if (!(tryDifferentPosition && (walkSteps < MAXWALK_CHANGEPOS))) {
break;
}
gameRef.playerMove(facing);
walkSteps++;
_local7 = true;
}
}
}
function seekPowerup(maxDistance) {
var _local2 = gameRef.getClosestPowerup(this);
if (_local2 != null) {
var _local3 = distanceToSquared(_local2);
if ((_local3 < (maxDistance * maxDistance)) && (Math.abs(_local2.y - y) < 100)) {
if (_local2.x < x) {
gameRef.playerMove(game.Player.PLAYERMOVE_LEFT);
walkSteps++;
} else {
gameRef.playerMove(game.Player.PLAYERMOVE_RIGHT);
walkSteps++;
}
return(true);
}
}
return(false);
}
function aiFireWeapon() {
dx = 0;
aimWeapon(bestTrajectory.angle);
setWeaponAim(bestTrajectory.angle);
setWeaponPower(bestTrajectory.power);
gameRef.fireWeapon();
}
function testTrajectory(_weaponId, _traj) {
var _local2 = new game.Game.WEAPONS[_weaponId][1](gameRef.attachClip(game.Game.WEAPONS[_weaponId][0], 0, 0), gameRef);
var _local6 = x;
var _local5 = y;
_local2.simulation = true;
_local2.owner = this;
_local2.fire(_traj.angle, _traj.power);
x = _traj.x;
y = _traj.y;
_local2.lockToPlayer(this);
x = _local6;
y = _local5;
var _local4 = gameRef.simulateWeapon(this, _local2, _enemy, 150);
if ((_local4 >= bestScore) || (bestTrajectory == null)) {
bestScore = _local4;
bestTrajectory = _traj;
}
}
function killAIInterval() {
if (_aiInterval != -1) {
clearInterval(_aiInterval);
}
_aiInterval = -1;
}
function die(_func) {
killAIInterval();
super.die(_func);
}
function dispose() {
killAIInterval();
super.dispose();
}
static var TEST_TRAJECTORIES = 10;
var _aiInterval = -1;
static var MAXWALK_FIRST = 100;
static var MAXWALK_CHANGEPOS = 20;
static var MAXWALK_LAST = 50;
var AI_BEGIN = 1;
var AI_WALKFIRST = 2;
var AI_PICKMOVE = 3;
var AI_PICKWEAPON = 4;
var AI_PICKTRAJECTORY = 5;
var AI_WALKLAST = 6;
}
Symbol 2098 MovieClip [__Packages.game.weapon.SpaceInvader] Frame 0
class game.weapon.SpaceInvader extends game.weapon.Weapon
{
var usePowerBar, beepHigh, WEIGHT, WINDEFFECT, DAMAGE, collisionDetection, setScale, gameRef, y, x, dy, dx, direction, simulation, mc;
function SpaceInvader (mc, gameRef) {
super(mc, gameRef);
usePowerBar = false;
beepHigh = true;
WEIGHT = 0;
WINDEFFECT = 0;
DAMAGE = 5;
collisionDetection = game.GameObject.COLLISION_NONE;
setScale(50);
}
function beep() {
gameRef.sm.playSound((beepHigh ? "fx_invaderhigh" : "fx_invaderlow"));
beepHigh = !beepHigh;
}
function isArmed() {
return(y == SKY_Y);
}
function isFinished() {
return((x > (game.Game.PLAY_WIDTH + 50)) || (x < -50));
}
function update() {
if (y > SKY_Y) {
dy = 5;
dx = 0;
} else {
dy = 0;
dx = direction * 4;
if ((Math.random() < FIRE_RATE) && (!simulation)) {
gameRef.sm.playSound("fx_invaderfire");
gameRef.createGameObject("spaceinvaderbullet", this);
}
}
super.update();
if (y < SKY_Y) {
y = SKY_Y;
}
}
function fire(angle, power) {
angle = (angle + 360) % 360;
if (angle > 180) {
direction = -1;
} else {
direction = 1;
}
super.fire(angle, power);
mc.playBeep = uk.kerb.utils.EventDelegate.create(this, beep);
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
}
static var FIRE_RATE = 0.05;
var SKY_Y = 100;
}
Symbol 2099 MovieClip [__Packages.game.weapon.SpaceInvaderBullet] Frame 0
class game.weapon.SpaceInvaderBullet extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, dy, gameRef;
function SpaceInvaderBullet (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0;
WINDEFFECT = 0;
DAMAGE = 0;
dy = -5;
}
function collisionReaction() {
explode();
return(true);
}
function waitForMe() {
return(true);
}
function explode() {
super.explode();
gameRef.explode(this, game.weapon.ExplosionPixel, "explodepixel_mc");
}
}
Symbol 2100 MovieClip [__Packages.game.weapon.ExplosionPixel] Frame 0
class game.weapon.ExplosionPixel extends game.weapon.Explosion
{
var DAMAGE, FORCE, gameRef, weaponRef;
function ExplosionPixel (mc, gameRef, weaponRef) {
super(mc, gameRef, weaponRef);
if (weaponRef.y > (game.Game.GROUND_HEIGHT - 20)) {
gameRef.createGameObject("dirtcloud", weaponRef);
}
DAMAGE = 15;
FORCE = 0.2;
gameRef.sm.playSound("fx_explosion");
}
function onExplode() {
gameRef.destroyEnvironment(weaponRef, "destroypixel_mc");
gameRef.weaponFinished(weaponRef, "onExplode");
}
}
Symbol 2101 MovieClip [__Packages.game.weapon.FlowerBomb] Frame 0
class game.weapon.FlowerBomb extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, fire, lifeTime, gameRef;
function FlowerBomb (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0.4;
WINDEFFECT = 0;
DAMAGE = 0;
var _local4 = (405 - (Math.random() * 90)) % 360;
var _local3 = 4 + (Math.random() * 5);
fire(_local4, _local3);
}
function update() {
super.update();
if (lifeTime >= LIFETIME_DESTRUCT) {
explode();
}
}
function collisionReaction() {
explode();
return(true);
}
function explode() {
super.explode();
gameRef.explode(this, game.weapon.ExplosionSmall, "explodesmall_mc");
}
var LIFETIME_DESTRUCT = 100;
}
Symbol 2102 MovieClip [__Packages.game.weapon.Parachute] Frame 0
class game.weapon.Parachute extends game.weapon.Weapon
{
var WEIGHT, WINDEFFECT, DAMAGE, dy, collidesWithPlayer, mc, x, y, ignoreMe, animation, gameRef;
function Parachute (mc, gameRef) {
super(mc, gameRef);
WEIGHT = 0;
WINDEFFECT = 0.4;
DAMAGE = 20;
dy = -5;
collidesWithPlayer = false;
}
function pauseGO() {
mc.clip_mc.stop();
}
function runGO() {
mc.clip_mc.play();
}
function isFinished() {
return(((x > (game.Game.PLAY_WIDTH + 50)) || (x < -50)) || (y > game.Game.SCREEN_HEIGHT));
}
function collisionReaction() {
ignoreMe = true;
animation("land", uk.kerb.utils.EventDelegate.create(gameRef, gameRef.removeGO, this));
mc.onShowPowerup = uk.kerb.utils.EventDelegate.create(gameRef, gameRef.createGameObject, "powerup", this);
return(true);
}
function setClipRotation(dx, dy) {
mc._rotation = 0;
}
function waitForMe() {
return(false);
}
}
Symbol 2103 MovieClip [__Packages.game.weapon.TransientEffect] Frame 0
class game.weapon.TransientEffect extends game.GameObject
{
function TransientEffect (mc, gameRef) {
super(mc, gameRef);
mc.onAnimationFinished = uk.kerb.utils.EventDelegate.create(gameRef, gameRef.weaponFinished, this, "transient effect");
}
function waitForMe() {
return(true);
}
}
Symbol 2104 MovieClip [__Packages.game.weapon.PowerupTaken] Frame 0
class game.weapon.PowerupTaken extends game.GameObject
{
var collisionDetection, fadeOut, y;
function PowerupTaken (mc, gameRef, value) {
super(mc, gameRef);
collisionDetection = game.GameObject.COLLISION_NONE;
fadeOut(3, uk.kerb.utils.EventDelegate.create(gameRef, gameRef.removeGO, this));
gameRef.sm.playSound("fx_invaderfire");
var _local3 = 0;
while (_local3 < 5) {
mc[("value" + _local3) + "_txt"].text = value;
_local3++;
}
}
function update() {
y = y - 2;
super.update();
}
}
Symbol 2105 MovieClip [__Packages.main.Intro] Frame 0
class main.Intro extends main.AbstractSection implements main.ISection
{
var instructions_func, dispatchEvent, active, mc, introCompleteHandler, outroCompleteHandler, pickedColour;
function Intro (mc) {
super(mc);
var _local3 = new utils.SectionEvent(main.Main.SECTION_INSTRUCTIONS, false, false, true);
var _local4 = new utils.SectionEvent(main.Main.SECTION_SENDTOFRIEND);
instructions_func = uk.kerb.utils.EventDelegate.create(this, dispatchEvent, _local3);
}
function init() {
numPlayersSet = false;
if (!active) {
showNumPlayers();
mc.introAnimation_mc._visible = false;
active = true;
}
}
function playIntro() {
mc.introAnimation_mc._visible = true;
mc.introAnimation_mc.animationComplete = introCompleteHandler;
mc.introAnimation_mc.addLogo = uk.kerb.utils.EventDelegate.create(this, addLogo);
uk.kerb.utils.SetOneInterval.create(10, uk.kerb.utils.EventDelegate.create(mc.introAnimation_mc, mc.introAnimation_mc.gotoAndPlay, 2));
}
function playOutro() {
outroCompleteHandler();
}
function addLogo() {
var _local2 = mc.introAnimation_mc.content_mc.createEmptyMovieClip("logo_mc", mc.introAnimation_mc.content_mc.getNextHighestDepth());
_local2.attachBitmap(main.Main.logo_bmp, 1);
_local2._x = -0.5 * _local2._width;
_local2._y = -155;
}
function showNumPlayers() {
mc.mainScreen_mc.gotoAndStop("numPlayers");
var _local3 = mc.mainScreen_mc.createEmptyMovieClip("logo_mc", mc.mainScreen_mc.getNextHighestDepth());
_local3.swapDepths(mc.mainScreen_mc.theSite_btn);
_local3.attachBitmap(main.Main.logo_bmp, 1);
_local3._x = -0.5 * _local3._width;
_local3._y = -180;
mc.mainScreen_mc.theSite_btn.onRelease = function () {
getURL (main.Main.THE_SITE_URL, "_blank");
_root.kvClick(414);
};
mc.mainScreen_mc.buttonPanel_mc.instructions_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showInstructions, 1);
mc.mainScreen_mc.sound_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, toggleSound);
mc.mainScreen_mc.sound_btn.gotoAndStop((main.Main.getInstance().getSoundManager().isSoundOn() ? "on" : "off"));
if (numPlayersSet) {
mc.mainScreen_mc.buttonPanel_mc.gotoAndStop(2);
mc.mainScreen_mc.buttonPanel_mc.mouse_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, setKeyboardControl, false);
mc.mainScreen_mc.buttonPanel_mc.keyboard_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, setKeyboardControl, true);
} else {
mc.mainScreen_mc.buttonPanel_mc.onePlayer_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, setNumPlayers, 1);
mc.mainScreen_mc.buttonPanel_mc.twoPlayer_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, setNumPlayers, 2);
}
}
function setNumPlayers(num) {
main.Main.getInstance().multiplayer = num == 2;
numPlayersSet = true;
mc.mainScreen_mc.buttonPanel_mc.gotoAndStop(2);
mc.mainScreen_mc.buttonPanel_mc.mouse_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, setKeyboardControl, false);
mc.mainScreen_mc.buttonPanel_mc.keyboard_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, setKeyboardControl, true);
}
function setKeyboardControl(useKeyboard) {
main.Main.getInstance().setUseKeyboard(useKeyboard);
showChooseCharacter();
}
function showInstructions(frameNum) {
mc.mainScreen_mc.gotoAndStop("instructions");
if (frameNum == 1) {
mc.mainScreen_mc.instructions_mc.gotoAndStop(1);
mc.mainScreen_mc.instructions_mc.keyboard_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showInstructions, 2);
mc.mainScreen_mc.instructions_mc.mouseContent_mc.back_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showNumPlayers);
mc.mainScreen_mc.instructions_mc.mouseContent_mc.next_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showMoney);
} else {
mc.mainScreen_mc.instructions_mc.gotoAndStop(2);
mc.mainScreen_mc.instructions_mc.mouse_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showInstructions, 1);
mc.mainScreen_mc.instructions_mc.keyboardContent_mc.back_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showNumPlayers);
mc.mainScreen_mc.instructions_mc.keyboardContent_mc.next_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showMoney);
}
}
function showMoney() {
mc.mainScreen_mc.gotoAndStop("money");
mc.mainScreen_mc.money_mc.back_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showInstructions, 1);
mc.mainScreen_mc.money_mc.play_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, showNumPlayers);
}
function showChooseCharacter() {
mc.mainScreen_mc.gotoAndStop("chooseCharacter");
mc.mainScreen_mc.content_mc.left_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, pickColour, -1);
mc.mainScreen_mc.content_mc.right_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, pickColour, 1);
mc.mainScreen_mc.content_mc.enter_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, pickNextColour);
}
function pickColour(step) {
currColour = (currColour + step) + 4;
currColour = currColour % 4;
if (currColour == pickedColour) {
currColour = (currColour + step) + 4;
currColour = currColour % 4;
}
mc.mainScreen_mc.content_mc.character_mc.colour1_mc.gotoAndStop(currColour + 1);
mc.mainScreen_mc.content_mc.character_mc.colour2_mc.gotoAndStop(currColour + 1);
}
function pickNextColour() {
main.Main.getInstance().setPlayerColour(currPlayer, currColour);
if (main.Main.getInstance().multiplayer) {
if (currPlayer == 0) {
pickedColour = currColour;
pickColour(1);
currPlayer = 1;
mc.mainScreen_mc.content_mc.playerLabel_mc.gotoAndStop(2);
} else {
initCodeScreen();
}
} else {
var _local2 = [0, 1, 2, 3];
_local2.splice(currColour, 1);
main.Main.getInstance().setPlayerColour(1, _local2[Math.floor(Math.random() * 3)]);
initCodeScreen();
}
}
function initCodeScreen() {
main.Main.getInstance().resetSecretWeapon();
mc.mainScreen_mc.gotoAndStop("codeEntry");
mc.mainScreen_mc.theSiteA_btn.onRelease = function () {
getURL (main.Main.THE_SITE_EXTRAS_URL, "_blank");
_root.kvClick(415);
};
mc.mainScreen_mc.theSiteB_btn.onRelease = function () {
getURL (main.Main.THE_SITE_EXTRAS_URL, "_blank");
_root.kvClick(415);
};
mc.mainScreen_mc.code_mc.enter_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, submitCode);
mc.mainScreen_mc.code_mc.skip_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, startGame);
Selection.setFocus(mc.mainScreen_mc.code_mc.userInput_txt);
mc.mainScreen_mc.code_mc.userInput_txt.onSetFocus = uk.kerb.utils.EventDelegate.create(this, hideCodeMessage);
dispatchEvent({type:"onSetKeyBinding", target:this, key:13, action:uk.kerb.utils.EventDelegate.create(this, submitCode)});
hideCodeMessage();
}
function hideCodeMessage() {
mc.mainScreen_mc.code_mc.message_mc._visible = false;
}
function submitCode() {
var _local2 = mc.mainScreen_mc.code_mc.userInput_txt.text;
var _local3 = main.Main.getInstance().validateCode(_local2);
Selection.setFocus(null);
if (_local3 || (_local2 == "")) {
startGame();
} else {
mc.mainScreen_mc.code_mc.userInput_txt.text = "";
mc.mainScreen_mc.code_mc.message_mc._visible = true;
}
}
function startGame() {
main.Main.getInstance().setupNewGame();
}
function toggleSound() {
var _local2 = main.Main.getInstance().getSoundManager();
if (_local2.isSoundOn()) {
_local2.soundOff();
mc.mainScreen_mc.sound_btn.gotoAndStop("off");
} else {
_local2.soundOn();
mc.mainScreen_mc.sound_btn.gotoAndStop("on");
}
}
var currColour = 0;
var currPlayer = 0;
var numPlayersSet = false;
}
Symbol 2106 MovieClip [__Packages.uk.kerb.utils.SetOneInterval] Frame 0
class uk.kerb.utils.SetOneInterval
{
var func, interval;
function SetOneInterval (duration, func) {
this.func = func;
interval = setInterval(this, "intervalCalled", duration);
intervalList.push(this);
}
static function create(duration, func) {
return((new uk.kerb.utils.SetOneInterval(duration, func)).interval);
}
static function clearAll() {
var _local1;
_local1 = 0;
while (_local1 < intervalList.length) {
intervalList[_local1].stop();
_local1++;
}
}
function stop() {
intervalCalled();
}
function intervalCalled() {
var _local2;
clearInterval(interval);
_local2 = 0;
while (_local2 < intervalList.length) {
if (intervalList[_local2] == this) {
intervalList.splice(_local2, 1);
break;
}
_local2++;
}
func();
}
static var intervalList = [];
}
Symbol 2107 MovieClip [__Packages.main.Instructions] Frame 0
class main.Instructions extends main.AbstractSection implements main.ISection
{
var intro_func, dispatchEvent, active, mc, introCompleteHandler, outroCompleteHandler;
function Instructions (mc) {
super(mc);
var _local3 = new utils.SectionEvent(main.Main.SECTION_INTRO, true, true, false);
intro_func = uk.kerb.utils.EventDelegate.create(this, dispatchEvent, _local3);
}
function init() {
if (!active) {
mc.mainScreen_mc.gotoAndStop(2);
mc.mainScreen_mc.back_btn.onRelease = intro_func;
active = true;
}
dispatchEvent({type:"onSetKeyBinding", target:this, key:32, action:intro_func});
}
function playIntro() {
mc.introAnimation_mc.animationComplete = introCompleteHandler;
uk.kerb.utils.SetOneInterval.create(10, uk.kerb.utils.EventDelegate.create(mc.introAnimation_mc, mc.introAnimation_mc.gotoAndPlay, 2));
}
function playOutro() {
mc.outroAnimation_mc.animationComplete = outroCompleteHandler;
mc.outroAnimation_mc.gotoAndPlay(2);
mc.mainScreen_mc.gotoAndStop(1);
}
}
Symbol 2108 MovieClip [__Packages.main.InGameInstructions] Frame 0
class main.InGameInstructions extends main.AbstractSection implements main.ISection
{
var intro_func, dispatchEvent, active, mc, introCompleteHandler, outroCompleteHandler;
function InGameInstructions (mc) {
super(mc);
var _local3 = new utils.SectionEvent(main.Main.SECTION_GAME, true, true, false);
intro_func = uk.kerb.utils.EventDelegate.create(this, dispatchEvent, _local3);
}
function init() {
if (!active) {
mc.mainScreen_mc.gotoAndStop(2);
mc.mainScreen_mc.back_btn.onRelease = intro_func;
active = true;
}
dispatchEvent({type:"onSetKeyBinding", target:this, key:32, action:intro_func});
}
function playIntro() {
mc.introAnimation_mc.animationComplete = introCompleteHandler;
uk.kerb.utils.SetOneInterval.create(10, uk.kerb.utils.EventDelegate.create(mc.introAnimation_mc, mc.introAnimation_mc.gotoAndPlay, 2));
}
function playOutro() {
mc.outroAnimation_mc.animationComplete = outroCompleteHandler;
mc.outroAnimation_mc.gotoAndPlay(2);
}
}
Symbol 2109 MovieClip [__Packages.main.GameOver] Frame 0
class main.GameOver extends main.AbstractSection implements main.ISection
{
var intro_func, dispatchEvent, active, mc, gameState, avatar, introCompleteHandler, outroCompleteHandler;
function GameOver (mc) {
super(mc);
var _local3 = new utils.SectionEvent(main.Main.SECTION_INTRO, true, true, false);
intro_func = uk.kerb.utils.EventDelegate.create(this, dispatchEvent, _local3);
}
function init() {
if (!active) {
mc.mainScreen_mc.gotoAndStop(2);
mc.mainScreen_mc.playagain_btn.onRelease = intro_func;
mc.mainScreen_mc.winlose_mc.thesite_btn.onRelease = function () {
getURL (main.Main.THE_SITE_URL, "_blank");
_root.kvClick(416);
};
gameState = main.Main.getInstance().getGameState();
if (gameState.winningSide == main.Main.getInstance().myGameStatePos) {
if (main.Main.getInstance().getWinningScore() >= 0) {
mc.mainScreen_mc.winlose_mc.gotoAndStop("winner");
} else {
mc.mainScreen_mc.winlose_mc.gotoAndStop("winnerDebt");
}
} else {
mc.mainScreen_mc.winlose_mc.gotoAndStop("loser");
}
var _local4 = Math.ceil(Math.random() * 3);
mc.mainScreen_mc.winlose_mc.char_mc.gotoAndStop(_local4);
var _local3 = main.Main.getInstance().myGameStatePos;
var _local5 = main.Main.getInstance().playerColours[_local3] + 1;
var _local6 = (gameState.avatars[_local3] + ",") + _local5;
avatar = new game.Avatar(mc.mainScreen_mc.winlose_mc.char_mc.ani_mc, _local6);
active = true;
}
}
function playIntro() {
introCompleteHandler();
}
function uninit() {
avatar.dispose();
}
function playOutro() {
mc.outroAnimation_mc.animationComplete = outroCompleteHandler;
mc.outroAnimation_mc.gotoAndPlay(2);
}
}
Symbol 1156 MovieClip Frame 1
stop();
Symbol 1210 MovieClip Frame 1
stop();
Symbol 1220 MovieClip Frame 1
sheep_mc.stop();
Symbol 1224 MovieClip Frame 1
stop();
Symbol 1230 MovieClip Frame 1
stop();
Symbol 1236 MovieClip Frame 1
stop();
Symbol 1242 MovieClip Frame 1
stop();
Symbol 1248 MovieClip Frame 1
stop();
Symbol 1254 MovieClip Frame 1
stop();
Symbol 1262 MovieClip Frame 1
stop();
Symbol 1268 MovieClip Frame 1
stop();
Symbol 1274 MovieClip Frame 1
stop();
Symbol 1280 MovieClip Frame 1
stop();
Symbol 1286 MovieClip Frame 1
stop();
Symbol 1292 MovieClip Frame 1
stop();
Symbol 1298 MovieClip Frame 1
stop();
Symbol 1304 MovieClip Frame 1
stop();
Symbol 1310 MovieClip Frame 1
stop();
Symbol 1316 MovieClip Frame 1
stop();
Symbol 1326 MovieClip Frame 1
stop();
Symbol 1330 MovieClip Frame 1
stop();
Symbol 1335 MovieClip Frame 1
stop();
Symbol 1340 MovieClip Frame 1
stop();
Symbol 1344 MovieClip Frame 1
stop();
Symbol 1348 MovieClip Frame 1
stop();
Symbol 1359 MovieClip Frame 1
this.onRelease = function () {
};
this.useHandCursor = false;
Symbol 1444 MovieClip Frame 1
stop();
Symbol 1456 MovieClip Frame 1
stop();
Symbol 1457 MovieClip Frame 1
stop();
Symbol 1457 MovieClip Frame 2
animationComplete();
Symbol 1458 MovieClip Frame 2
stop();
Symbol 1464 MovieClip Frame 1
stop();
Symbol 1466 MovieClip Frame 1
stop();
Symbol 1467 MovieClip Frame 1
stop();
Symbol 1469 MovieClip Frame 1
stop();
Symbol 1480 MovieClip Frame 133
stop();
Symbol 1567 MovieClip Frame 133
stop();
Symbol 1687 MovieClip Frame 251
stop();
Symbol 1704 MovieClip Frame 370
stop();
Symbol 1714 MovieClip Frame 96
stop();
Symbol 1798 MovieClip Frame 225
stop();
Symbol 1799 MovieClip Frame 1
stop();
Symbol 1802 MovieClip Frame 1
stop();
Symbol 1806 MovieClip Frame 1
stop();
Symbol 1820 MovieClip Frame 280
stop();
Symbol 1847 MovieClip Frame 280
stop();
Symbol 1849 MovieClip Frame 1
stop();
Symbol 1865 MovieClip Frame 1
stop();
Symbol 1868 MovieClip Frame 1
stop();
Symbol 1868 MovieClip Frame 3
animationComplete();
Symbol 1869 MovieClip Frame 2
stop();
Symbol 1941 MovieClip Frame 1
stop();
Symbol 1942 MovieClip Frame 1
stop();
Symbol 1942 MovieClip Frame 76
addLogo();
Symbol 1942 MovieClip Frame 143
animationComplete();
Symbol 1955 MovieClip Frame 1
stop();
Symbol 1969 MovieClip Frame 1
stop();
Symbol 2012 MovieClip Frame 1
stop();
Symbol 2025 MovieClip Frame 1
stop();
Symbol 2033 MovieClip Frame 1
stop();
Symbol 2033 MovieClip Frame 179
gotoAndPlay (2);
Symbol 2033 MovieClip Frame 180
stop();
initCharacterScreen();
Symbol 2033 MovieClip Frame 192
stop();
initCodeScreen();
Symbol 2033 MovieClip Frame 203
stop();
Symbol 2033 MovieClip Frame 214
initSoundButton();
Symbol 2034 MovieClip Frame 2
stop();
Symbol 2035 MovieClip Frame 1
main.Main.getInstance().init(this);