Frame 1
function getBaseDir(thisMc) {
if (thisMc == undefined) {
thisMc = _root;
}
var _local2 = thisMc._url;
var _local3 = _local2.lastIndexOf("/");
if (_local3 != -1) {
var _local5 = _local2.substring(0, _local3 + 1);
return(_local5);
}
return("");
}
stop();
var adURL = (getBaseDir() + "CCLogo.swf");
this.onEnterFrame = function () {
var _local2 = this.getBytesLoaded() / this.getBytesTotal();
loader_mc.bar_mc._xscale = _local2 * 100;
loader_txt.text = Math.round(_local2 * 100) + "%";
if (_local2 >= 1) {
delete this.onEnterFrame;
gotoAndStop ("Game");
}
};
Frame 16
trace(("TIMELINE frame 2: invoking Main(" + this) + ")");
var main_mc = this.createEmptyMovieClip("main_mc", this.getNextHighestDepth());
var main = (new com.electrotank.comedycentral.reno.Main(main_mc));
play();
Frame 46
function submitScore(score, map, time, difficulty, screenName) {
var _local1 = (((map + "|") + time) + "|") + difficulty;
GSScoreSubmit.unauthSubmitScore(score, score, _local1, screenName);
}
function loadHighScores(hs, firstRank, numRanks) {
if (firstRank == null) {
firstRank = 0;
}
if (numRanks == null) {
numRanks = 100;
}
highScoreScreen = hs;
GSScoreSubmit.unauthLeaderBoard(firstRank, numRanks);
}
function load(url) {
var _local3 = this.createEmptyMovieClip("loader2_mc", this.getNextHighestDepth());
var _local2 = new MovieClipLoader();
_local2.addListener(this);
_local2.loadClip(url, _local3);
}
function onLoadInit(mc) {
_root.gs_loaded = true;
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + "gs1.swf loaded!\r";
gs_gameServices = new GameServices(gameServicesCallback);
gs_scoreSubmit = new GSScoreSubmit(gameServicesCallback);
gs_sendToFriend = new GSSendToFriend(stfCallback);
GameServices.initGameTracking(null, false);
trace((("Game Services module " + mtvnGSPath) + " loaded, GS ver=") + GameServices.getVersionString());
trace("BaseDir=" + GameServices.getBaseDir());
trace(showGSStartupInfo());
gs_gameServices.getRegistrationStatus();
loadHighScores(highScoreScreen, 0, 100);
}
function stfCallback(action) {
trace("STF callback hit with " + action);
if (action == "nodata") {
stop();
} else if (action == "load") {
gotoAndStop ("ReceivedData");
} else {
gotoAndStop ("Result");
}
}
function gameServicesCallback(gsResponseInfo, whichCommand) {
if (gsResponseInfo.isError()) {
trace((("Error=" + gsResponseInfo.message) + "; ") + gsResponseInfo.extended_info);
startupVars.text = (gsResponseInfo.message + "; ") + gsResponseInfo.extended_info;
} else {
var succeeded = gsResponseInfo.success;
if (succeeded) {
switch (whichCommand) {
case "SetUserScoreGetScores" :
case "SetUserScoreGetScoresUnauth" :
case "GetScoreRanks" :
case "GetScoreRanksUnauth" :
case "GetUserScoreRanks" :
case "GetUserRatingRanks" :
case "GetRatingRanks" :
var leaderboard = gsResponseInfo.results;
var list = new Array();
leaderBoardText = "";
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("leaderboard.length: " + leaderboard.length) + newline);
if (leaderboard.length > 0) {
i = 0;
while (i < leaderboard.length) {
var infoOb = leaderboard[i];
var extra = infoOb.game_data.split("|");
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("infoOb.user_name: " + infoOb.user_name) + newline);
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("infoOb.score: " + infoOb.score) + newline);
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("infoOb.game_data: " + infoOb.game_data) + newline);
var scoreEntry = (new com.electrotank.comedycentral.reno.scores.Score(infoOb.user_name, Number(infoOb.score), extra[0], Number(extra[1]), extra[2]));
list.push(scoreEntry);
leaderBoardText = leaderBoardText + (((i + 1) + ". ") + leaderboard[i].user_name);
leaderBoardText = leaderBoardText + ("\t\t" + leaderboard[i].score);
if (leaderboard[i].game_data.length) {
leaderBoardText = leaderBoardText + ("\t" + leaderboard[i].game_data);
}
leaderBoardText = leaderBoardText + newline;
i++;
}
} else {
leaderBoardText = "There are no entries";
}
highScoreScreen.highScoresLoaded(list);
showData.text = leaderBoardText;
break;
case "SetUserScoreGetRank" :
case "SetUserScoreGetRankUnauth" :
case "GetSiteUserRank" :
var myRank = gsResponseInfo.outparams.user_rank;
showData.text = "Your rank is " + myRank;
break;
case "GetUserScore" :
var myScore = gsResponseInfo.results[0].score;
var myGameData = gsResponseInfo.results[0].game_data;
showData.text = (("Your score is " + myScore) + "\nThe game performance was ") + myGameData;
break;
case "GetRegistrationStatus" :
case "UserLogin" :
isLoggedIn = succeeded;
trace("isLoggedIn: " + isLoggedIn);
break;
case "GetUserGameGroupExperiencePoints" :
case "GetUserGameExperiencePoints" :
case "GetUserSiteExperiencePoints" :
var points = gsResponseInfo.results[0].experience_points;
showData.text = ("You currently have " + points) + " experience points.";
break;
case "AcceptUserBuddy" :
case "AddUserBuddy" :
break;
case "GetUserBuddies" :
var buddies = gsResponseInfo.results;
buddiesText = "";
if (buddies.length > 0) {
i = 0;
while (i < buddies.length) {
buddiesText = (((((buddiesText + (i + 1)) + ". ") + buddies[i].user_name) + "\t\t") + buddies[i].buddy_user_id) + newline;
GameServices.loadAvatarForUser(buddies[i].buddy_user_id, 2, _root, "buddiesAvatar" + buddies[i].buddy_user_id, _root.getNextHighestDepth());
eval ("buddiesAvatar" + buddies[i].buddy_user_id)._y = (i * 20) + 50;
i++;
}
} else {
buddiesText = "There are no entries";
}
showData.text = buddiesText;
}
if (whichCommand.indexOf("SetUserScore") != -1) {
resultCode = gsResponseInfo.message;
if (resultCode == "UNCHANGED") {
startupVars.text = "You already have a better score.";
} else {
startupVars.text = "Score submitted!";
}
}
} else {
showData.text = (("Command " + whichCommand) + " failed: ") + gsResponseInfo.message;
}
}
}
function showGSStartupInfo() {
gs_siteId = GameServices.getSiteId();
gs_sessionId = GameServices.getSessionId();
gs_playbackId = gs_sendToFriend.getPlaybackId();
return((((((((("Loaded from " + mtvnGSPath) + "; version ") + GameServices.getVersionString()) + "\nSiteId=") + gs_siteId) + "; SessionId=") + gs_sessionId) + "; PlaybackId=") + gs_playbackId);
}
stop();
var isLoggedIn = false;
var highScoreScreen;
var g_isDev = (_root.GSPath == null);
var mtvnGSPath = "gs1.swf";
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("g_isDev: " + g_isDev) + newline);
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("_root.GSPath: " + _root.GSPath) + newline);
if (g_isDev) {
_root.game_id = "6";
_root.site_id = "10";
_root.SubmitURL = "http://gs.mtv-q.mtvi.com/community.php";
} else {
mtvnGSPath = _root.GSPath + mtvnGSPath;
}
var gs_gameServices = null;
var gs_scoreSubmit = null;
var gs_sendToFriend = null;
var gs_loaded = false;
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("gs_loaded: " + gs_loaded) + newline);
if (!_root.gs_loaded) {
trace("Loading GS from " + mtvnGSPath);
load(mtvnGSPath);
_root.msg_mc.msg_txt.text = _root.msg_mc.msg_txt.text + (("mtvnGSPath: " + mtvnGSPath) + newline);
}
Symbol 39 MovieClip [playerWon] Frame 1
this._parent.owner.fireworkStart();
Symbol 39 MovieClip [playerWon] Frame 30
this._parent.owner.fireworkStart();
Symbol 39 MovieClip [playerWon] Frame 60
this._parent.owner.fireworkStart();
Symbol 39 MovieClip [playerWon] Frame 140
stop();
removeMovieClip(this);
main.gs.victory();
Symbol 63 MovieClip [playerLost] Frame 1
main.gs.explosionStart();
Symbol 63 MovieClip [playerLost] Frame 18
main.gs.explosionStart();
Symbol 63 MovieClip [playerLost] Frame 37
main.gs.explosionStart();
Symbol 63 MovieClip [playerLost] Frame 85
stop();
removeMovieClip(this);
main.gs.gameOver();
Symbol 78 MovieClip Frame 1
stop();
Symbol 1682 MovieClip [__Packages.com.electrotank.comedycentral.reno.Main] Frame 0
class com.electrotank.comedycentral.reno.Main
{
var intro, SM, ls, xml, gs, _difficulty, is, hss, introSnd, lss, __get__difficulty, lose, win, path;
function Main (stg) {
setClip(stg);
getClip().owner = this;
init();
}
function unlockIt() {
intro.unlockIt();
}
function init() {
SM = new com.utils.SoundManager(_root);
ls = new com.electrotank.comedycentral.reno.screens.LoadingScreen(getClip(), this);
testing();
}
function testing() {
}
function startNewGame(n) {
var _local2 = n;
xml = ls.XMLParameters;
gs.destroy();
gs = null;
gs = new com.electrotank.comedycentral.reno.screens.GameScreen(_difficulty, n, getClip(), SM, this, xml);
trace((("starting game; map " + _local2) + " difficulty ") + _difficulty);
}
function showInstructions() {
is = new com.electrotank.comedycentral.reno.screens.InstructionsScreen(getClip(), this, SM);
}
function showHighScoreList() {
hss = new com.electrotank.comedycentral.reno.screens.HighScoreScreen(getClip(), this, SM);
}
function introSplash() {
introSnd = SM.playSound("theme", {loops:10000});
intro = new com.electrotank.comedycentral.reno.screens.IntroScreen(getClip(), this, SM);
}
function levelSelection() {
lss = new com.electrotank.comedycentral.reno.screens.LevelSelectScreen(getClip(), this, SM);
}
function set difficulty(n) {
_difficulty = n;
//return(__get__difficulty());
}
function loseGame(time, map, diff, round, pts) {
lose = new com.electrotank.comedycentral.reno.screens.LoseScreen(getClip(), this, diff, round, map, pts, time, SM);
}
function winGame(time, map, diff, pts) {
win = new com.electrotank.comedycentral.reno.screens.WinScreen(getClip(), this, diff, map, pts, time, SM);
}
function quitGame(time) {
levelSelection();
}
function setClip(mc) {
path = mc;
}
function getClip() {
return(path);
}
function destroy() {
getClip().removeMovieClip();
}
var won = false;
var lost = false;
}
Symbol 1683 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.LoadingScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.LoadingScreen extends MovieClip
{
var Root, main, XMLParameters, clip;
function LoadingScreen (p, m) {
super();
Root = p;
main = m;
init();
}
function getBaseDir() {
return(_root.getBaseDir());
}
function init() {
XMLParameters = new XML();
XMLParameters.ignoreWhite = true;
XMLParameters.onLoad = mx.utils.Delegate.create(this, onXMLLoaded);
var _local2 = getBaseDir() + "GameParameters.xml";
XMLParameters.load(_local2);
}
function testing() {
main.__set__difficulty(1);
main.startNewGame(1);
}
function onXMLLoaded() {
main.xml = XMLParameters;
var _local3 = XMLParameters.firstChild.attributes.sponsorURL;
if (((_local3 != "") && (_local3 != undefined)) && (_local3 != "undefined")) {
_root.adURL = _local3;
}
main.introSplash();
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
}
Symbol 1684 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1685 MovieClip [__Packages.com.utils.Observable] Frame 0
class com.utils.Observable
{
var listeners;
function Observable () {
listeners = new Array();
}
function notifyListeners(event, eventOb) {
var _local2 = 0;
while (_local2 < getListeners().length) {
var _local3 = getListeners()[_local2];
_local3[event](eventOb);
_local2++;
}
}
function removeListener(ob) {
var _local2 = 0;
while (_local2 < getListeners().length) {
var _local3 = getListeners()[_local2];
if (_local3 == ob) {
getListeners().splice(_local2, 1);
break;
}
_local2++;
}
}
function addListener(ob) {
getListeners().push(ob);
}
function getListeners() {
return(listeners);
}
}
Symbol 1686 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.IntroScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.IntroScreen extends com.utils.Observable
{
var main, Root, SM, unlockInterval, clip;
function IntroScreen (p, m, sm) {
super();
main = m;
Root = p;
SM = sm;
var _local3 = p.getNextHighestDepth();
var _local4 = p.attachMovie("IntroScreen", "clip" + _local3, _local3);
setClip(_local4);
getClip.owner = this;
init();
}
function unlockIt() {
getClip().play_btn._visible = true;
getClip().shine_mc._visible = true;
clearInterval(unlockInterval);
}
function pseudolisteners() {
unlockInterval = setInterval(this, "unlockIt", 1500);
getClip().play_btn._visible = false;
getClip().play_btn.owner = this;
getClip().play_btn.onPress = function () {
this.owner.playNow();
};
getClip().instructions_btn.owner = this;
getClip().instructions_btn.onPress = function () {
this.owner.showInstructions();
};
getClip().highscores_btn.owner = this;
getClip().highscores_btn.onPress = function () {
this.owner.displayScores();
};
}
function displayScores() {
if (!main.hardInterrupt) {
var _local2 = SM.playSound("click2");
main.showHighScoreList();
}
}
function playNow() {
if (!main.hardInterrupt) {
var _local2 = SM.playSound("click2");
destroy();
main.levelSelection();
}
}
function showInstructions() {
if (!main.hardInterrupt) {
var _local2 = SM.playSound("click2");
main.showInstructions();
main.hardInterrupt = true;
}
}
function testing() {
}
function init() {
pseudolisteners();
testing();
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
}
Symbol 1687 MovieClip [__Packages.com.utils.SoundManager] Frame 0
class com.utils.SoundManager extends com.utils.Observable
{
var muted, notifyListeners, path, baseSound, lastVolume, volume, pan;
function SoundManager (tmppath) {
super();
initialize(tmppath);
}
function initialize(tmppath) {
muted = false;
notifyListeners("MuteChanged", {target:this});
var _local2 = tmppath.getNextHighestDepth();
path = tmppath.createEmptyMovieClip("soundmanager_mc", _local2);
baseSound = new Sound(path);
setVolume(100);
setPan(0);
lastVolume = getVolume();
}
function setVolume(num) {
volume = num;
baseSound.setVolume(getVolume());
}
function getVolume() {
return(volume);
}
function getPan() {
return(pan);
}
function setPan(num) {
pan = num;
baseSound.setPan(getPan());
}
function mute() {
muted = true;
lastVolume = getVolume();
setVolume(0.1);
notifyListeners("MuteChanged", {target:this});
trace("muted");
}
function unmute() {
muted = false;
setVolume(lastVolume);
notifyListeners("MuteChanged", {target:this});
}
function getMute() {
return(muted);
}
function playSound(name, info) {
if (info == undefined) {
info = new Object();
}
if (info.volume == undefined) {
info.volume = 100;
}
if (info.pan == undefined) {
info.pan = 0;
}
if (info.secondsOffset == undefined) {
info.secondsOffset = 0;
}
if (info.loops == undefined) {
info.loops = 0;
}
if (info.delay == undefined) {
info.delay = 0;
}
info.path = path;
var _local3 = new com.utils.ETSound(name, info);
if (_local3.getSound().duration == undefined) {
com.utils.Logger.log("Sound that doesn't exist: " + name, com.utils.Logger.severe);
}
return(_local3);
}
}
Symbol 1688 MovieClip [__Packages.com.utils.ETSound] Frame 0
class com.utils.ETSound extends com.utils.Observable
{
var name, playing, dieWhenDoneFading, info, clip, snd, intervalId, targetVolume, totalFrames, volDiffAmount, frame, notifyListeners;
function ETSound (tmpname, tmpinfo) {
super();
name = tmpname;
playing = true;
dieWhenDoneFading = false;
info = tmpinfo;
var _local3 = info.path.getNextHighestDepth();
clip = info.path.createEmptyMovieClip("snd" + _local3, _local3);
snd = new Sound(clip);
snd.attachSound(name);
snd.setVolume(info.volume);
snd.setPan(info.pan);
snd.owner = this;
snd.onSoundComplete = function () {
this.owner.soundComplete();
};
if (info.delay == 0) {
start();
} else {
intervalId = setInterval(this, "playMe2", info.delay);
}
}
function fadeTo(vol, tframes) {
targetVolume = vol;
totalFrames = tframes;
volDiffAmount = (vol - getVolume()) / totalFrames;
frame = 0;
clip.owner = this;
clip.onEnterFrame = function () {
this.owner.fade();
};
}
function fade() {
frame++;
var _local2 = getVolume();
_local2 = _local2 + volDiffAmount;
setVolume(_local2);
if (frame >= totalFrames) {
_local2 = targetVolume;
setVolume(_local2);
clip.onEnterFrame = null;
notifyListeners("fadeComplete", {target:this});
if (dieWhenDoneFading) {
setVolume(50);
stopSound();
soundComplete();
}
}
}
function fadeAndDie(fr) {
if (fr == undefined) {
fr = 15;
}
dieWhenDoneFading = true;
fadeTo(0, 15);
}
function setVolume(vol) {
snd.setVolume(vol);
}
function getVolume() {
return(snd.getVolume());
}
function stopSound() {
playing = false;
snd.stop(name);
}
function playMe2() {
clearInterval(intervalId);
start();
}
function start() {
playing = true;
snd.start(info.secondsOffset, info.loops);
}
function soundComplete() {
notifyListeners("soundComplete", {target:this});
destroy();
}
function destroy() {
snd = null;
clip.removeMovieClip();
}
function getSound() {
return(snd);
}
}
Symbol 1689 MovieClip [__Packages.com.utils.Logger] Frame 0
class com.utils.Logger extends com.utils.Observable
{
static var _instance;
function Logger () {
super();
}
static function getLogs(level) {
var _local2 = new Array();
if (level == undefined) {
level = 0;
}
var _local1 = 0;
while (_local1 < logs.length) {
if (logs[_local1].level <= level) {
_local2.push(logs[_local1]);
}
_local1++;
}
return(_local2);
}
static function log(message, level) {
if (level == undefined) {
level = 1;
}
if (level > LogLevel) {
return(undefined);
}
var _local5 = " ";
message = (levelNames[level] + " ") + message;
var _local1 = {message:message, level:level};
logs.push(_local1);
_instance.notifyListeners("logged", {target:_instance, log:_local1});
}
static function init() {
_instance = new com.utils.Logger();
}
static function listen(path) {
_instance.addListener(path);
}
static var logs = new Array();
static var info = 4;
static var debug = 2;
static var severe = 1;
static var levelNames = [null, "[SEVERE]", "[DEBUG]", null, "[INFO]"];
static var LogLevel = info;
}
Symbol 1690 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.LevelSelectScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.LevelSelectScreen extends com.utils.Observable
{
var main, Root, SM, clip;
function LevelSelectScreen (p, m, sm) {
super();
main = m;
Root = p;
SM = sm;
var _local3 = p.getNextHighestDepth();
var _local4 = p.attachMovie("LevelSelectScreen", "clip" + _local3, _local3);
setClip(_local4);
getClip.owner = this;
init();
}
function updateScreen(mapIn) {
switch (mapIn) {
case 1 :
getClip().balloon.txt.gotoAndStop("jail");
moveBalloon(417, 84);
break;
case 2 :
getClip().balloon.txt.gotoAndStop("casino");
moveBalloon(521, 77);
break;
case 3 :
getClip().balloon.txt.gotoAndStop("parade");
moveBalloon(451, 180);
}
}
function moveBalloon(xpos, ypos) {
getClip().balloon._x = xpos;
getClip().balloon._y = ypos;
}
function updateMapGraphics(num) {
switch (num) {
case 1 :
getClip().map1_btn._alpha = 100;
getClip().map2_btn._alpha = 50;
getClip().map3_btn._alpha = 50;
break;
case 2 :
getClip().map2_btn._alpha = 100;
getClip().map1_btn._alpha = 50;
getClip().map3_btn._alpha = 50;
break;
case 3 :
getClip().map3_btn._alpha = 100;
getClip().map1_btn._alpha = 50;
getClip().map2_btn._alpha = 50;
}
}
function setMap(n) {
map = n;
switch (n) {
case 1 :
getClip().highlight1_mc._visible = true;
getClip().highlight2_mc._visible = false;
getClip().highlight3_mc._visible = false;
break;
case 2 :
getClip().highlight1_mc._visible = false;
getClip().highlight2_mc._visible = true;
getClip().highlight3_mc._visible = false;
break;
case 3 :
getClip().highlight1_mc._visible = false;
getClip().highlight2_mc._visible = false;
getClip().highlight3_mc._visible = true;
}
}
function pseudolisteners() {
getClip().map1_btn.owner = this;
getClip().map1_btn.onRollOver = function () {
this.owner.updateScreen(1);
};
getClip().map1_btn.onRollOut = function () {
this.owner.updateScreen(this.owner.map);
};
getClip().map1_btn.onPress = function () {
this.owner.setMap(1);
};
getClip().map2_btn.owner = this;
getClip().map2_btn.onRollOver = function () {
this.owner.updateScreen(2);
};
getClip().map2_btn.onRollOut = function () {
this.owner.updateScreen(this.owner.map);
};
getClip().map2_btn.onPress = function () {
this.owner.setMap(2);
};
getClip().map3_btn.owner = this;
getClip().map3_btn.onRollOver = function () {
this.owner.updateScreen(3);
};
getClip().map3_btn.onRollOut = function () {
this.owner.updateScreen(this.owner.map);
};
getClip().map3_btn.onPress = function () {
this.owner.setMap(3);
};
getClip().diff1_btn.owner = this;
getClip().diff1_btn.onPress = function () {
this.owner.setDiff(this, 1);
};
getClip().diff2_btn.owner = this;
getClip().diff2_btn.onPress = function () {
this.owner.setDiff(this, 2);
};
getClip().diff3_btn.owner = this;
getClip().diff3_btn.onPress = function () {
this.owner.setDiff(this, 3);
};
getClip().back_btn.owner = this;
getClip().back_btn.onPress = function () {
this.owner.backToIntro();
};
getClip().play_btn.owner = this;
getClip().play_btn.onPress = function () {
this.owner.playGame();
};
getClip().instructions_btn.owner = this;
getClip().instructions_btn.onPress = function () {
this.owner.instructions();
};
getClip().highscores_btn.owner = this;
getClip().highscores_btn.onPress = function () {
this.owner.highScores();
};
}
function instructions() {
if (!main.hardInterrupt) {
var _local2 = SM.playSound("click2");
main.hardInterrupt = true;
main.showInstructions();
}
}
function highScores() {
if (!main.hardInterrupt) {
var _local2 = SM.playSound("click2");
main.showHighScoreList();
}
}
function deselectAll() {
getClip().diff1_btn.gotoAndStop("off");
getClip().diff2_btn.gotoAndStop("off");
getClip().diff3_btn.gotoAndStop("off");
}
function setDiff(btn, n) {
deselectAll();
btn.gotoAndStop("on");
grayButtons(false);
difficulty = n;
ungrayButton(n);
}
function playGame() {
if (!main.hardInterrupt) {
var _local2 = SM.playSound("click2");
main.__set__difficulty(difficulty);
destroy();
main.introSnd.fadeAndDie(10);
main.startNewGame(map);
}
}
function backToIntro() {
var _local2 = SM.playSound("click2");
destroy();
main.introSnd.fadeAndDie(1);
main.introSplash();
}
function ungrayButton(n) {
switch (n) {
case 1 :
getClip().diff1_btn._alpha = 100;
break;
case 2 :
getClip().diff2_btn._alpha = 100;
break;
case 3 :
getClip().diff3_btn._alpha = 100;
}
}
function grayButtons(newGame) {
if (!newGame) {
getClip().diff1_btn._alpha = 50;
}
getClip().diff2_btn._alpha = 50;
getClip().diff3_btn._alpha = 50;
}
function testing() {
}
function turnOffHighlights() {
getClip().highlight1_mc._visible = false;
getClip().highlight2_mc._visible = false;
getClip().highlight3_mc._visible = false;
}
function init() {
pseudolisteners();
turnOffHighlights();
grayButtons(true);
getClip().diff1_btn.gotoAndStop("on");
getClip().balloon.txt.selectable = false;
testing();
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
var difficulty = 1;
var map = 1;
}
Symbol 1691 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.GameScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.GameScreen extends com.utils.Observable
{
var parameters, map, difficulty, Root, main, SM, SO, announcerMC, testFlag, btn0cost, btn1cost, btn2cost, btn3cost, btn4cost, btn5cost, btn6cost, btn7cost, hardInterrupt, mouse, player, towerMenu, road, road2, road3, square, startGameDate, critterClock, tower, towerContainer, towerArray, removeListener, addListener, bulletArray, critterArray, critterContainer, bulletContainer, level, newGame, newGame2, musicLoop, levelKillTarget, pauseSplash, instructionsScreen, currentTypeOfTower, notifyListeners, tempMC, endGameDate, clip;
function GameScreen (dl, whichMap, p, sm, t, xml) {
super();
parameters = xml;
map = whichMap;
difficulty = dl;
XMLSetup(parameters);
Root = p;
main = t;
SM = sm;
SO = SharedObject.getLocal("Reno911", "/");
Root.owner = this;
var _local4 = p.getNextHighestDepth();
var _local6 = p.attachMovie("GameScreen" + map, "game_screen", _local4);
setClip(_local6);
getClip().owner = this;
announcerMC = new MovieClip();
announcerMC.owner = this;
var _local3;
var _local5;
switch (map) {
case 1 :
_local3 = 90;
_local5 = 90;
break;
case 2 :
_local3 = 270;
_local5 = 380;
break;
case 3 :
_local3 = 60;
_local5 = 140;
}
getClip().buttons.repair_btn._visible = false;
getClip().buttons.soundon_btn._visible = false;
attachContainers(getClip(), true);
_local4++;
getClip().popupContainer.attachMovie("healthBarLarge", "healthBar", _local4, {_x:_local3, _y:_local5});
_local4++;
getClip().popupContainer.attachMovie("stats", "stats", _local4);
init(map);
getClip().popupContainer.stats.level_txt.selectable = false;
getClip().popupContainer.stats.critter_hp_txt.selectable = false;
getClip().popupContainer.stats.player_dps_txt.selectable = false;
}
function testing(rd) {
setRound(1);
testFlag = true;
getClip().buttons.cheat_btn._visible = true;
getClip().buttons.showgrid_btn._visible = true;
getClip().stats.critter_hp_txt._visible = true;
getClip().stats.player_dps_txt._visible = true;
}
function XMLSetup(x) {
var _local4 = new Array();
var _local5 = difficulty - 1;
_local4 = x.firstChild.childNodes[0].childNodes;
var _local11 = Number(_local4[0].attributes.max);
var _local13 = Number(_local4[0].attributes.min);
MONEYAWARDEDX = interpolate(_local13, _local11, _local5, "small", 3, false);
var _local10 = Number(_local4[1].attributes.min);
var _local14 = Number(_local4[1].attributes.max);
POINTSX = interpolate(_local10, _local14, _local5, "small", 3, false);
var _local8 = Number(_local4[2].attributes.min);
var _local7 = Number(_local4[2].attributes.max);
CASHPERCRITTERX = interpolate(_local8, _local7, _local5, "small", 3, false);
var _local12 = Number(x.firstChild.childNodes[5].childNodes[map - 1].attributes.delayBetweenBadguysAppearMax);
var _local9 = Number(x.firstChild.childNodes[5].childNodes[map - 1].attributes.delayBetweenBadguysAppearMin);
APPEAR_DELAY = Math.floor(interpolate(_local9, _local12, -_local5, "large", 3, false));
var _local3 = x.firstChild.childNodes[3].childNodes;
var _local2 = 2;
btn0cost = Number(_local3[0 + _local2].attributes.cost);
btn1cost = Number(_local3[1 + _local2].attributes.cost);
btn2cost = Number(_local3[2 + _local2].attributes.cost);
btn3cost = Number(_local3[3 + _local2].attributes.cost);
btn4cost = Number(_local3[4 + _local2].attributes.cost);
btn5cost = Number(_local3[5 + _local2].attributes.cost);
btn6cost = Number(_local3[6 + _local2].attributes.cost);
btn7cost = Number(_local3[7 + _local2].attributes.cost);
trace((("GSXML: $" + MONEYAWARDEDX) + " dly") + APPEAR_DELAY);
}
function interpolate(small, large, whichStep, useVal, steps, returnStep) {
var _local1;
if (steps > 1) {
_local1 = (large - small) / (steps - 1);
} else {
_local1 = large - small;
}
var _local2;
switch (useVal) {
case "small" :
_local2 = small + (whichStep * _local1);
break;
case "large" :
_local2 = large + (whichStep * _local1);
}
if (!returnStep) {
return(_local2);
}
return(_local1);
}
function init(mapToUse) {
hardInterrupt = true;
mouse = new com.electrotank.comedycentral.reno.input.MouseInput(getClip(), this);
testFlag = false;
getClip().buttons.pause_btn._visible = false;
getClip().buttons.cheat_btn._visible = false;
getClip().buttons.showgrid_btn._visible = false;
getClip().stats.critter_hp_txt._visible = false;
getClip().stats.player_dps_txt.text = 0;
getClip().stats.player_dps_txt._visible = false;
getClip().grid_mc._visible = false;
map = mapToUse;
var _local2 = new Array(btn0cost, btn1cost, btn2cost, btn3cost, btn4cost, btn5cost, btn6cost, btn7cost);
player = new com.electrotank.comedycentral.reno.player.Player(getClip(), parameters, difficulty, _local2, POINTSX);
towerMenu = new com.electrotank.comedycentral.reno.player.TowerMenu(getClip().popupContainer, player);
resetArrays(true);
critterClockStart();
switch (map) {
case 1 :
road = new com.electrotank.comedycentral.reno.board.Road(getClip(), map, 1);
break;
case 2 :
road = new com.electrotank.comedycentral.reno.board.Road(getClip(), map, 1);
road2 = new com.electrotank.comedycentral.reno.board.Road(getClip(), map, 2);
break;
case 3 :
road = new com.electrotank.comedycentral.reno.board.Road(getClip(), map, 1);
road2 = new com.electrotank.comedycentral.reno.board.Road(getClip(), map, 2);
road3 = new com.electrotank.comedycentral.reno.board.Road(getClip(), map, 3);
}
square = new com.electrotank.comedycentral.reno.board.Square(getClip(), road);
assignListeners();
startGameDate = new Date();
setRound(1);
}
function critterClockStart() {
critterClock = new Object();
critterClock.ticking = false;
critterClock.count = 0;
}
function placeTower(type) {
tower = new com.electrotank.comedycentral.reno.player.Tower(square.getClip()._x, square.getClip()._y, towerContainer, road, false, player, towerArray, parameters, type, SM);
switch (type) {
case "basic" :
tower.getClip().gotoAndStop("tower0_mc");
break;
case "water" :
tower.getClip().gotoAndStop("tower1_mc");
break;
case "fire" :
tower.getClip().gotoAndStop("tower2_mc");
break;
case "electric" :
tower.getClip().gotoAndStop("tower3_mc");
break;
case "aoe" :
tower.getClip().gotoAndStop("tower4_mc");
break;
case "bio" :
tower.getClip().gotoAndStop("tower5_mc");
break;
case "slow" :
tower.getClip().gotoAndStop("tower6_mc");
break;
case "artillery" :
tower.getClip().gotoAndStop("tower7_mc");
}
getClip().redX.removeMovieClip();
}
function removeListeners() {
removeListener(mouse);
removeListener(square);
mouse.removeListener(square);
var _local4 = towerArray.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = towerArray[_local2];
_local3.scrapTower(road);
_local2++;
}
}
function assignListeners() {
addListener(mouse);
addListener(square);
mouse.addListener(square);
prepUI();
prepBuyers();
getClip().onEnterFrame = function () {
this.owner.mouse.mouseHandler(this.owner.outputCursorPosition);
this.owner.run();
};
}
function prepUI() {
getClip().buttons.cheat_btn.owner = this;
getClip().buttons.cheat_btn.onPress = function () {
if (!this.owner.mouse.interrupt) {
this.owner.passLevel();
}
};
getClip().buttons.showgrid_btn.owner = this;
getClip().buttons.showgrid_btn.onPress = function () {
this.owner.getClip().grid_mc._visible = !this.owner.getClip().grid_mc._visible;
};
getClip().buttons.soundoff_btn.owner = this;
getClip().buttons.soundoff_btn.onPress = function () {
this.owner.toggleMute();
};
getClip().buttons.soundon_btn.owner = this;
getClip().buttons.soundon_btn.onPress = function () {
this.owner.toggleMute();
};
getClip().buttons.pause_btn.owner = this;
getClip().buttons.pause_btn.onPress = function () {
if (!this.owner.hardInterrupt) {
this.owner.pauseGame();
}
};
getClip().buttons.quit_btn.owner = this;
getClip().buttons.quit_btn.onPress = function () {
this.owner.quit();
};
getClip().buttons.repair_btn.owner = this;
getClip().buttons.repair_btn.onPress = function () {
if ((!this.owner.mouse.interrupt) && (!this.owner.hardInterrupt)) {
this.owner.player.repair();
}
};
getClip().buttons.instructions_btn.owner = this;
getClip().buttons.instructions_btn.onPress = function () {
if (!this.owner.mouse.interrupt) {
this.owner.instructions();
}
};
getClip().skirt_mc.owner = this;
getClip().skirt_mc.onPress = function () {
if ((!this.owner.mouse.interrupt) && (this.owner.square.building())) {
this.owner.placeTower(this.owner.currentTypeOfTower);
}
};
}
function collide() {
var _local9 = 0;
while (_local9 < bulletArray.length) {
var _local2 = bulletArray[_local9];
var _local5 = 0;
while (_local5 < critterArray.length) {
var _local4 = critterArray[_local5];
var _local7 = _local4.getClip().hitTest(_local2.getClip()._x, _local2.getClip()._y);
if (_local7 && (!_local4.dying)) {
_local2.seize();
var _local8 = "ow_" + _local2.myType;
var _local10 = SM.playSound(_local8, {volume:50});
_local4.takeDamage(_local2.__get__pain(), _local2.myType, _local2.SLOWFRAMES, _local2.SLOWPERCENT, _local2.DOTFRAMES, _local2.DOTDAMAGE, _local2.SPLASHRADIUS, _local2.SPLASHDMG, _local2.STUNFRAMES, _local2.STUNCHANCE);
var _local6 = getClip().getNextHighestDepth();
var _local3 = getClip().attachMovie("collision", "collision" + _local6, _local6, {_x:_local4.getClip()._x, _y:_local4.getClip()._y});
switch (_local2.myType) {
case "basic" :
_local3.gotoAndStop("muzzle0_mc");
break;
case "water" :
_local3.gotoAndStop("muzzle1_mc");
break;
case "fire" :
_local3.gotoAndStop("muzzle2_mc");
break;
case "electric" :
_local3.gotoAndStop("muzzle3_mc");
break;
case "aoe" :
_local3.gotoAndStop("muzzle4_mc");
break;
case "bio" :
_local3.gotoAndStop("muzzle5_mc");
break;
case "slow" :
_local3.gotoAndStop("muzzle6_mc");
break;
case "artillery" :
_local3.gotoAndStop("muzzle7_mc");
}
}
_local5++;
}
_local9++;
}
}
function attachContainers(p, newGameFlag) {
var _local2 = 10;
if (newGameFlag) {
_local2 = 2000;
towerContainer = p.attachMovie("towerBox", "towers", _local2);
towerContainer.owner = this;
_local2++;
getClip().createEmptyMovieClip("popupContainer", 2201);
getClip().popupContainer.owner = this;
} else {
critterContainer = p.attachMovie("critterBox", "critters", _local2);
critterContainer.owner = this;
_local2++;
bulletContainer = p.attachMovie("bulletBox", "bullets", _local2);
bulletContainer.owner = this;
}
}
function resetArrays(newGameFlag) {
if (newGameFlag) {
towerArray = new Array();
}
bulletArray = new Array();
critterArray = new Array();
}
function destroyContainers(gameQuitFlag) {
critterContainer.removeMovieClip();
bulletContainer.removeMovieClip();
if (gameQuitFlag) {
towerContainer.removeMovieClip();
getClip().popupContainer.removeMovieClip();
}
}
function splashDonePlaying() {
advanceLevel();
}
function nextLevelAnnouncement(rd) {
var _local4 = getClip().popupContainer;
var _local5 = _local4.getNextHighestDepth();
_local4.attachMovie("announcement", "nextLvAnnounce", _local5, {_x:275, _y:220});
var _local6 = typeOfCritter(rd);
var _local2 = _local6[0];
var _local3;
if (((_local2 == "perp1") || (_local2 == "perp2")) || (_local2 == "perp3")) {
_local2 = "perp";
} else if (((_local2 == "drunk1") || (_local2 == "drunk2")) || (_local2 == "drunk3")) {
_local2 = "drunk";
} else if (((_local2 == "hood1") || (_local2 == "hood2")) || (_local2 == "hood3")) {
_local2 = "hood";
} else if (((_local2 == "junkie1") || (_local2 == "junkie2")) || (_local2 == "junkie3")) {
_local2 = "junkie";
} else if (((_local2 == "terrorist1") || (_local2 == "terrorist2")) || (_local2 == "terrorist3")) {
_local2 = "terrorist";
} else if (((_local2 == "biker1") || (_local2 == "biker2")) || (_local2 == "biker3")) {
_local2 = "biker";
}
switch (_local2) {
case "perp" :
_local3 = "Perpetrators!";
break;
case "drunk" :
_local3 = "Naked Drunks!";
break;
case "hood" :
_local3 = "Hoodlums!";
break;
case "junkie" :
_local3 = "Junkies!";
break;
case "terrorist" :
_local3 = "Luchadors!";
break;
case "biker" :
_local3 = "Hell's Angels!";
break;
case "armored_car" :
_local3 = "LOOK OUT!";
break;
case "helicopter" :
_local3 = "LOOK OUT!";
break;
case "tank" :
_local3 = "LOOK OUT!";
}
_local4.nextLvAnnounce.round_splash_txt.selectable = false;
_local4.nextLvAnnounce.round_splash_txt.text = (("Round " + level) + ": ") + _local3;
}
function showMiniInstructions(page) {
var _local2 = getClip().popupContainer;
switch (page) {
case 1 :
var _local3 = _local2.getNextHighestDepth();
_local2.attachMovie("mini_instructions", "miniInstructions", 560, {_x:250, _y:400});
_local2.miniInstructions.firstMessage.gotoAndPlay(1);
var _local4 = SM.playSound("message");
break;
case 2 :
_local2.miniInstructions.gotoAndStop(2);
_local2.miniInstructions._x = 230;
_local2.miniInstructions._y = 270;
if (map == 2) {
_local2.miniInstructions._y = 290;
}
_local2.miniInstructions.secondMessage.gotoAndPlay(1);
_local4 = SM.playSound("message");
break;
case 3 :
newGame = false;
_local4 = SM.playSound("message");
_local2.miniInstructions.gotoAndStop(3);
_local2.miniInstructions._x = 250;
_local2.miniInstructions._y = 400;
_local2.miniInstructions.thirdMessage.gotoAndPlay(1);
var _local7 = SM.playSound("message");
nextLevelAnnouncement(1);
}
}
function setRound(rd) {
level = rd;
getClip().popupContainer.stats.level_txt.text = "Round " + level;
if (rd == 1) {
newGame = true;
newGame2 = true;
showMiniInstructions(1);
}
}
function pickRoad(i) {
var _local2;
switch (map) {
case 1 :
_local2 = road;
break;
case 2 :
if ((i % 2) == 0) {
_local2 = road;
} else {
_local2 = road2;
}
break;
case 3 :
if ((i % 3) == 0) {
_local2 = road;
} else if ((i % 3) == 1) {
_local2 = road2;
} else {
_local2 = road3;
}
}
return(_local2);
}
function showExplosion(newRound, gameEnding) {
var _local10 = SM.playSound("ow_artillery");
var _local2 = getClip().popupContainer;
var _local5 = _local2.getNextHighestDepth();
if (newRound) {
switch (map) {
case 1 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:410, _y:290});
break;
case 2 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:94, _y:56});
_local5++;
_local2.attachMovie("explosion", "explosion2", _local5, {_x:434, _y:40});
break;
case 3 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:442, _y:26});
_local5++;
_local2.attachMovie("explosion", "explosion2", _local5, {_x:438, _y:158});
_local5++;
_local2.attachMovie("explosion", "explosion3", _local5, {_x:436, _y:318});
}
} else if (!gameEnding) {
var _local4 = Math.random(10);
var _local3 = Math.random(10);
switch (map) {
case 1 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:70 + _local4, _y:40 + _local3});
break;
case 2 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:225 + _local4, _y:390 + _local3});
break;
case 3 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:60 + _local4, _y:140 + _local3});
}
} else if (gameEnding) {
var _local6 = 0;
while (_local6 < 4) {
var _local4 = Math.random(30);
var _local3 = Math.random(30);
switch (map) {
case 1 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:70 + _local4, _y:40 + _local3});
break;
case 2 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:225 + _local4, _y:390 + _local3});
break;
case 3 :
_local2.attachMovie("explosion", "explosion", _local5, {_x:60 + _local4, _y:140 + _local3});
}
_local6++;
}
}
}
function gameOverFireworks() {
musicLoop.fadeAndDie(5);
trace("gs.GAME OVER - WIN");
var _local2;
var _local3;
switch (map) {
case 1 :
_local2 = 70;
_local3 = 40;
break;
case 2 :
_local2 = 70;
_local3 = 40;
break;
case 3 :
_local2 = 70;
_local3 = 40;
}
var _local4 = 10000 + getClip().popupContainer.getNextHighestDepth();
getClip().popupContainer.attachMovie("playerWon", "playerWon" + _local4, _local4, {_x:_local2, _y:_local3});
}
function fireworkDone() {
}
function fireworkStart() {
trace("playing die sound");
var _local2 = SM.playSound("fireworksSnd");
}
function explosionStart() {
trace("playing die sound");
var _local2 = SM.playSound("ow_artillery");
}
function gameOverExplosion() {
trace("gs.GAME OVER - LOSE");
var _local2;
var _local3;
switch (map) {
case 1 :
_local2 = 70;
_local3 = 40;
break;
case 2 :
_local2 = 245;
_local3 = 390;
break;
case 3 :
_local2 = 60;
_local3 = 155;
}
var _local4 = 10000 + getClip().popupContainer.getNextHighestDepth();
_local4++;
getClip().popupContainer.attachMovie("playerLost", "playerLost" + _local4, _local4, {_x:_local2, _y:_local3});
}
function levelStart() {
showExplosion(true, false);
if ((level % 5) == 0) {
musicLoop.fadeAndDie(5);
if ((level % 10) == 0) {
musicLoop = SM.playSound("boss", {loops:10000, volume:25});
} else {
musicLoop = SM.playSound("pickup", {loops:10000, volume:25});
}
}
if ((level % 10) == 1) {
musicLoop.fadeAndDie(5);
musicLoop = SM.playSound("casual", {loops:10000, volume:25});
}
musicLoop.fadeTo(50, 15);
critterClock.critters = 0;
levelKillTarget = numOf(level);
var _local5 = typeOfCritter(level);
var _local6 = levelKillTarget;
var _local3 = 0;
while (_local3 < _local6) {
var _local4 = pickRoad(_local3);
var _local2 = new com.electrotank.comedycentral.reno.enemy.Critter(critterContainer, map, _local4, critterArray, parameters, _local5, difficulty);
switch (_local5[0]) {
case "perp" :
_local2.getClip().gotoAndStop("badguy0_mc");
break;
case "perp1" :
_local2.getClip().gotoAndStop("badguy9_mc");
break;
case "perp2" :
_local2.getClip().gotoAndStop("badguy10_mc");
break;
case "perp3" :
_local2.getClip().gotoAndStop("badguy11_mc");
break;
case "drunk" :
_local2.getClip().gotoAndStop("badguy1_mc");
break;
case "drunk1" :
_local2.getClip().gotoAndStop("badguy12_mc");
break;
case "drunk2" :
_local2.getClip().gotoAndStop("badguy13_mc");
break;
case "drunk3" :
_local2.getClip().gotoAndStop("badguy14_mc");
break;
case "hood" :
_local2.getClip().gotoAndStop("badguy2_mc");
break;
case "hood1" :
_local2.getClip().gotoAndStop("badguy15_mc");
break;
case "hood2" :
_local2.getClip().gotoAndStop("badguy16_mc");
break;
case "hood3" :
_local2.getClip().gotoAndStop("badguy17_mc");
break;
case "junkie" :
_local2.getClip().gotoAndStop("badguy3_mc");
break;
case "junkie1" :
_local2.getClip().gotoAndStop("badguy18_mc");
break;
case "junkie2" :
_local2.getClip().gotoAndStop("badguy19_mc");
break;
case "junkie3" :
_local2.getClip().gotoAndStop("badguy20_mc");
break;
case "terrorist" :
_local2.getClip().gotoAndStop("badguy4_mc");
break;
case "terrorist1" :
_local2.getClip().gotoAndStop("badguy21_mc");
break;
case "terrorist2" :
_local2.getClip().gotoAndStop("badguy22_mc");
break;
case "terrorist3" :
_local2.getClip().gotoAndStop("badguy23_mc");
break;
case "biker" :
_local2.getClip().gotoAndStop("badguy5_mc");
break;
case "biker1" :
_local2.getClip().gotoAndStop("badguy24_mc");
break;
case "biker2" :
_local2.getClip().gotoAndStop("badguy25_mc");
break;
case "biker3" :
_local2.getClip().gotoAndStop("badguy26_mc");
break;
case "armored_car" :
_local2.getClip().gotoAndStop("badguy6_mc");
break;
case "helicopter" :
_local2.getClip().gotoAndStop("badguy7_mc");
break;
case "tank" :
_local2.getClip().gotoAndStop("badguy8_mc");
break;
default :
trace("GS.levelStart: BAD TYPE");
}
_local3++;
}
critterClock.ticking = true;
}
function appear(e, m) {
var _local4 = e.critters;
var _local2 = critterArray[_local4];
switch (m) {
case 1 :
_local2.onScreen(-1, 1);
break;
case 2 :
switch (_local2.__get__myRoad()) {
case road :
_local2.onScreen(1, 1);
break;
case road2 :
_local2.onScreen(-1, 1);
}
break;
case 3 :
switch (_local2.__get__myRoad()) {
case road :
_local2.onScreen(-1, 1);
break;
case road2 :
_local2.onScreen(-1, 1);
break;
case road3 :
_local2.onScreen(-1, 1);
}
}
e.count = 0;
e.critters++;
if (e.critters == levelKillTarget) {
critterClock.ticking = false;
}
}
function numOf(lv) {
var _local2 = new Array();
_local2 = parameters.firstChild.childNodes[5].childNodes[map - 1].childNodes[lv - 1];
var _local3 = Number(_local2.attributes.numOfEnemies);
return(_local3);
}
function typeOfCritter(lv) {
var _local2 = new Array();
_local2 = parameters.firstChild.childNodes[5].childNodes[map - 1].childNodes[lv - 1];
var _local3 = new Array();
_local3.push(_local2.attributes.enemy, _local2.attributes.healthModifier, _local2.attributes.valueModifier, _local2.attributes.pointsModifier);
return(_local3);
}
function toggleMute() {
var _local2 = SM.playSound("click2");
isMuted = !isMuted;
if (SM.getMute()) {
SM.unmute();
getClip().buttons.soundoff_btn._visible = true;
getClip().buttons.soundon_btn._visible = false;
} else {
SM.mute();
getClip().buttons.soundoff_btn._visible = false;
getClip().buttons.soundon_btn._visible = true;
}
}
function pauseGame() {
var _local4 = SM.playSound("click2");
mouse.togglePause();
if (!isMuted) {
toggleMute();
}
var _local2 = getClip().popupContainer;
var _local3 = _local2.getNextHighestDepth();
if (mouse.interrupt) {
pauseSplash = _local2.attachMovie("paused", "", _local3);
}
if (!mouse.interrupt) {
pauseSplash.removeMovieClip();
}
}
function prepBuyers() {
prepBuyButton(getClip().buttons.buy_basic_mc, "basic");
getClip().buttons.buy_basic_mc._x = 252;
if (!testFlag) {
getClip().buttons.buy_water_mc._visible = false;
getClip().buttons.buy_fire_mc._visible = false;
getClip().buttons.buy_electric_mc._visible = false;
getClip().buttons.buy_aoe_mc._visible = false;
getClip().buttons.buy_bio_mc._visible = false;
getClip().buttons.buy_slow_mc._visible = false;
getClip().buttons.buy_artillery_mc._visible = false;
}
if (map == 2) {
getClip().buttons.buy_water_mc._visible = true;
getClip().buttons.buy_fire_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 114;
getClip().buttons.buy_water_mc._x = 262;
getClip().buttons.buy_fire_mc._x = 409;
} else if (map == 3) {
getClip().buttons.buy_water_mc._visible = true;
getClip().buttons.buy_fire_mc._visible = true;
getClip().buttons.buy_electric_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 87;
getClip().buttons.buy_water_mc._x = 197;
getClip().buttons.buy_fire_mc._x = 307;
getClip().buttons.buy_electric_mc._x = 417;
}
prepBuyButton(getClip().buttons.buy_water_mc, "water");
prepBuyButton(getClip().buttons.buy_fire_mc, "fire");
prepBuyButton(getClip().buttons.buy_electric_mc, "electric");
prepBuyButton(getClip().buttons.buy_aoe_mc, "aoe");
prepBuyButton(getClip().buttons.buy_bio_mc, "bio");
prepBuyButton(getClip().buttons.buy_slow_mc, "slow");
prepBuyButton(getClip().buttons.buy_artillery_mc, "artillery");
}
function prepBuyButton(m, type) {
m.btn.owner = this;
var _local2;
switch (type) {
case "basic" :
_local2 = btn0cost;
break;
case "water" :
_local2 = btn1cost;
break;
case "fire" :
_local2 = btn2cost;
break;
case "electric" :
_local2 = btn3cost;
break;
case "aoe" :
_local2 = btn4cost;
break;
case "bio" :
_local2 = btn5cost;
break;
case "slow" :
_local2 = btn6cost;
break;
case "artillery" :
_local2 = btn7cost;
}
m.cost_txt.selectable = false;
m.cost_txt.text = "$" + _local2;
m.btn.onPress = function () {
if ((!this.owner.mouse.interrupt) && (this._alpha == 100)) {
this.owner.buttonClicked(type);
if (this.owner.newGame) {
this.owner.showMiniInstructions(2);
}
}
};
m.btn.onRollOver = function () {
if ((!this.owner.mouse.interrupt) && (this._alpha == 100)) {
this.owner.buttonOver(type);
}
};
m.btn.onRollOut = function () {
if (!this.owner.mouse.interrupt) {
this.owner.buttonOut(type);
}
};
}
function instructions() {
var _local6 = SM.playSound("click2");
if (!hardInterrupt) {
hardInterrupt = true;
var _local3 = 0;
var _local4 = 0;
var _local2 = getClip().popupContainer;
var _local5 = _local2.getNextHighestDepth();
instructionsScreen = new com.electrotank.comedycentral.reno.screens.InstructionsScreen(_local2);
}
}
function setTowerToBuy(t) {
currentTypeOfTower = t;
}
function buttonClicked(type) {
var _local7 = SM.playSound("click2");
getClip().redX.removeMovieClip();
setTowerToBuy(type);
notifyListeners("clickedBuildButton", {target:this, towerType:type});
var _local2;
var _local3 = getClip().buttons.buy_basic_mc._y;
switch (type) {
case "basic" :
_local2 = getClip().buttons.buy_basic_mc._x;
break;
case "water" :
_local2 = getClip().buttons.buy_water_mc._x;
break;
case "fire" :
_local2 = getClip().buttons.buy_fire_mc._x;
break;
case "electric" :
_local2 = getClip().buttons.buy_electric_mc._x;
break;
case "aoe" :
_local2 = getClip().buttons.buy_aoe_mc._x;
break;
case "bio" :
_local2 = getClip().buttons.buy_bio_mc._x;
break;
case "slow" :
_local2 = getClip().buttons.buy_slow_mc._x;
break;
case "artillery" :
_local2 = getClip().buttons.buy_artillery_mc._x;
}
var _local4 = getClip().getNextHighestDepth();
if (mouse.wantToBuildTower) {
getClip().redX.removeMovieClip();
getClip().attachMovie("redX", "redX", _local4, {_x:_local2, _y:_local3});
}
}
function buttonOver(t) {
var _local8 = SM.playSound("buttonClick");
var _local3 = getClip().popupContainer;
var _local7 = _local3.getNextHighestDepth();
var _local2;
switch (t) {
case "basic" :
tempMC = getClip().buttons.buy_basic_mc;
_local2 = 1;
break;
case "water" :
tempMC = getClip().buttons.buy_water_mc;
_local2 = 2;
break;
case "fire" :
tempMC = getClip().buttons.buy_fire_mc;
_local2 = 3;
break;
case "electric" :
tempMC = getClip().buttons.buy_electric_mc;
_local2 = 4;
break;
case "aoe" :
tempMC = getClip().buttons.buy_aoe_mc;
_local2 = 5;
break;
case "bio" :
tempMC = getClip().buttons.buy_bio_mc;
_local2 = 6;
break;
case "slow" :
tempMC = getClip().buttons.buy_slow_mc;
_local2 = 7;
break;
case "artillery" :
tempMC = getClip().buttons.buy_artillery_mc;
_local2 = 8;
}
var _local4 = tempMC._x;
var _local5 = tempMC._y;
var _local6 = _local3.attachMovie("tooltip", "tooltip", 555, {_x:_local4, _y:_local5});
_local6.gotoAndStop(_local2);
}
function buttonOut(t) {
var _local2 = getClip().popupContainer;
_local2.tooltip.removeMovieClip();
}
function moveObjectsInMemory() {
if ((!mouse.interrupt) && (critterClock.ticking)) {
critterClock.count++;
}
var _local4 = 0;
while (_local4 < bulletArray.length) {
var _local5 = bulletArray[_local4];
if (!_local5.__get__seized()) {
_local5.moveInMemory();
}
_local4++;
}
var _local3 = 0;
while (_local3 < critterArray.length) {
var _local2 = critterArray[_local3];
if (!_local2.dying) {
_local2.moveInMemory();
if (_local2.__get__bleedTimerTicking() || (_local2.__get__bioTimerTicking())) {
_local2.bleedTick();
}
if (_local2.__get__tarTimerTicking()) {
_local2.slowdownTick();
}
}
_local3++;
}
}
function render() {
if (critterClock.count == APPEAR_DELAY) {
appear(critterClock, map);
}
var _local6 = 0;
while (_local6 < bulletArray.length) {
var _local7 = bulletArray[_local6];
_local7.walk();
_local6++;
}
var _local5 = 0;
while (_local5 < critterArray.length) {
var _local2 = critterArray[_local5];
if (!_local2.dying) {
_local2.walk();
var _local4 = 0;
while (_local4 < towerArray.length) {
var _local3 = towerArray[_local4];
if (!_local3.__get__refireClockTicking()) {
if ((((_local3.myType == "basic") || (_local3.myType == "aoe")) || (_local3.myType == "artillery")) || (_local3.myType == "bio")) {
_local3.spotTarget(_local2.getClip()._x, _local2.getClip()._y, _local2.__get__xdir(), _local2.__get__ydir(), _local2.dying, _local2.currentSpeed);
} else if ((((_local3.myType == "water") || (_local3.myType == "slow")) || (_local3.myType == "electric")) && (!_local2.__get__tarTimerTicking())) {
_local3.spotTarget(_local2.getClip()._x, _local2.getClip()._y, _local2.__get__xdir(), _local2.__get__ydir(), _local2.dying, _local2.currentSpeed);
} else if (((_local3.myType == "fire") && (!_local2.bleedTimer.ticking)) || ((_local3.myType == "bio") && (!_local2.bioTimer.ticking))) {
_local3.spotTarget(_local2.getClip()._x, _local2.getClip()._y, _local2.__get__xdir(), _local2.__get__ydir(), _local2.dying, _local2.currentSpeed);
}
}
_local4++;
}
}
_local5++;
}
}
function clipping() {
var _local2 = 0;
while (_local2 < bulletArray.length) {
var _local3 = bulletArray[_local2];
if (_local3.offScreen(STGWIDTH, STGHEIGHT)) {
_local3.seize();
}
_local2++;
}
}
function housekeep() {
var _local4 = bulletArray.length;
var _local7 = 0;
while (_local7 < _local4) {
var _local8 = bulletArray[_local7];
if (_local8.__get__seized()) {
_local8.destroy();
bulletArray.splice(_local7, 1);
_local4--;
_local8 = null;
}
_local7++;
}
_local4 = critterArray.length;
var _local6 = 0;
while (_local6 < _local4) {
var _local2 = critterArray[_local6];
if (_local2.__get__tarTimerTicking()) {
if (_local2.__get__tarTimerCount() >= _local2.__get__slowTime()) {
_local2.endSlowdown(_local2.tarTimer.why);
}
}
if (_local2.__get__bleedTimerTicking() && (_local2.__get__bleedTimerCount() >= _local2.__get__bleedTime())) {
_local2.endBleeding("fire");
}
if (_local2.__get__bioTimerTicking() && (_local2.__get__bioTimerCount() >= _local2.__get__bleedTime())) {
_local2.endBleeding("bio");
}
if (_local2.__get__dead()) {
_local2.destroy();
critterArray.splice(_local6, 1);
critterClock.critters--;
_local4--;
player.addToKills();
_local2 = null;
}
_local6++;
}
_local4 = towerArray.length;
var _local5 = 0;
while (_local5 < _local4) {
var _local3 = towerArray[_local5];
if (_local3.hasBeenSold) {
_local3.scrapTower(road);
towerArray.splice(_local5, 1);
_local4--;
_local3 = null;
}
if (_local3.__get__refireClockTicking()) {
_local3.refireTick();
}
_local5++;
}
if (player.__get__killsThisLevel() == levelKillTarget) {
passLevel();
}
}
function prepare() {
player.resetKills();
nextLevelAnnouncement(level);
}
function passLevel() {
hardInterrupt = true;
musicLoop.fadeTo(25, 15);
getClip().buttons.pause_btn._visible = false;
mouse.interrupt = false;
player.addPoints(player.__get__money());
player.addMoney(MONEYAWARDEDX * level);
destroyContainers(false);
if (level < 40) {
var _local2 = SM.playSound("win");
level++;
setRound(level);
arrangeButtons(level);
prepare();
} else {
gameOverFireworks();
}
}
function arrangeButtons(rd) {
switch (rd) {
case 2 :
if (map == 1) {
getClip().buttons.buy_water_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 160;
getClip().buttons.buy_water_mc._x = 343;
}
break;
case 5 :
if (map == 1) {
getClip().buttons.buy_fire_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 114;
getClip().buttons.buy_water_mc._x = 262;
getClip().buttons.buy_fire_mc._x = 409;
}
break;
case 10 :
if ((map == 1) || (map == 2)) {
getClip().buttons.buy_electric_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 87;
getClip().buttons.buy_water_mc._x = 197;
getClip().buttons.buy_fire_mc._x = 307;
getClip().buttons.buy_electric_mc._x = 417;
}
break;
case 15 :
getClip().buttons.buy_aoe_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 69;
getClip().buttons.buy_water_mc._x = 161;
getClip().buttons.buy_fire_mc._x = 253;
getClip().buttons.buy_electric_mc._x = 345;
getClip().buttons.buy_aoe_mc._x = 437;
break;
case 20 :
getClip().buttons.buy_slow_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 56;
getClip().buttons.buy_water_mc._x = 135;
getClip().buttons.buy_fire_mc._x = 214;
getClip().buttons.buy_electric_mc._x = 293;
getClip().buttons.buy_aoe_mc._x = 372;
getClip().buttons.buy_slow_mc._x = 451;
break;
case 25 :
getClip().buttons.buy_bio_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 46;
getClip().buttons.buy_water_mc._x = 115;
getClip().buttons.buy_fire_mc._x = 184;
getClip().buttons.buy_electric_mc._x = 253;
getClip().buttons.buy_aoe_mc._x = 322;
getClip().buttons.buy_slow_mc._x = 391;
getClip().buttons.buy_bio_mc._x = 460;
break;
case 30 :
getClip().buttons.buy_artillery_mc._visible = true;
getClip().buttons.buy_basic_mc._x = 38;
getClip().buttons.buy_water_mc._x = 99;
getClip().buttons.buy_fire_mc._x = 160;
getClip().buttons.buy_electric_mc._x = 221;
getClip().buttons.buy_aoe_mc._x = 282;
getClip().buttons.buy_slow_mc._x = 343;
getClip().buttons.buy_bio_mc._x = 404;
getClip().buttons.buy_artillery_mc._x = 465;
}
}
function advanceLevel() {
resetArrays(false);
attachContainers(getClip(), false);
levelStart();
getClip().buttons.pause_btn._visible = true;
hardInterrupt = false;
}
function victory() {
musicLoop.fadeAndDie(5);
hardInterrupt = true;
getClip().buttons.quit_btn._visible = false;
destroy();
saveDump(endGameTime(), true);
main.winGame(endGameTime(), map, difficulty, player.__get__score());
}
function gameOver() {
wipeData();
musicLoop.fadeAndDie(5);
musicLoop = SM.playSound("lose");
destroy();
saveDump(endGameTime(), false);
main.loseGame(endGameTime(), map, difficulty, level, player.__get__score());
}
function endGameTime() {
endGameDate = new Date();
var _local2 = endGameDate.valueOf() - startGameDate.valueOf();
return(_local2);
}
function wipeData() {
hardInterrupt = true;
removeListeners();
getClip().onEnterFrame = null;
critterClock.ticking = false;
destroyContainers(true);
resetArrays(true);
}
function quit() {
wipeData();
musicLoop.fadeAndDie(1);
destroy();
saveDump(endGameTime(), false);
main.quitGame(endGameTime());
}
function saveDump(time, victoryFlag) {
if (victoryFlag && (time < SO.data.myBestTime)) {
SO.data.myBestTime = time;
trace("saveDump: victory time");
}
if (player.__get__score() > SO.data.myBestScore) {
SO.data.myBestScore = player.score;
trace("saveDump: score");
}
if ((!victoryFlag) && (level > SO.data.highestRoundBeat)) {
SO.data.highestRoundBeat = level - 1;
trace("saveDump: level");
} else if (victoryFlag) {
trace("saveDump: map");
SO.data.highestMapCompleted = map;
}
SO.flush();
}
function run() {
if ((!hardInterrupt) && (!mouse.interrupt)) {
moveObjectsInMemory();
collide();
clipping();
housekeep();
render();
}
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
static var STGWIDTH = 550;
static var STGHEIGHT = 440;
var MONEYAWARDEDX = 3;
var POINTSX = 1;
var APPEAR_DELAY = 60;
var CASHPERCRITTERX = 1;
var outputCursorPosition = false;
var vocalSoundIsPlaying = false;
var isMuted = false;
}
Symbol 1692 MovieClip [__Packages.com.electrotank.comedycentral.reno.input.MouseInput] Frame 0
class com.electrotank.comedycentral.reno.input.MouseInput extends com.utils.Observable
{
var Root, gs, currentRow, currentCol, wantToBuildTower, clickListener, towerType, notifyListeners;
function MouseInput (p, m) {
super();
Root = p;
gs = m;
currentRow = 0;
currentCol = 0;
wantToBuildTower = false;
clickListener = new Object();
clickListener.owner = this;
clickListener.onMouseUp = function () {
trace((("mouse click at " + this.owner.Root._xmouse) + " ") + this.owner.Root._ymouse);
};
}
function towerBuilt() {
wantToBuildTower = false;
if (gs.newGame) {
gs.showMiniInstructions(3);
}
}
function clickedBuildButton(e) {
wantToBuildTower = !wantToBuildTower;
towerType = e.towerType;
}
function mouseHandler(e, printCursorPosition) {
if (wantToBuildTower) {
drawCursorAtGrid(gridWidth, gridHeight);
}
}
function togglePause() {
interrupt = !interrupt;
trace("input.Mouse: interrupt toggled to " + interrupt);
}
function mbDownHandler() {
buttonDown = true;
}
function mbUpHandler() {
buttonDown = false;
}
function trackHandler(e, printCursorPosition) {
e._x = Root._xmouse;
e._y = Root._ymouse;
if (printCursorPosition) {
trace((e._x + " ") + e._y);
}
}
function drawCursorAtGrid(xSize, ySize) {
var _local3 = Root._xmouse;
var _local2 = Root._ymouse;
if ((currentCol != Math.floor(_local3 / xSize)) || (currentRow != Math.floor(_local2 / ySize))) {
currentCol = Math.floor(_local3 / xSize);
currentRow = Math.floor(_local2 / ySize);
if ((currentCol % 2) != (currentRow % 2)) {
notifyListeners("updateCursor", {target:this, xpos:currentCol, ypos:currentRow, type:towerType});
}
}
}
function wheelHandler() {
}
static var gridWidth = 32;
static var gridHeight = 16;
var buttonDown = false;
var interrupt = false;
}
Symbol 1693 MovieClip [__Packages.com.electrotank.comedycentral.reno.player.Tower] Frame 0
class com.electrotank.comedycentral.reno.player.Tower extends com.utils.Observable
{
var Root, myType, parameters, SM, UPGRADESTRING, UPGRADETEXT, UPGRADECOSTbump, RNGbump, DMGbump, ROFbump, myName, fundsSpent, vocalSnd, _rng, refireClock, _ROF, testFlag, _dmg, whichTowerAmI, clip;
function Tower (xpos, ypos, m, road, flag, player, ta, xml, type, sm) {
super();
Root = m;
myType = type;
XMLSetup(xml, player);
parameters = new XML();
parameters = xml;
SM = sm;
init(xpos, ypos, road, flag, player, ta, type);
}
function XMLSetup(x, p) {
var _local4 = new Array();
_local4 = x.firstChild.childNodes[3].childNodes;
MAXOUT = Number(_local4[0].attributes.funds);
TOP_PAD = Number(_local4[1].attributes.pixels);
typeIndex = 2;
var _local5 = typeIndex;
var _local2;
var _local3;
switch (myType) {
case "basic" :
typeIndex = typeIndex + 0;
break;
case "water" :
typeIndex = typeIndex + 1;
_local2 = _local4[typeIndex].childNodes[4].attributes;
SLOWFRAMES = Number(_local2.min);
_local3 = Number(_local2.max);
SLOWFRAMESbump = Root.owner.interpolate(SLOWFRAMES, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[5].attributes;
SLOWPERCENT = Number(_local2.min);
_local3 = Number(_local2.max);
SLOWPERCENTbump = Root.owner.interpolate(SLOWPERCENT, _local3, 1, "small", NUMUPGRADES, true);
break;
case "fire" :
typeIndex = typeIndex + 2;
_local2 = _local4[typeIndex].childNodes[4].attributes;
DOTFRAMES = Number(_local2.min);
_local3 = Number(_local2.max);
DOTFRAMESbump = Root.owner.interpolate(DOTFRAMES, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[5].attributes;
DOTDMG = Number(_local2.min);
_local3 = Number(_local2.max);
DOTDMGbump = Root.owner.interpolate(DOTDMG, _local3, 1, "small", NUMUPGRADES, true);
break;
case "electric" :
typeIndex = typeIndex + 3;
_local2 = _local4[typeIndex].childNodes[4].attributes;
STUNFRAMES = Number(_local2.min);
_local3 = Number(_local2.max);
STUNFRAMESbump = Root.owner.interpolate(STUNFRAMES, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[5].attributes;
STUNCHANCE = Number(_local2.min);
_local3 = Number(_local2.max);
STUNCHANCEbump = Root.owner.interpolate(STUNCHANCE, _local3, 1, "small", NUMUPGRADES, true);
SLOWPERCENT = 100;
break;
case "aoe" :
typeIndex = typeIndex + 4;
_local2 = _local4[typeIndex].childNodes[4].attributes;
SPLASHRADIUS = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHRADIUSbump = Root.owner.interpolate(SPLASHRADIUS, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[5].attributes;
SPLASHDMG = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHDMGbump = Root.owner.interpolate(SPLASHDMG, _local3, 1, "small", NUMUPGRADES, true);
break;
case "bio" :
typeIndex = typeIndex + 5;
_local2 = _local4[typeIndex].childNodes[4].attributes;
DOTFRAMES = Number(_local2.min);
_local3 = Number(_local2.max);
DOTFRAMESbump = Root.owner.interpolate(DOTFRAMES, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[5].attributes;
DOTDMG = Number(_local2.min);
_local3 = Number(_local2.max);
DOTDMGbump = Root.owner.interpolate(DOTDMG, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[6].attributes;
SPLASHRADIUS = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHRADIUSbump = Root.owner.interpolate(SPLASHRADIUS, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[7].attributes;
SPLASHDMG = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHDMGbump = Root.owner.interpolate(SPLASHDMG, _local3, 1, "small", NUMUPGRADES, true);
break;
case "slow" :
typeIndex = typeIndex + 6;
_local2 = _local4[typeIndex].childNodes[4].attributes;
SLOWFRAMES = Number(_local2.min);
_local3 = Number(_local2.max);
SLOWFRAMESbump = Root.owner.interpolate(SLOWFRAMES, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[5].attributes;
SLOWPERCENT = Number(_local2.min);
_local3 = Number(_local2.max);
SLOWPERCENTbump = Root.owner.interpolate(SLOWPERCENT, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[6].attributes;
SPLASHRADIUS = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHRADIUSbump = Root.owner.interpolate(SPLASHRADIUS, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[7].attributes;
SPLASHDMG = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHDMGbump = Root.owner.interpolate(SPLASHDMG, _local3, 1, "small", NUMUPGRADES, true);
break;
case "artillery" :
typeIndex = typeIndex + 7;
_local2 = _local4[typeIndex].childNodes[4].attributes;
SPLASHRADIUS = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHRADIUSbump = Root.owner.interpolate(SPLASHRADIUS, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[5].attributes;
SPLASHDMG = Number(_local2.min);
_local3 = Number(_local2.max);
SPLASHDMGbump = Root.owner.interpolate(SPLASHDMG, _local3, 1, "small", NUMUPGRADES, true);
}
COST = Number(_local4[typeIndex].attributes.cost);
NUMUPGRADES = Number(_local4[typeIndex].attributes.numUpgrades);
UPGRADESTRING = _local4[typeIndex].attributes.upgradeProperty;
UPGRADETEXT = UPGRADESTRING;
_local2 = _local4[typeIndex].childNodes[0].attributes;
UPGRADECOST = Number(_local2.min);
_local3 = Number(_local2.max);
UPGRADECOSTbump = Math.floor(Root.owner.interpolate(UPGRADECOST, _local3, 1, "small", NUMUPGRADES, true));
_local2 = _local4[typeIndex].childNodes[1].attributes;
RNGBASIC = Number(_local2.min);
_local3 = Number(_local2.max);
RNGbump = Root.owner.interpolate(RNGBASIC, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[2].attributes;
DMGBASIC = Number(_local2.min);
_local3 = Number(_local2.max);
DMGbump = Root.owner.interpolate(DMGBASIC, _local3, 1, "small", NUMUPGRADES, true);
_local2 = _local4[typeIndex].childNodes[3].attributes;
ROFBASIC = Number(_local2.min);
_local3 = Number(_local2.max);
ROFbump = Root.owner.interpolate(ROFBASIC, _local3, -1, "large", NUMUPGRADES, true);
typeIndex = typeIndex - _local5;
MYPROJECTILESPEED = Number(x.firstChild.childNodes[4].childNodes[typeIndex].attributes.speed);
trace((((((((((((((((((("TXML: $" + COST) + " $/") + UPGRADECOST) + " #") + NUMUPGRADES) + ", rng") + RNGBASIC) + " /") + RNGbump) + ", ROF") + ROFBASIC) + " /") + ROFbump) + ", dmg") + DMGBASIC) + " /") + DMGbump) + ", bullspd") + MYPROJECTILESPEED);
trace((((((((((((((((((((((((((((((("TXML: sl#" + SLOWFRAMES) + ", /") + SLOWFRAMESbump) + " %") + SLOWPERCENT) + " /") + SLOWPERCENTbump) + ", dot=") + DOTDMG) + " /") + DOTDMGbump) + ", #") + DOTFRAMES) + " /") + DOTFRAMESbump) + ", spl") + SPLASHDMG) + " /") + SPLASHDMGbump) + ", r") + SPLASHRADIUS) + " /") + SPLASHRADIUSbump) + ", stn%") + STUNCHANCE) + " /") + STUNCHANCEbump) + " #") + STUNFRAMES) + " /") + STUNFRAMESbump);
}
function assignMyName() {
switch (myType) {
case "basic" :
myName = "Jones";
break;
case "water" :
myName = "Garcia";
break;
case "fire" :
myName = "Kimball";
break;
case "electric" :
myName = "Junior";
break;
case "aoe" :
myName = "Johnson";
break;
case "bio" :
myName = "Wiegel";
break;
case "slow" :
myName = "Williams";
break;
case "artillery" :
myName = "Dangle";
}
}
function showMenu() {
var _local3 = getClip()._x;
var _local2;
if (getClip()._y > TOP_PAD) {
_local2 = -16;
} else {
_local2 = -16;
}
Root.owner.towerMenu.display(_local3, getClip()._y + _local2, myName, UPGRADETEXT, fundsSpent, upgradesPerformed, NUMUPGRADES, UPGRADECOST);
}
function testing(n, p) {
}
function starting() {
var _local3 = "towerstart_" + myType;
var _local2 = getClip()._parent._parent.owner.vocalSoundIsPlaying;
if (!_local2) {
getClip()._parent._parent.owner.vocalSoundIsPlaying = true;
vocalSnd = SM.playSound(_local3);
vocalSnd.addListener(this);
}
}
function soundComplete(e) {
if (e.target == vocalSnd) {
getClip()._parent._parent.owner.vocalSoundIsPlaying = false;
vocalSnd.removeListener(this);
}
}
function firing() {
var _local2 = "shoot_" + myType;
var _local3 = SM.playSound(_local2, {volume:50});
}
function idling() {
}
function doneIdling() {
}
function doneStarting() {
getClip().tower_mc.tower_mc.gotoAndStop("still");
}
function doneFiring() {
getClip().tower_mc.tower_mc.gotoAndStop("still");
}
function leadTarget(xpos, ypos, guySpeed, guyAngle) {
var _local3 = new Array();
var _local16 = xpos;
var _local18 = ypos;
var _local2 = guySpeed;
var _local13 = (guyAngle * Math.PI) / 180;
var _local5 = Math.cos(_local13);
var _local11 = Math.sin(_local13);
var _local9 = getClip()._x;
var _local14 = getClip()._y;
_local3.push(_local9);
_local3.push(_local14);
var _local12 = MYPROJECTILESPEED;
var _local8 = _local16 - _local9;
var _local6 = _local18 - _local14;
var _local10 = (((-_local12) * _local12) + (((_local2 * _local2) * _local5) * _local5)) + (((_local2 * _local2) * _local11) * _local11);
var _local4 = (((2 * _local8) * _local2) * _local5) + (((2 * _local6) * _local2) * _local11);
var _local21 = (_local8 * _local8) + (_local6 * _local6);
var _local17 = Math.sqrt((_local4 * _local4) - ((4 * _local10) * _local21));
var _local22 = ((-_local4) + _local17) / (2 * _local10);
if (_local22 > 0) {
trace("TOWER.LEADTARGET: extraneous root positive!");
}
var _local19 = ((-_local4) - _local17) / (2 * _local10);
var _local15 = _local19;
var _local7 = Math.acos(((_local16 + ((_local2 * _local15) * _local5)) - _local9) / (_local12 * _local15));
if (_local6 < 0) {
_local7 = -_local7;
}
var _local23 = Math.cos(_local7);
var _local20 = Math.sin(_local7);
_local3.push(_local23);
_local3.push(_local20);
return(_local3);
}
function getAngle(xdir, ydir) {
var _local1;
switch (xdir) {
case 1 :
switch (ydir) {
case 1 :
_local1 = 45;
break;
case 0 :
_local1 = 0;
break;
case -1 :
_local1 = 315;
}
break;
case 0 :
switch (ydir) {
case 1 :
_local1 = 90;
break;
case -1 :
_local1 = 270;
}
break;
case -1 :
switch (ydir) {
case 1 :
_local1 = 135;
break;
case 0 :
_local1 = 180;
break;
case -1 :
_local1 = 225;
}
}
return(_local1);
}
function spotTarget(xpos, ypos, xdir, ydir, dying, speed) {
var _local3 = xpos - getClip()._x;
var _local2 = ypos - getClip()._y;
if (inRange(_local3, _local2) && (!dying)) {
var _local5 = getAngle(xdir, ydir);
var _local4 = leadTarget(xpos, ypos, speed, _local5);
fireAt(_local3, _local2, _local4);
}
}
function fireAt(delX, delY, bulletData) {
var _local2 = Math.atan2(delY, delX);
var _local4 = Math.cos(_local2);
var _local3 = Math.sin(_local2);
turnAndFace(_local4, _local3, getClip().tower_mc);
fire(bulletData, Root.owner.bulletArray, Root.owner.bulletContainer);
}
function roundDir(dir) {
var _local1;
if (dir > 0) {
_local1 = 1;
} else if (dir < 0) {
_local1 = -1;
} else {
_local1 = 0;
}
return(_local1);
}
function turnAndFace(xdir, ydir, animation) {
var _local4 = roundDir(xdir);
var _local3 = roundDir(ydir);
switch (_local4) {
case 1 :
switch (_local3) {
case 1 :
animation.gotoAndStop("badguy0_mc");
break;
case 0 :
animation.gotoAndStop("badguy45_mc");
break;
case -1 :
animation.gotoAndStop("badguy90_mc");
}
break;
case 0 :
switch (_local3) {
case 1 :
animation.gotoAndStop("badguy135_mc");
break;
case -1 :
animation.gotoAndStop("badguy315_mc");
}
break;
case -1 :
switch (_local3) {
case 1 :
animation.gotoAndStop("badguy270_mc");
break;
case 0 :
animation.gotoAndStop("badguy225_mc");
break;
case -1 :
animation.gotoAndStop("badguy180_mc");
}
}
}
function inRange(delX, delY) {
var _local2 = false;
var _local3 = Math.sqrt((delX * delX) + (delY * delY));
if (_local3 <= _rng) {
_local2 = true;
}
return(_local2);
}
function refireTick() {
refireClock.count++;
if (refireClock.count >= _ROF) {
refireClock.ticking = false;
}
}
function isLegal(xpos, ypos, road, player) {
var _local2 = true;
_local2 = player.hasMoney(COST);
if (road.cannotBuildOn(xpos, ypos)) {
_local2 = false;
}
if ((Root.owner.map == 2) || (Root.owner.map == 3)) {
if (Root.owner.road2.cannotBuildOn(xpos, ypos)) {
_local2 = false;
}
}
if (Root.owner.map == 3) {
if (Root.owner.road3.cannotBuildOn(xpos, ypos)) {
_local2 = false;
}
}
return(_local2);
}
function buildTower(xpos, ypos, f, p) {
Root.owner.mouse.towerBuilt();
Root.owner.square.towerBuilt();
var _local2 = Root.getNextHighestDepth();
var _local3 = Root.attachMovie("towers_mc", "tower" + _local2, _local2, {_x:xpos, _y:ypos});
setClip(_local3);
getClip().owner = this;
getClip().tower_mc.tower_mc.gotoAndStop("start");
testFlag = f;
fundsSpent = COST;
p.spendMoney(COST);
getClip().worth_txt.text.selectable = false;
getClip().onRollOver = function () {
if ((!this._parent.owner.mouse.interrupt) && (!this._parent.owner.hardInterrupt)) {
this.owner.showMenu();
}
};
resetFiringClock();
}
function resetFiringClock() {
refireClock = new Object();
refireClock.ticking = false;
}
function resetParameters() {
_ROF = ROFBASIC;
_dmg = DMGBASIC;
_rng = RNGBASIC;
}
function init(xpos, ypos, road, f, plyr, ta, type) {
resetParameters();
var _local4 = road.snapPointToGrid(xpos, ypos);
var _local3 = _local4[0];
var _local2 = _local4[1];
if (isLegal(_local3, _local2, road, plyr)) {
buildTower(_local3, _local2, f, plyr);
ta.push(this);
whichTowerAmI = ta.length - 1;
myType = type;
assignMyName();
road.addTowerToPhonebook(_local3, _local2);
Root.owner.towerMenu.addListener(this);
}
}
function fire(targetData, ba, bc) {
if (!refireClock.ticking) {
getClip().tower_mc.tower_mc.gotoAndStop("action");
var _local2 = new com.electrotank.comedycentral.reno.player.Bullet(bc, _rng, _dmg, parameters, myType, SLOWFRAMES, SLOWPERCENT, DOTFRAMES, DOTDMG, SPLASHRADIUS, SPLASHDMG, STUNFRAMES, STUNCHANCE);
ba.push(_local2);
var _local8 = offsetBullet();
var _local4 = targetData[0];
var _local5 = targetData[1];
var _local7 = targetData[2];
var _local6 = targetData[3];
_local2.onScreen(_local4, _local5, _local7, _local6, _dmg);
refireClock.ticking = true;
refireClock.count = 0;
}
}
function offsetBullet() {
var _local2 = new Array();
_local2.push(0, 0);
switch (myType) {
case "basic" :
_local2[0] = 11;
_local2[1] = 0;
break;
case "water" :
_local2[0] = 0;
_local2[1] = 0;
break;
case "fire" :
_local2[0] = 0;
_local2[1] = 0;
break;
case "electric" :
_local2[0] = 0;
_local2[1] = 0;
break;
case "aoe" :
_local2[0] = 0;
_local2[1] = 0;
break;
case "bio" :
_local2[0] = 0;
_local2[1] = 0;
break;
case "slow" :
_local2[0] = 0;
_local2[1] = 0;
break;
case "artillery" :
_local2[0] = 0;
_local2[1] = 0;
}
return(_local2);
}
function get refireClockTicking() {
return(refireClock.ticking);
}
function upgradeTower(e) {
if (((!hasBeenSold) && (e.xLoc == getClip()._x)) && (e.yLoc == getClip()._y)) {
if (e.p.hasMoney(UPGRADECOST) && (upgradesPerformed < NUMUPGRADES)) {
var _local3 = SM.playSound("upgrade");
e.p.spendMoney(UPGRADECOST);
fundsSpent = fundsSpent + UPGRADECOST;
var _local4 = parameters.firstChild.childNodes[3].childNodes;
switch (myType) {
case "basic" :
break;
case "water" :
SLOWFRAMES = SLOWFRAMES + SLOWFRAMESbump;
SLOWPERCENT = SLOWPERCENT + SLOWPERCENTbump;
break;
case "fire" :
DOTFRAMES = DOTFRAMES + DOTFRAMESbump;
DOTDMG = DOTDMG + DOTDMGbump;
break;
case "electric" :
STUNCHANCE = STUNCHANCE + STUNCHANCEbump;
STUNFRAMES = STUNFRAMES + STUNFRAMESbump;
break;
case "aoe" :
SPLASHDMG = SPLASHDMG + SPLASHDMGbump;
SPLASHRADIUS = SPLASHRADIUS + SPLASHRADIUSbump;
break;
case "bio" :
DOTFRAMES = DOTFRAMES + DOTFRAMESbump;
DOTDMG = DOTDMG + DOTDMGbump;
SPLASHDMG = SPLASHDMG + SPLASHDMGbump;
SPLASHRADIUS = SPLASHRADIUS + SPLASHRADIUSbump;
break;
case "slow" :
SLOWFRAMES = SLOWFRAMES + SLOWFRAMESbump;
SLOWPERCENT = SLOWPERCENT + SLOWPERCENTbump;
SPLASHDMG = SPLASHDMG + SPLASHDMGbump;
SPLASHRADIUS = SPLASHRADIUS + SPLASHRADIUSbump;
break;
case "artillery" :
}
_rng = _rng + RNGbump;
_dmg = _dmg + DMGbump;
_ROF = _ROF - ROFbump;
UPGRADECOST = UPGRADECOST + UPGRADECOSTbump;
upgradesPerformed++;
if (upgradesPerformed == NUMUPGRADES) {
UPGRADETEXT = "MAX";
UPGRADECOST = MAXOUT;
}
Root.owner.towerMenu.upgrade(fundsSpent, UPGRADETEXT, UPGRADECOST, upgradesPerformed, NUMUPGRADES, MAXOUT);
}
showMenu();
}
}
function sellTower(e) {
if (((!hasBeenSold) && (e.xLoc == getClip()._x)) && (e.yLoc == getClip()._y)) {
var _local3 = SM.playSound("click2");
e.p.sellingTower(fundsSpent);
refireClock = null;
hasBeenSold = true;
getClip().onRollOver = null;
}
}
function scrapTower(r) {
r.removeTowerFromPhonebook(getClip()._x, getClip()._y);
Root.owner.towerMenu.removeListener(this);
destroy();
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
var COST = 50;
var UPGRADECOST = 50;
var ROFBASIC = 5;
var DMGBASIC = 20;
var RNGBASIC = 100;
var MAXOUT = 1000000;
var MYPROJECTILESPEED = 9;
var NUMUPGRADES = 3;
var SLOWPERCENT = 0;
var SLOWFRAMES = 0;
var DOTFRAMES = 0;
var DOTDMG = 0;
var SPLASHRADIUS = 0;
var SPLASHDMG = 0;
var STUNCHANCE = 0;
var STUNFRAMES = 0;
var SLOWPERCENTbump = 0;
var SLOWFRAMESbump = 0;
var DOTFRAMESbump = 0;
var DOTDMGbump = 0;
var SPLASHRADIUSbump = 0;
var SPLASHDMGbump = 0;
var STUNCHANCEbump = 0;
var STUNFRAMESbump = 0;
var xOffset = -43;
var yOffset = -19;
var TOP_PAD = 50;
var upgradesPerformed = 0;
var typeIndex = 2;
var hasBeenSold = false;
}
Symbol 1694 MovieClip [__Packages.com.electrotank.comedycentral.reno.board.Road] Frame 0
class com.electrotank.comedycentral.reno.board.Road
{
var Root, whichRoadAmI, towerLocations, roadLocations, otherLocations, xArray, yArray;
function Road (m, map, index) {
Root = m;
whichRoadAmI = index;
setArrays(map);
init(map);
}
function testing() {
}
function setArrays(map) {
towerLocations = new Array();
roadLocations = new Array();
otherLocations = new Array();
switch (map) {
case 1 :
xArray = JailXCoords.slice(0);
yArray = JailYCoords.slice(0);
break;
case 2 :
yArray = CasinoYCoords.slice(0);
switch (whichRoadAmI) {
case 1 :
xArray = CasinoXCoords1.slice(0);
break;
case 2 :
xArray = CasinoXCoords2.slice(0);
}
break;
case 3 :
switch (whichRoadAmI) {
case 1 :
xArray = ParadeXCoords1.slice(0);
yArray = ParadeYCoords1.slice(0);
break;
case 2 :
xArray = ParadeXCoords2.slice(0);
yArray = ParadeYCoords2.slice(0);
break;
case 3 :
xArray = ParadeXCoords3.slice(0);
yArray = ParadeYCoords3.slice(0);
}
break;
default :
trace("Road.setArrays got invalid map");
}
xArray = stretchArray(xArray, "x");
yArray = stretchArray(yArray, "y");
if (xArray.length != yArray.length) {
trace("Road.setArrays: X AND Y LENGTHS DO NOT MATCH");
}
}
function init(map) {
if (whichRoadAmI == 1) {
writeIncidentals(map);
}
translateArrayToStage(xArray, "x");
translateArrayToStage(yArray, "y");
writeRoad();
if (whichRoadAmI == 1) {
translateArrayToStage(otherLocations, "xy");
}
testing();
}
function checkPhonebook(xpos, ypos, inputArray) {
var _local2 = false;
var _local3 = inputArray;
var _local4 = _local3.length;
var _local1 = 0;
while (_local1 < _local4) {
if ((xpos == _local3[_local1][0]) && (ypos == _local3[_local1][1])) {
_local2 = true;
return(_local2);
}
_local1++;
}
return(_local2);
}
function writeRoad(map) {
var _local5 = howManyWaypoints();
var _local4;
var _local3;
var _local2 = 0;
while (_local2 < _local5) {
_local4 = getX(_local2);
_local3 = getY(_local2);
if ((_local2 + 1) < _local5) {
do {
addGraphicToPhonebook(_local4, _local3, roadLocations);
_local4 = _local4 + (32 * findDir(_local4, getX(_local2 + 1)));
_local3 = _local3 + (16 * findDir(_local3, getY(_local2 + 1)));
} while ((_local4 != getX(_local2 + 1)) || (_local3 != getY(_local2 + 1)));
} else {
addGraphicToPhonebook(_local4, _local3, roadLocations);
}
_local2++;
}
}
function writeIncidentals(map) {
switch (map) {
case 1 :
addOtherToPhonebook(8, 1);
addOtherToPhonebook(9, 2);
addOtherToPhonebook(10, 3);
addOtherToPhonebook(7, 2);
addOtherToPhonebook(6, 3);
addOtherToPhonebook(1, 0);
addOtherToPhonebook(2, 1);
addOtherToPhonebook(0, 1);
addOtherToPhonebook(1, 2);
addOtherToPhonebook(3, 0);
addOtherToPhonebook(2, 3);
addOtherToPhonebook(4, 1);
addOtherToPhonebook(13, 0);
addOtherToPhonebook(15, 0);
addOtherToPhonebook(12, 1);
addOtherToPhonebook(14, 1);
addOtherToPhonebook(16, 1);
addOtherToPhonebook(15, 2);
addOtherToPhonebook(0, 11);
addOtherToPhonebook(0, 13);
addOtherToPhonebook(0, 15);
addOtherToPhonebook(1, 12);
addOtherToPhonebook(1, 14);
addOtherToPhonebook(2, 13);
addOtherToPhonebook(14, 13);
addOtherToPhonebook(14, 15);
addOtherToPhonebook(14, 17);
addOtherToPhonebook(14, 19);
addOtherToPhonebook(15, 18);
addOtherToPhonebook(15, 16);
addOtherToPhonebook(15, 14);
addOtherToPhonebook(16, 17);
addOtherToPhonebook(16, 15);
addOtherToPhonebook(13, 14);
addOtherToPhonebook(12, 15);
addOtherToPhonebook(13, 16);
addOtherToPhonebook(12, 17);
break;
case 2 :
addOtherToPhonebook(1, 0);
addOtherToPhonebook(3, 0);
addOtherToPhonebook(1, 2);
addOtherToPhonebook(0, 1);
addOtherToPhonebook(13, 0);
addOtherToPhonebook(15, 0);
addOtherToPhonebook(15, 2);
addOtherToPhonebook(16, 1);
addOtherToPhonebook(6, 19);
addOtherToPhonebook(7, 20);
addOtherToPhonebook(8, 19);
addOtherToPhonebook(9, 20);
addOtherToPhonebook(10, 19);
addOtherToPhonebook(8, 17);
addOtherToPhonebook(7, 16);
addOtherToPhonebook(7, 18);
addOtherToPhonebook(9, 18);
break;
case 3 :
addOtherToPhonebook(13, 0);
addOtherToPhonebook(15, 0);
addOtherToPhonebook(16, 1);
addOtherToPhonebook(15, 2);
addOtherToPhonebook(13, 8);
addOtherToPhonebook(15, 8);
addOtherToPhonebook(16, 9);
addOtherToPhonebook(15, 10);
addOtherToPhonebook(14, 7);
addOtherToPhonebook(16, 7);
addOtherToPhonebook(13, 6);
addOtherToPhonebook(15, 6);
addOtherToPhonebook(14, 5);
addOtherToPhonebook(15, 4);
addOtherToPhonebook(12, 7);
addOtherToPhonebook(12, 5);
addOtherToPhonebook(13, 18);
addOtherToPhonebook(15, 18);
addOtherToPhonebook(16, 19);
addOtherToPhonebook(15, 20);
addOtherToPhonebook(14, 17);
addOtherToPhonebook(16, 17);
addOtherToPhonebook(13, 16);
addOtherToPhonebook(15, 16);
addOtherToPhonebook(14, 15);
addOtherToPhonebook(15, 14);
addOtherToPhonebook(12, 17);
addOtherToPhonebook(12, 15);
addOtherToPhonebook(0, 7);
addOtherToPhonebook(0, 9);
addOtherToPhonebook(0, 11);
addOtherToPhonebook(1, 8);
addOtherToPhonebook(1, 6);
addOtherToPhonebook(2, 9);
addOtherToPhonebook(1, 10);
addOtherToPhonebook(3, 12);
addOtherToPhonebook(4, 13);
addOtherToPhonebook(3, 8);
}
}
function addTowerToPhonebook(xpos, ypos) {
addGraphicToPhonebook(xpos, ypos, towerLocations);
}
function removeTowerFromPhonebook(xpos, ypos) {
removeGraphicFromPhonebook(xpos, ypos, towerLocations);
}
function addOtherToPhonebook(xpos, ypos) {
addGraphicToPhonebook((xpos * 32) + 64, (ypos * 16) + 64, otherLocations);
}
function addGraphicToPhonebook(xpos, ypos, inputArray) {
var _local1 = new Array();
_local1.push(xpos, ypos);
inputArray.push(_local1);
}
function removeGraphicFromPhonebook(xpos, ypos, inputArray) {
var _local6 = new Array();
var _local3 = -1;
var _local1 = 0;
while (_local1 < inputArray.length) {
if ((inputArray[_local1][0] == xpos) && (inputArray[_local1][1] == ypos)) {
_local3 = _local1;
break;
}
_local1++;
}
if (_local3 != -1) {
inputArray.splice(_local3, 1);
}
}
function findDir(arg, arg2) {
if (arg < arg2) {
return(1);
}
if (arg > arg2) {
return(-1);
}
if (arg == arg2) {
return(0);
}
}
function printPhonebook(inputArray, useStageCoords) {
var _local2 = inputArray;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
if (!useStageCoords) {
trace(_local2[_local1]);
} else {
trace(((_local2[_local1][0] + xOffset) + " ") + (_local2[_local1][1] + yOffset));
}
_local1++;
}
}
function containsGraphics(xpos, ypos) {
var _local2 = false;
if ((((xpos < 0) || (ypos < 32)) || (xpos > 542)) || (ypos > 384)) {
_local2 = true;
return(_local2);
}
var _local6 = xpos / w;
var _local5 = ypos / h;
_local6 = translatePointToGrid(_local6, "x");
_local5 = translatePointToGrid(_local5, "y");
if ((_local6 % 2) == (_local5 % 2)) {
_local2 = true;
trace("Road.containsGraphics: four corners!");
return(_local2);
}
if (checkPhonebook(xpos, ypos, towerLocations)) {
_local2 = true;
return(_local2);
}
if (checkPhonebook(xpos, ypos, otherLocations)) {
_local2 = true;
return(_local2);
}
if (checkPhonebook(xpos, ypos, roadLocations)) {
_local2 = true;
return(_local2);
}
return(_local2);
}
function snapPointToGrid(xpos, ypos) {
xpos = translatePointToGrid(xpos, "x");
ypos = translatePointToGrid(ypos, "y");
var _local2 = Math.floor(xpos / W);
var _local3 = Math.floor(ypos / H);
var _local7 = ((xpos / W) - _local2) - ((ypos / H) - _local3);
if ((_local7 >= 0) && ((Math.floor(xpos / w) % 2) != 0)) {
_local2 = _local2 + 0.5;
} else if ((Math.floor(ypos / h) % 2) != 0) {
_local3 = _local3 + 0.5;
}
_local2 = _local2 * W;
_local3 = _local3 * H;
var _local6 = new Array();
_local2 = translatePointToStage(_local2, "x");
_local3 = translatePointToStage(_local3, "y");
_local6.push(_local2);
_local6.push(_local3);
return(_local6);
}
function cannotBuildOn(xpos, ypos) {
return(containsGraphics(xpos, ypos));
}
function translatePointToGrid(gridPosition, coord) {
return(translatePointToStage(gridPosition, "-" + coord));
}
function translatePointToStage(gridPosition, coord) {
switch (coord) {
case "x" :
gridPosition = gridPosition + xOffset;
break;
case "y" :
gridPosition = gridPosition + yOffset;
break;
case "-x" :
gridPosition = gridPosition - xOffset;
break;
case "-y" :
gridPosition = gridPosition - yOffset;
}
return(gridPosition);
}
function translateArrayToGrid(inputArray, coord) {
translateArrayToStage(inputArray, "-" + coord);
}
function translateArrayToStage(inputArray, coord) {
var _local1 = inputArray;
var _local3;
switch (coord) {
case "x" :
_local3 = xOffset;
var _local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2] = _local1[_local2] + _local3;
_local2++;
}
break;
case "y" :
_local3 = yOffset;
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2] = _local1[_local2] + _local3;
_local2++;
}
break;
case "xy" :
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2][0] = _local1[_local2][0] + xOffset;
_local1[_local2][1] = _local1[_local2][1] + yOffset;
_local2++;
}
break;
case "-xy" :
_local2 = 0;
for(;;){
if (_local2 >= _local1.length) {
break;
}
_local1[_local2][0] = _local1[_local2][0] - xOffset;
_local1[_local2][1] = _local1[_local2][1] - yOffset;
_local2++;
};
}
}
function stretchArray(inputArray, coord) {
var _local2 = inputArray;
var _local4 = _local2.length;
var _local1 = 0;
while (_local1 < _local2.length) {
switch (coord) {
case "x" :
_local2[_local1] = _local2[_local1] * W;
break;
case "y" :
_local2[_local1] = _local2[_local1] * H;
}
_local1++;
}
return(_local2);
}
function holdSnapCode(xpos, ypos) {
var _local3;
var _local4;
var _local2 = snapPointToGrid(xpos, ypos);
_local3 = _local2[0];
_local4 = _local2[1];
}
function howManyWaypoints() {
return(xArray.length);
}
function getX(i) {
return(xArray[i]);
}
function getY(i) {
return(yArray[i]);
}
static var W = 64;
static var H = 32;
static var w = 32;
static var h = 16;
static var xOffset = -43;
static var yOffset = -19;
var JailXCoords = new Array(7.5, 7, 2, 1.5, 1.5, 2, 5, 8.5, 8.5, 7.5, 6, 6, 5, 4, 4, 2.5);
var JailYCoords = new Array(11, 11.5, 11.5, 11, 10, 9.5, 9.5, 6, 4, 3, 4.5, 5.5, 6.5, 5.5, 4.5, 3);
var CasinoXCoords1 = new Array(2, 4.5, 3.5, 2.5, 1.5, 3.5, 1.5, 4, 5);
var CasinoXCoords2 = new Array(8, 5.5, 6.5, 7.5, 8.5, 6.5, 8.5, 6, 5);
var CasinoYCoords = new Array(2.5, 5, 6, 5, 6, 8, 10, 12.5, 12.5);
var ParadeXCoords1 = new Array(8, 6.5, 5, 4, 3, 2, 3, 1.5);
var ParadeYCoords1 = new Array(2.5, 4, 2.5, 3.5, 2.5, 3.5, 4.5, 6);
var ParadeXCoords2 = new Array(8, 6, 5, 6.5, 5.5, 3, 2.5, 2);
var ParadeYCoords2 = new Array(6.5, 8.5, 7.5, 6, 5, 7.5, 7, 7.5);
var ParadeXCoords3 = new Array(8, 7.5, 6, 5.5, 4.5, 2.5, 1.5, 3, 1.5, 2);
var ParadeYCoords3 = new Array(11.5, 12, 10.5, 11, 10, 12, 11, 9.5, 8, 7.5);
}
Symbol 1695 MovieClip [__Packages.com.electrotank.comedycentral.reno.player.Player] Frame 0
class com.electrotank.comedycentral.reno.player.Player
{
var Root, costsArray, scalePoints, _bossKilled;
function Player (m, xml, diffLvl, towerCosts, pointsMultiplier) {
Root = m;
costsArray = towerCosts;
scalePoints = pointsMultiplier;
XMLSetup(xml, diffLvl);
init();
}
function testing() {
}
function XMLSetup(x, diffLvl) {
var _local2 = new Array();
_local2 = x.firstChild.childNodes[2].childNodes;
var _local3 = diffLvl - 1;
var _local14 = Number(_local2[0].attributes.max);
var _local15 = Number(_local2[0].attributes.min);
REPAIR = Math.floor(Root.owner.interpolate(_local15, _local14, -_local3, "large", 3, false));
var _local12 = Number(_local2[1].attributes.min);
var _local10 = Number(_local2[1].attributes.max);
REPAIRCOST = Math.floor(Root.owner.interpolate(_local12, _local10, _local3, "small", 3, false));
var _local7 = Number(_local2[2].attributes.max);
var _local4 = Number(_local2[2].attributes.min);
var _local16 = Math.floor((_local7 - _local4) / 2);
MAXHP = Math.floor(Root.owner.interpolate(_local4, _local7, _local3, "small", 3, false));
var _local6 = _local2[3].attributes;
var _local13 = Number(_local6.min);
var _local11 = Number(_local6.max);
STARTINGCASH = Math.floor(Root.owner.interpolate(_local13, _local11, _local3, "small", 3, false));
var _local8 = _local2[4].attributes;
var _local9 = Number(_local8.min);
var _local5 = Number(_local8.max);
TOWERSALEVALUE = Root.owner.interpolate(_local9, _local5, -_local3, "large", 3, false);
trace((((("PXML rpr" + REPAIR) + " $") + REPAIRCOST) + ", HP") + MAXHP);
trace((((("PXML " + _local9) + " ") + _local5) + " ") + TOWERSALEVALUE);
}
function init() {
resetKills();
addPoints(0);
addMoney(STARTINGCASH);
_health = MAXHP;
takeDamage(0);
Root.popupContainer.stats.health_txt.selectable = false;
Root.popupContainer.stats.score_txt.selectable = false;
Root.popupContainer.stats.money_txt.selectable = false;
testing();
}
function sellingTower(moneySpent) {
addMoney(moneySpent * TOWERSALEVALUE);
}
function set bossKilled(flag) {
_bossKilled = flag;
//return(bossKilled);
}
function get bossKilled() {
return(_bossKilled);
}
function get killsThisLevel() {
return(_killsThisLevel);
}
function resetKills() {
_killsThisLevel = 0;
_bossKilled = false;
}
function addToKills() {
_killsThisLevel++;
}
function repair() {
if ((_money >= REPAIRCOST) && (_health < MAXHP)) {
repairDamage(REPAIR);
spendMoney(REPAIRCOST);
}
}
function repairDamage(n) {
if ((_health + n) < MAXHP) {
_health = _health + n;
} else {
_health = MAXHP;
}
updateHealthBar();
Root.popupContainer.stats.health_txt.text = "HP: " + _health;
return(_health);
}
function updateHealthBar() {
var _local2 = (_health / MAXHP) * 100;
_local2 = Math.floor(_local2);
Root.popupContainer.healthBar.bar_mc.gotoAndStop(100 - _local2);
}
function takeDamage(n) {
_health = _health - n;
updateHealthBar();
if (n != 0) {
var _local2 = Root.popupContainer.healthBar._x;
var _local3 = Root.popupContainer.healthBar._y - 5;
var _local4 = Root.getNextHighestDepth();
Root.owner.showExplosion(false, false);
Root.popupContainer.attachMovie("hpFloat", "healthFloat", _local4, {_x:_local2, _y:_local3});
}
if (_health <= 0) {
_health = 0;
if (!dying) {
Root.owner.gameOverExplosion();
dying = true;
}
}
Root.popupContainer.stats.health_txt.text = "HP: " + _health;
return(_health);
}
function addPoints(n) {
_score = _score + Math.floor(n * scalePoints);
Root.popupContainer.stats.score_txt.text = "Score: " + _score;
return(_score);
}
function get score() {
return(_score);
}
function spendMoney(n) {
addMoney(-n);
}
function checkAffordTowers(path) {
var _local4 = 0;
while (_local4 < 8) {
var _local5 = costsArray[_local4];
var _local2;
switch (_local4) {
case 0 :
_local2 = path.buy_basic_mc.btn;
break;
case 1 :
_local2 = path.buy_water_mc.btn;
break;
case 2 :
_local2 = path.buy_fire_mc.btn;
break;
case 3 :
_local2 = path.buy_electric_mc.btn;
break;
case 4 :
_local2 = path.buy_aoe_mc.btn;
break;
case 5 :
_local2 = path.buy_bio_mc.btn;
break;
case 6 :
_local2 = path.buy_slow_mc.btn;
break;
case 7 :
_local2 = path.buy_artillery_mc.btn;
}
if (_money < _local5) {
_local2._alpha = 30;
} else if (Root.towerType.btn._alpha != 100) {
_local2._alpha = 100;
}
_local4++;
}
}
function addMoney(n) {
_money = _money + Math.floor(n);
Root.popupContainer.stats.money_txt.text = "Funds: $" + _money;
checkAffordTowers(Root.buttons);
}
function get money() {
return(_money);
}
function hasMoney(n) {
var _local2;
if (_money < n) {
_local2 = false;
} else {
_local2 = true;
}
return(_local2);
}
var REPAIR = 10;
var REPAIRCOST = 50;
var MAXHP = 50;
var STARTINGCASH = 200;
var TOWERSALEVALUE = 0.5;
var _money = 0;
var _score = 0;
var _health = 50;
var _killsThisLevel = 0;
var dying = false;
}
Symbol 1696 MovieClip [__Packages.com.electrotank.comedycentral.reno.player.Bullet] Frame 0
class com.electrotank.comedycentral.reno.player.Bullet
{
var myType, Root, SLOWFRAMES, SLOWPERCENT, DOTFRAMES, DOTDAMAGE, SPLASHRADIUS, SPLASHDMG, STUNFRAMES, STUNCHANCE, _slow, _damageOverTime, towerDmgModifier, nextx, nexty, _seized, _damage, _targetAt, clip;
function Bullet (m, life, dmg, xml, type, slowNum, slowAmt, dotNum, dotAmt, splashRad, splashDmg, stunNum, stunChance) {
myType = type;
XMLSetup(xml);
Root = m;
var _local2 = Root.getNextHighestDepth();
var _local3 = Root.attachMovie("projectile", "bullet" + _local2, _local2);
setClip(_local3);
getClip().owner = this;
switch (myType) {
case "basic" :
getClip().gotoAndStop("muzzle0_mc");
break;
case "water" :
getClip().gotoAndStop("muzzle1_mc");
break;
case "fire" :
getClip().gotoAndStop("muzzle2_mc");
break;
case "electric" :
getClip().gotoAndStop("muzzle3_mc");
break;
case "aoe" :
getClip().gotoAndStop("muzzle4_mc");
break;
case "bio" :
getClip().gotoAndStop("muzzle5_mc");
break;
case "slow" :
getClip().gotoAndStop("muzzle6_mc");
break;
case "artillery" :
getClip().gotoAndStop("muzzle7_mc");
}
SLOWFRAMES = slowNum;
SLOWPERCENT = slowAmt;
DOTFRAMES = dotNum;
DOTDAMAGE = dotAmt;
SPLASHRADIUS = splashRad;
SPLASHDMG = splashDmg;
STUNFRAMES = stunNum;
STUNCHANCE = stunChance;
init(life, dmg);
}
function XMLSetup(x) {
var _local3 = new Array();
_local3 = x.firstChild.childNodes[4].childNodes;
var _local2 = 0;
switch (myType) {
case "basic" :
_local2 = 0;
break;
case "water" :
_local2 = 1;
break;
case "fire" :
_local2 = 2;
break;
case "electric" :
_local2 = 3;
break;
case "aoe" :
_local2 = 4;
break;
case "bio" :
_local2 = 5;
break;
case "slow" :
_local2 = 6;
break;
case "artillery" :
_local2 = 7;
}
SPEED = Number(_local3[_local2].attributes.speed);
BASEDMG = Number(_local3[_local2].attributes.damageModifier);
DELTA = Number(_local3[_local2].attributes.Delta);
}
function offScreen(w, h) {
var _local2 = false;
if ((((getClip()._x < 0) || (getClip()._x > w)) || (getClip()._y < 0)) || (getClip()._y > h)) {
_local2 = true;
}
return(_local2);
}
function get slow() {
return(_slow);
}
function get DoT() {
return(_damageOverTime);
}
function init(life, dmg) {
_lifetime = life;
towerDmgModifier = dmg;
}
function testing() {
}
function walk() {
getClip()._x = nextx;
getClip()._y = nexty;
}
function moveInMemory() {
nextx = getClip()._x + dx;
nexty = getClip()._y + dy;
if (framesAlive < _lifetime) {
framesAlive = framesAlive + DELTA;
} else {
seize();
}
}
function onScreen(xpos, ypos, xdir, ydir, d) {
dx = xdir * SPEED;
dy = ydir * SPEED;
var _local2 = (Math.atan2(dy, dx) * 180) / Math.PI;
getClip()._rotation = _local2;
framesAlive = 0;
_seized = false;
_damage = BASEDMG + d;
getClip()._x = xpos;
getClip()._y = ypos;
nextx = getClip()._x;
nexty = getClip()._y;
}
function get targetAt() {
return(_targetAt);
}
function seize() {
nextx = getClip()._x;
nexty = getClip()._y;
_seized = true;
}
function get pain() {
return(_damage);
}
function get seized() {
return(_seized);
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
var SPEED = 7;
var BASEDMG = 0;
var DELTA = com.electrotank.comedycentral.reno.player.Bullet.prototype.SPEED;
var dx = (2 * com.electrotank.comedycentral.reno.player.Bullet.prototype.SPEED) * 0;
var dy = com.electrotank.comedycentral.reno.player.Bullet.prototype.SPEED;
var _lifetime = 0;
var framesAlive = 0;
}
Symbol 1697 MovieClip [__Packages.com.electrotank.comedycentral.reno.player.TowerMenu] Frame 0
class com.electrotank.comedycentral.reno.player.TowerMenu extends com.utils.Observable
{
var plyr, notifyListeners, clip;
function TowerMenu (puc, p) {
super();
plyr = p;
var _local3 = puc.getNextHighestDepth();
var _local4 = puc.attachMovie("towerSelected", "towerMenu" + _local3, 666);
setClip(_local4);
getClip().owner = this;
prepTexts();
pseudoListeners();
hide();
}
function hide() {
getClip()._x = -50;
getClip()._y = -50;
}
function display(xpos, ypos, myName, UPGRADETEXT, fundsSpent, upgradesPerformed, NUMUPGRADES, UPGRADECOST) {
getClip()._x = xpos;
getClip()._y = ypos;
getClip().name_txt.text = myName;
getClip().attribute_txt.text = UPGRADETEXT;
getClip().worth_txt.text = "$" + Math.floor(fundsSpent / 2);
getClip().level_txt.text = "L" + (upgradesPerformed + 1);
getClip().nextlevel_txt.text = "L" + (upgradesPerformed + 2);
checkMaxedOut(upgradesPerformed, NUMUPGRADES, UPGRADECOST);
}
function prepTexts() {
getClip().bg_btn.useHandCursor = false;
getClip().name_txt.selectable = false;
getClip().nextlevel_txt.selectable = false;
getClip().worth_txt.selectable = false;
getClip().attribute_txt.selectable = false;
getClip().level_txt.selectable = false;
getClip().upcost_txt.selectable = false;
getClip().nextlevel_txt.selectable = false;
}
function clearMenu() {
destroy();
}
function pseudoListeners() {
getClip().onMouseMove = function () {
var _local3 = this._xmouse;
var _local4 = this._ymouse;
var _local2 = this.getBounds();
if ((((_local3 < (_local2.xMin + 12.5)) || (_local3 > (_local2.xMax - 12.5))) || (_local4 < ((_local2.yMin + (this._height / 2)) - 10))) || (_local4 > (_local2.yMax - 17))) {
this.owner.hide();
}
};
getClip().upgrade_btn.owner = this;
getClip().upgrade_btn.onPress = function () {
this.owner.upgradingTower();
};
getClip().sell_btn.owner = this;
getClip().sell_btn.onPress = function () {
this.owner.sellingTower();
};
}
function upgradingTower() {
notifyListeners("upgradeTower", {target:this, p:plyr, xLoc:getClip()._x, yLoc:getClip()._y + 16});
hide();
}
function sellingTower() {
notifyListeners("sellTower", {target:this, p:plyr, xLoc:getClip()._x, yLoc:getClip()._y + 16});
hide();
}
function upgrade(fundsSpent, UPGRADETEXT, UPGRADECOST, upgradesPerformed, NUMUPGRADES, MAXOUT) {
getClip().worth_txt.text = "$" + Math.floor(fundsSpent * plyr.TOWERSALEVALUE);
getClip().attribute_txt.text = UPGRADETEXT;
getClip().upcost_txt.text = "$" + UPGRADECOST;
getClip().level_txt.text = "L" + (upgradesPerformed + 1);
getClip().nextlevel_txt.text = "L" + (upgradesPerformed + 2);
checkMaxedOut(upgradesPerformed, NUMUPGRADES, UPGRADECOST);
}
function checkMaxedOut(upgradesPerformed, NUMUPGRADES, UPGRADECOST) {
if (upgradesPerformed >= NUMUPGRADES) {
getClip().upgrade_btn._alpha = 30;
getClip().nextlevel_txt._visible = false;
getClip().upcost_txt._visible = false;
} else {
getClip().upcost_txt.text = "$" + UPGRADECOST;
getClip().upgrade_btn._alpha = 100;
getClip().nextlevel_txt._visible = true;
getClip().upcost_txt._visible = true;
}
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
}
Symbol 1698 MovieClip [__Packages.com.electrotank.comedycentral.reno.board.Square] Frame 0
class com.electrotank.comedycentral.reno.board.Square
{
var Root, road, canBuild, clip;
function Square (m, r) {
Root = m;
road = r;
}
function clickedBuildButton(e) {
destroy();
}
function updateCursor(e) {
destroy();
var _local5 = (e.xpos * gridWidth) + xOffset;
var _local4 = (e.ypos * gridHeight) + yOffset;
var _local6 = Root.getNextHighestDepth();
var _local7 = Root.attachMovie("gridSquare", "highlight", _local6, {_x:_local5, _y:_local4});
setClip(_local7);
getClip().owner = this;
canBuild = true;
if (road.cannotBuildOn(_local5, _local4)) {
e.type = "illegal";
}
if ((Root.owner.map == 2) || (Root.owner.map == 3)) {
if (Root.owner.road2.cannotBuildOn(_local5, _local4)) {
e.type = "illegal";
}
}
if (Root.owner.map == 3) {
if (Root.owner.road3.cannotBuildOn(_local5, _local4)) {
e.type = "illegal";
}
}
var _local2;
switch (e.type) {
case "basic" :
_local2 = 1;
break;
case "water" :
_local2 = 2;
break;
case "fire" :
_local2 = 3;
break;
case "electric" :
_local2 = 4;
break;
case "aoe" :
_local2 = 5;
break;
case "bio" :
_local2 = 6;
break;
case "slow" :
_local2 = 7;
break;
case "artillery" :
_local2 = 8;
break;
case "illegal" :
_local2 = 9;
break;
default :
trace("square.updateCursor got bad type");
}
getClip().gotoAndStop(_local2);
}
function building() {
return(canBuild);
}
function towerBuilt() {
canBuild = false;
destroy();
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
static var gridWidth = 32;
static var gridHeight = 16;
static var xOffset = -43 + (2 * gridWidth);
static var yOffset = -19 + (2 * gridHeight);
}
Symbol 1699 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.InstructionsScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.InstructionsScreen extends com.utils.Observable
{
var main, Root, SM, clip;
function InstructionsScreen (p, m, sm) {
super();
main = m;
Root = p;
SM = sm;
var _local3 = p.getNextHighestDepth();
var _local4 = p.attachMovie("InstructionsScreen", "clip" + _local3, _local3);
setClip(_local4);
getClip.owner = this;
init();
}
function pseudolisteners() {
getClip().ok_btn.owner = this;
getClip().ok_btn.onPress = function () {
this.owner.backTo();
};
}
function playGame() {
destroy();
main.levelSelection();
}
function backTo() {
var _local2 = SM.playSound("click2");
destroy();
Root.owner.hardInterrupt = false;
}
function testing() {
}
function init() {
pseudolisteners();
testing();
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
}
Symbol 1700 MovieClip [__Packages.com.electrotank.comedycentral.reno.enemy.Critter] Frame 0
class com.electrotank.comedycentral.reno.enemy.Critter
{
var Root, myType, road, _dead, EPSILON, currentSpeed, RESISTANCE, RESISTMOD, WEAKNESS, WEAKMOD, SLOWFLOOR, health, bleedTimer, tarTimer, dying, _xdir, _ydir, _dx, _dy, numWaypoints, _value, _points, whichCritterAmI, currentx, currenty, nextx, nexty, bioTimer, i, INITIALXDIR, INITIALYDIR, waypointReached, clip;
function Critter (m, map, r, ca, params, type, diffLv) {
Root = m;
var _local2 = Root.getNextHighestDepth();
var _local4 = Root.attachMovie("badguys_mc", "badguy" + _local2, _local2);
setClip(_local4);
getClip().owner = this;
myType = type[0];
XMLSetup(params, diffLv);
BASEHEALTH = Math.floor(BASEHEALTH * type[1]);
BASEWORTH = Math.floor(BASEWORTH * type[2]);
BASEPOINTS = Math.floor(BASEPOINTS * type[3]);
var _local5 = 10;
_local2++;
getClip().attachMovie("healthBarSmall", "healthBar", _local2, {_y:_local5});
init(r, ca);
}
function get myRoad() {
return(road);
}
function doneDying() {
initTimers();
_dead = true;
}
function XMLSetup(x, diffLv) {
var _local3 = new Array();
_local3 = x.firstChild.childNodes[1].childNodes;
var _local2;
if (((myType == "perp1") || (myType == "perp2")) || (myType == "perp3")) {
myType = "perp";
} else if (((myType == "drunk1") || (myType == "drunk2")) || (myType == "drunk3")) {
myType = "drunk";
} else if (((myType == "hood1") || (myType == "hood2")) || (myType == "hood3")) {
myType = "hood";
} else if (((myType == "junkie1") || (myType == "junkie2")) || (myType == "junkie3")) {
myType = "junkie";
} else if (((myType == "terrorist1") || (myType == "terrorist2")) || (myType == "terrorist3")) {
myType = "terrorist";
} else if (((myType == "biker1") || (myType == "biker2")) || (myType == "biker3")) {
myType = "biker";
}
switch (myType) {
case "perp" :
_local2 = 0;
break;
case "drunk" :
_local2 = 1;
break;
case "hood" :
_local2 = 2;
break;
case "junkie" :
_local2 = 3;
break;
case "terrorist" :
_local2 = 4;
break;
case "biker" :
_local2 = 5;
break;
case "armored_car" :
_local2 = 6;
break;
case "helicopter" :
_local2 = 7;
break;
case "tank" :
_local2 = 8;
break;
default :
trace("critter XML: BAD TYPE");
}
switch (diffLv) {
case 1 :
SPEED = Number(_local3[_local2].attributes.normalSpeed);
EPSILON = Number(_local3[_local2].childNodes[3].attributes.normal);
break;
case 2 :
SPEED = Number(_local3[_local2].attributes.hardSpeed);
EPSILON = Number(_local3[_local2].childNodes[3].attributes.hard);
break;
case 3 :
SPEED = Number(_local3[_local2].attributes.insaneSpeed);
EPSILON = Number(_local3[_local2].childNodes[3].attributes.insane);
}
currentSpeed = SPEED;
BASEHEALTH = Number(_local3[_local2].attributes.baseHealth);
BASEWORTH = Number(_local3[_local2].attributes.baseValue);
BASEPOINTS = Number(_local3[_local2].attributes.basePoints);
RESISTANCE = _local3[_local2].childNodes[0].attributes.type;
RESISTMOD = Number(_local3[_local2].childNodes[0].attributes.mod);
WEAKNESS = _local3[_local2].childNodes[1].attributes.type;
WEAKMOD = Number(_local3[_local2].childNodes[1].attributes.mod);
SLOWFLOOR = Number(_local3[_local2].childNodes[2].attributes.minMultiplier);
}
function updateHealthBar() {
var _local2 = (health / BASEHEALTH) * 100;
_local2 = Math.floor(_local2);
getClip().healthBar.bar_mc.gotoAndStop(100 - _local2);
}
function takeDamage(d, type, slowFrames, slowPercent, dotFrames, dotDmg, splashRadius, splashDmg, stunFrames, stunChance) {
if (type == WEAKNESS) {
d = d + (d * WEAKMOD);
}
if (type == RESISTANCE) {
d = d - (d * RESISTMOD);
}
health = health - d;
updateHealthBar();
if ((type == "water") || ((type == "slow") && (currentSpeed != 0))) {
if (((type == "water") && (bleedTimerTicking)) && (bleedTimer.why == "fire")) {
endBleeding("fire");
getClip().badguy_mc.badguy_mc.burning.removeMovieClip();
}
slowdown((100 - slowPercent) / 100, slowFrames, type);
}
if (type == "electric") {
var _local5 = Math.random();
var _local4 = stunChance;
if (tarTimerTicking && (tarTimer.why == "water")) {
_local4 = 1;
}
if (_local5 <= _local4) {
slowdown((100 - slowPercent) / 100, stunFrames, type);
}
}
if ((type == "fire") || (type == "bio")) {
startBleeding(dotFrames, dotDmg, type);
}
if ((((type == "slow") || (type == "aoe")) || (type == "bio")) || (type == "artillery")) {
causeAOEdmg(splashRadius, splashDmg, slowFrames, slowPercent, dotFrames, dotDmg, type);
}
if ((health <= 0) && (!dying)) {
die(false);
}
}
function slowdown(f, numFrames, type) {
if (((currentSpeed * f) > (SPEED * SLOWFLOOR)) && (f != 0)) {
currentSpeed = currentSpeed * f;
var _local3 = calcSpeed(_xdir, _ydir);
_dx = _local3[0];
_dy = _local3[1];
}
if (f == 0) {
_dx = _dx * f;
_dy = _dy * f;
}
if (currentSpeed == SPEED) {
SLOWTIME = numFrames;
}
tarTimer.count = 0;
tarTimer.ticking = true;
tarTimer.why = type;
}
function endSlowdown(why) {
if (tarTimer.why == why) {
currentSpeed = SPEED;
var _local2 = calcSpeed(_xdir, _ydir);
_dx = _local2[0];
_dy = _local2[1];
tarTimer.ticking = false;
tarTimer.why = "";
}
}
function init(r, ca) {
dying = false;
numWaypoints = r.howManyWaypoints();
road = r;
_value = BASEWORTH * Root.owner.CASHPERCRITTERX;
_points = BASEPOINTS;
health = BASEHEALTH;
ca.push(this);
initTimers();
whichCritterAmI = ca.length - 1;
if (whichCritterAmI == 0) {
trace((((((((((((((((("crit XML: hp" + BASEHEALTH) + " $") + BASEWORTH) + " r") + RESISTANCE) + "") + RESISTMOD) + "% w") + WEAKNESS) + "") + WEAKMOD) + "% minslow") + SLOWFLOOR) + " spd") + SPEED) + " ep") + EPSILON);
}
nullConfig();
getClip()._x = -10 - (8 * whichCritterAmI);
getClip()._y = -10 - (5 * (whichCritterAmI % 2));
}
function nullConfig() {
currentx = 0;
currenty = 0;
_dx = 0;
_dy = 0;
nextx = 0;
nexty = 0;
}
function initTimers() {
tarTimer = new Object();
bleedTimer = new Object();
bioTimer = new Object();
tarTimer.ticking = false;
bleedTimer.ticking = false;
bioTimer.ticking = false;
}
function onScreen(xdir, ydir) {
hasBeenOnscreened = true;
i = 0;
INITIALXDIR = xdir;
INITIALYDIR = ydir;
_dead = false;
waypointReached = false;
currentx = road.getX(i);
currenty = road.getY(i);
nextx = currentx;
nexty = currenty;
_xdir = xdir;
_ydir = ydir;
aboutFace(_xdir, _ydir, getClip().badguy_mc);
var _local2 = calcSpeed(_xdir, _ydir);
_dx = _local2[0];
_dy = _local2[1];
i++;
getClip()._x = currentx;
getClip()._y = currenty;
}
function aboutFace(xdir, ydir, animation) {
switch (xdir) {
case 1 :
switch (ydir) {
case 1 :
animation.gotoAndStop("badguy0_mc");
break;
case 0 :
animation.gotoAndStop("badguy45_mc");
break;
case -1 :
animation.gotoAndStop("badguy90_mc");
}
break;
case 0 :
switch (ydir) {
case 1 :
animation.gotoAndStop("badguy315_mc");
break;
case -1 :
animation.gotoAndStop("badguy135_mc");
}
break;
case -1 :
switch (ydir) {
case 1 :
animation.gotoAndStop("badguy270_mc");
break;
case 0 :
animation.gotoAndStop("badguy225_mc");
break;
case -1 :
animation.gotoAndStop("badguy180_mc");
}
}
}
function snapToWaypoint() {
currentx = road.getX(i);
currenty = road.getY(i);
getClip()._x = currentx;
getClip()._y = currenty;
}
function calcSpeed(xdir, ydir) {
var _local3 = new Array();
var _local2 = currentSpeed;
var _local5;
var _local4;
if ((xdir != 0) && (ydir != 0)) {
_local5 = (COSINE * _local2) * xdir;
_local4 = (SINE * _local2) * ydir;
} else {
_local5 = _local2 * xdir;
_local4 = _local2 * ydir;
}
_local3.push(_local5);
_local3.push(_local4);
return(_local3);
}
function getWaypoint() {
waypointReached = false;
snapToWaypoint();
i++;
if (i == numWaypoints) {
die(true);
}
_xdir = road.findDir(getClip()._x, road.getX(i));
_ydir = road.findDir(getClip()._y, road.getY(i));
aboutFace(_xdir, _ydir, getClip().badguy_mc);
var _local2 = calcSpeed(_xdir, _ydir);
_dx = _local2[0];
_dy = _local2[1];
nextx = currentx;
nexty = currenty;
}
function moveInMemory() {
nextx = currentx + _dx;
nexty = currenty + _dy;
var _local2 = dotProd(road.getX(i), currentx, road.getY(i), currenty);
if (_local2 <= (SPEED * SPEED)) {
waypointReached = true;
}
if (hasBeenOnscreened && (offScreen(550, 440, 10))) {
emergencyReset();
}
}
function offScreen(stageWidth, stageHeight, padvalue) {
if ((((currentx < (-padvalue)) || (currenty < (-padvalue))) || (currentx > (stageWidth + padvalue))) || (currenty > (stageHeight + padvalue))) {
return(true);
}
return(false);
}
function emergencyReset() {
onScreen(INITIALXDIR, INITIALYDIR);
}
function twoNorm(x1, x2, y1, y2) {
var _local2;
_local2 = Math.sqrt(dotProd(x1, x2, y1, y2));
return(_local2);
}
function dotProd(x1, x2, y1, y2) {
var _local2 = Math.abs(x1 - x2);
var _local1 = Math.abs(y1 - y2);
var _local3;
_local3 = (_local2 * _local2) + (_local1 * _local1);
return(_local3);
}
function walk() {
if (waypointReached) {
getWaypoint();
}
currentx = nextx;
currenty = nexty;
getClip()._x = currentx;
getClip()._y = currenty;
}
function causeAOEdmg(radius, dmgAmount, slowFrames, slowPercent, DOTframes, DOTdamage, type) {
var _local6 = Root.owner.critterArray;
var _local3 = 0;
while (_local3 < _local6.length) {
if (_local3 != whichCritterAmI) {
var _local2 = _local6[_local3];
var _local5 = twoNorm(getClip()._x, _local2.getClip()._x, getClip()._y, _local2.getClip()._y);
if ((_local5 <= radius) && (_local2.hasBeenOnscreened)) {
_local2.takeAOEdmg(dmgAmount, type);
if (type == "slow") {
_local2.slowdown((100 - slowPercent) / 100, slowFrames, type);
}
if (type == "bio") {
_local2.startBleeding(DOTframes, DOTdamage, type);
}
}
}
_local3++;
}
}
function takeAOEdmg(dmgAmount, type) {
takeDamage(dmgAmount, "", 0, 0, 0, 0, 0, 0, 0, 0);
}
function die(madeIt) {
dying = true;
if (!madeIt) {
getClip().badguy_mc.badguy_mc.gotoAndStop("die");
Root.owner.player.addMoney(_value);
Root.owner.player.addPoints(_points);
var _local2 = getClip().getNextHighestDepth();
var _local3 = 10;
getClip().attachMovie("dollarFloat", "float" + _local2, _local2, {_y:-_local3});
} else {
Root.owner.player.takeDamage(1);
doneDying();
}
}
function get dead() {
return(_dead);
}
function get slowTime() {
return(SLOWTIME);
}
function get bleedTime() {
return(BLEEDTIME);
}
function bleedTick() {
if (!dying) {
var _local2 = BLEEDDMG;
if (((RESISTANCE == "fire") && (bleedTimer.ticking)) || ((RESISTANCE == "bio") && (bioTimer.ticking))) {
_local2 = _local2 - (_local2 * RESISTMOD);
} else if (((WEAKNESS == "fire") && (bleedTimer.ticking)) || ((WEAKNESS == "bio") && (bioTimer.ticking))) {
_local2 = _local2 + (_local2 * WEAKMOD);
}
health = health - _local2;
}
updateHealthBar();
if ((health <= 0) && (!dying)) {
die(false);
}
bleedTimer.count++;
}
function slowdownTick() {
tarTimer.count++;
}
function get bleedTimerCount() {
return(bleedTimer.count);
}
function get bioTimerCount() {
return(bioTimer.count);
}
function get tarTimerCount() {
return(tarTimer.count);
}
function get tarTimerTicking() {
return(tarTimer.ticking);
}
function get bleedTimerTicking() {
return(bleedTimer.ticking);
}
function get bioTimerTicking() {
return(bioTimer.ticking);
}
function endBleeding(why) {
if (why == "fire") {
bleedTimer.ticking = false;
bleedTimer.count = 0;
}
if (why == "bio") {
bioTimer.ticking = false;
bioTimer.count = 0;
}
BLEEDDMG = 0;
BLEEDTIME = 0;
}
function startBleeding(numFrames, dmgAmount, type) {
switch (type) {
case "fire" :
if (!bleedTimer.ticking) {
BLEEDDMG = BLEEDDMG + dmgAmount;
if (BLEEDTIME == 0) {
BLEEDTIME = numFrames;
}
bleedTimer.count = 0;
bleedTimer.ticking = true;
bleedTimer.why = type;
}
break;
case "bio" :
if (bioTimer.ticking) {
break;
}
BLEEDDMG = BLEEDDMG + dmgAmount;
if (BLEEDTIME == 0) {
BLEEDTIME = numFrames;
}
bioTimer.count = 0;
bioTimer.ticking = true;
bioTimer.why = type;
}
var _local4 = 0;
var _local3 = getClip().getNextHighestDepth();
if (type == "fire") {
var _local6 = getClip().badguy_mc.badguy_mc.attachMovie("burn", "burning", _local3, {_y:-_local4});
}
if (type == "bio") {
}
}
function get xdir() {
return(_xdir);
}
function get ydir() {
return(_ydir);
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
var SPEED = 1;
var BASEHEALTH = 100;
var BASEWORTH = 1;
var BASEPOINTS = 1;
var SLOWTIME = 50;
var BLEEDTIME = 0;
var BLEEDDMG = 0;
var SINE = 0.447213595499958;
var COSINE = 0.894427190999916;
var BOOMRADIUS = 50;
var hasBeenOnscreened = false;
}
Symbol 1701 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.HighScoreScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.HighScoreScreen extends com.utils.Observable
{
var main, Root, SM, slider, clip;
function HighScoreScreen (p, m, sm) {
super();
main = m;
Root = p;
SM = sm;
var _local3 = p.getNextHighestDepth();
var _local4 = p.attachMovie("HighScoreScreen", "clip" + _local3, _local3);
setClip(_local4);
getClip.owner = this;
init();
}
function format(num) {
var _local7 = num / Math.abs(num);
num = Math.abs(num);
var _local4 = num.toString();
var _local2 = "";
var _local5 = _local4.length;
var _local1 = _local4.length - 3;
while (_local1 > 0) {
var _local3 = _local4.substr(_local1, _local5 - _local1);
_local2 = ("," + _local3) + _local2;
_local5 = _local1;
_local1 = _local1 - 3;
}
_local2 = _local4.substr(0, _local5) + _local2;
if (_local7 < 0) {
_local2 = "-" + _local2;
}
return(_local2);
}
function init() {
slider = new com.utils.Slider(getClip(), "vertical", "ScrollBar");
slider.move(510, 120);
slider.setLength(245);
slider.setEnabled(false);
slider.addListener(this);
pseudolisteners();
_root.loadHighScores(this, 0, 100);
}
function fakeTheList() {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < 100) {
var _local3 = new com.electrotank.comedycentral.reno.scores.Score("u" + random(10000), 1000000 - _local2, "SomeMap", 100000000 - (60000 * _local2), "insane");
_local4.push(_local3);
_local2++;
}
highScoresLoaded(_local4);
}
function change(e) {
var _local3 = e.value;
var _local2 = getClip().holder_mc.holder_mc;
var _local4 = _local2._height;
_local2._y = (-_local3) * _local4;
}
function highScoresLoaded(list) {
getClip().loading_mc._visible = false;
var _local7 = getClip().holder_mc.holder_mc;
var _local8 = 30;
if (list.length > 8) {
slider.setEnabled(true);
}
var _local3 = 0;
while (_local3 < list.length) {
var _local4 = list[_local3];
var _local2 = _local7.attachMovie("score_line_item", "s" + _local3, _local3);
_local2.index_txt.text = (_local3 + 1).toString() + ".";
_local2.userName_txt.text = _local4.getUserName();
_local2.area_txt.text = _local4.getMap();
_local2.difficulty_txt.text = _local4.getDifficulty();
var _local5 = Math.floor(_local4.getTime() / 60000);
_local2.time_txt.text = _local5;
_local2.score_txt.text = format(_local4.getScore());
_local2._y = _local8 * _local3;
_local3++;
}
}
function pseudolisteners() {
getClip().back_btn.owner = this;
getClip().back_btn.onPress = function () {
this.owner.goBack();
};
}
function goBack() {
destroy();
if (main.won) {
main.won = false;
main.win.replay();
} else if (main.lost) {
main.lost = false;
main.lose.replay();
}
}
function wipeScores() {
getClip().scorelist.destroy();
}
function selectLevel() {
destroy();
main.levelSelection();
}
function testing() {
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
}
Symbol 1702 MovieClip [__Packages.com.utils.Slider] Frame 0
class com.utils.Slider extends com.utils.Observable
{
var path, enabled, sliderClip, handleShift, dragging, factor, notifyListeners;
function Slider (tmp_path, direction, sliderLinkageName) {
super();
path = tmp_path;
init(direction, sliderLinkageName);
setEnabled(true);
}
function setEnabled(val) {
enabled = val;
if (enabled) {
enable(sliderClip.up_btn);
enable(sliderClip.down_btn);
enable(sliderClip.handle_mc);
sliderClip.handle_mc._visible = true;
enable(sliderClip.bar_mc);
sliderClip._alpha = 100;
} else {
disable(sliderClip.up_btn);
disable(sliderClip.down_btn);
disable(sliderClip.handle_mc);
sliderClip.handle_mc._visible = false;
disable(sliderClip.bar_mc);
sliderClip._alpha = 75;
}
}
function enable(mc) {
mc.enabled = true;
}
function disable(mc) {
mc.enabled = false;
}
function init(direction, sliderLinkageName) {
handleShift = 11;
dragging = false;
setFactor(0);
var _local2 = path.getNextHighestDepth();
sliderClip = path.attachMovie(sliderLinkageName, "slider" + _local2, _local2);
if (direction == "vertical") {
sliderClip._rotation = 90;
}
sliderClip.owner = this;
sliderClip.handle_mc.owner = this;
sliderClip.up_btn.owner = this;
sliderClip.down_btn.owner = this;
sliderClip.bar_mc.owner = this;
sliderClip.up_btn.onPress = function () {
this._focusrect = false;
Selection.setFocus(this);
this.owner.arrowClicked(-1);
};
sliderClip.down_btn.onPress = function () {
this._focusrect = false;
Selection.setFocus(this);
this.owner.arrowClicked(1);
};
sliderClip.handle_mc.onPress = function () {
this.owner.dragging = true;
};
sliderClip.onMouseUp = function () {
this.owner.dragging = false;
};
sliderClip.onMouseMove = function () {
this.owner.mouseMoved();
};
sliderClip.bar_mc.onPress = function () {
this.owner.barClicked();
};
sliderClip.bar_mc.useHandCursor = false;
setValue(0);
}
function getClip() {
return(sliderClip);
}
function destroy() {
sliderClip.removeMovieClip();
}
function toggleBar() {
sliderClip.bar_mc._alpha = 0;
}
function barClicked() {
var _local2 = sliderClip.bar_mc._width;
var _local3 = sliderClip._xmouse;
setValue(_local3 / _local2);
}
function mouseMoved() {
updateAfterEvent();
if (dragging) {
var _local2 = sliderClip._xmouse;
var _local4 = sliderClip.bar_mc._width;
if (_local2 < handleShift) {
_local2 = handleShift;
} else if (_local2 > (_local4 - handleShift)) {
_local2 = _local4 - handleShift;
}
sliderClip.handle_mc._x = _local2;
var _local3 = (_local2 - handleShift) / (_local4 - (2 * handleShift));
_local3 = Math.min(1, _local3);
_local3 = Math.max(0, _local3);
setFactor(_local3);
}
}
function arrowClicked(dir) {
var _local2 = factor;
_local2 = _local2 + (dir * 0.2);
_local2 = Math.max(0, _local2);
_local2 = Math.min(1, _local2);
setValue(_local2);
}
function setLength(num) {
sliderClip.bar_mc._width = num;
sliderClip.up_btn._x = 0;
sliderClip.down_btn._x = num;
}
function setValue(num) {
var _local2 = sliderClip.bar_mc._width;
sliderClip.handle_mc._x = handleShift + ((_local2 - (2 * handleShift)) * num);
setFactor(num);
}
function move(x, y) {
sliderClip._x = x;
sliderClip._y = y;
}
function setFactor(num) {
factor = num;
var _local2 = new Object();
_local2.target = this;
_local2.value = getFactor();
notifyListeners("change", _local2);
}
function getFactor() {
return(factor);
}
}
Symbol 1703 MovieClip [__Packages.com.electrotank.comedycentral.reno.scores.Score] Frame 0
class com.electrotank.comedycentral.reno.scores.Score
{
var userName, score, map, time, difficulty;
function Score (userName, score, map, time, difficulty) {
this.userName = userName;
this.score = score;
this.map = map;
this.time = time;
this.difficulty = difficulty;
}
function getDifficulty() {
return(difficulty);
}
function getUserName() {
return(userName);
}
function getScore() {
return(score);
}
function getMap() {
return(map);
}
function getTime() {
return(time);
}
}
Symbol 1704 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.LoseScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.LoseScreen extends MovieClip
{
var Root, main, SM, difficultyToUse, mapToPlay, clip;
function LoseScreen (p, m, diff, round, map, pts, time, sm) {
super();
Root = p;
main = m;
main.lost = true;
SM = sm;
difficultyToUse = diff;
mapToPlay = map;
var _local3 = p.getNextHighestDepth();
var _local4 = p.attachMovie("LoseScreen", "clip" + _local3, _local3);
setClip(_local4);
init(diff, round, map, pts, time);
}
function testing() {
}
function init(difficultyLevel, round, map, score, elapsedTime) {
var _local2 = Math.floor(elapsedTime / 1000);
var _local3 = Math.floor(_local2 / 60);
var _local4 = _local2 - (60 * _local3);
getClip().time_txt.text = _local3;
getClip().time_txt.selectable = false;
getClip().time2_txt.text = _local4;
getClip().time2_txt.selectable = false;
getClip().score_txt.text = score;
getClip().score_txt.selectable = false;
switch (difficultyLevel) {
case 1 :
getClip().difficulty_txt.text = "Normal";
break;
case 2 :
getClip().difficulty_txt.text = "Hard";
break;
case 3 :
getClip().difficulty_txt.text = "Insane";
}
getClip().difficulty_txt.selectable = false;
switch (map) {
case 1 :
getClip().map_txt.text = "Jailbreak";
break;
case 2 :
getClip().map_txt.text = "Casino Riot";
break;
case 3 :
getClip().map_txt.text = "City Brawl";
}
getClip().map_txt.selectable = false;
getClip().round_txt.text = round;
getClip().round_txt.selectable = false;
getClip().return_btn.owner = this;
getClip().return_btn.onPress = function () {
this.owner.replay();
};
getClip().submit_btn.owner = this;
getClip().submit_btn.onPress = function () {
this.owner.submitScores(difficultyLevel, map, score, elapsedTime);
};
getClip().highscores_btn.owner = this;
getClip().highscores_btn.onPress = function () {
this.owner.displayScores();
};
}
function displayScores() {
var _local2 = SM.playSound("click2");
main.showHighScoreList();
}
function enterName() {
var _local2 = SM.playSound("click2");
getClip().gotoAndStop(2);
}
function submitScores(difficultyLevel, map, score, elapsedTime) {
var _local6 = SM.playSound("click2");
var _local3;
var _local4;
switch (map) {
case 1 :
_local3 = "Jailbreak";
break;
case 2 :
_local3 = "Casino Riot";
break;
case 3 :
_local3 = "City Brawl";
}
switch (difficultyLevel) {
case 1 :
_local4 = "Normal";
break;
case 2 :
_local4 = "Hard";
break;
case 3 :
_local4 = "Insane";
}
getClip().submission_txt.text = "Score submitted!";
var _local5 = getClip().initials_txt.text;
_root.submitScore(score, _local3, elapsedTime, _local4, _local5);
displayScores();
}
function replay() {
main.lost = false;
var _local2 = SM.playSound("click2");
destroy();
main.levelSelection();
}
function tryAgain() {
var _local2 = SM.playSound("click2");
destroy();
main.__set__difficulty(difficultyToUse);
main.startNewGame(mapToPlay);
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
}
Symbol 1705 MovieClip [__Packages.com.electrotank.comedycentral.reno.screens.WinScreen] Frame 0
class com.electrotank.comedycentral.reno.screens.WinScreen extends MovieClip
{
var Root, main, SM, difficultyToUse, mapToPlay, clip;
function WinScreen (p, m, diffLv, map, pts, time, sm) {
super();
Root = p;
main = m;
main.won = true;
SM = sm;
main.introSnd = SM.playSound("theme", {loops:10000});
difficultyToUse = diffLv;
mapToPlay = map;
var _local3 = p.getNextHighestDepth();
var _local4 = p.attachMovie("WinScreen", "clip" + _local3, _local3);
setClip(_local4);
init(diffLv, map, pts, time);
}
function testing() {
}
function submitScores(difficultyLevel, map, score, elapsedTime) {
var _local4 = SM.playSound("click2");
getClip().submission_txt.text = "Score submitted!";
var _local3 = getClip().initials_txt.text;
_root.submitScore(score, map, elapsedTime, difficultyLevel, _local3);
displayScores();
}
function init(lv, map, pts, time) {
var mapName;
var diffString;
getClip().difficulty_txt.text.selectable = false;
getClip().score_txt.text.selectable = false;
getClip().time_txt.text.selectable = false;
getClip().area_txt.selectable = false;
getClip().time2_txt.selectable = false;
switch (map) {
case 1 :
mapName = "Jailbreak!";
break;
case 2 :
mapName = "Casino Riot!";
break;
case 3 :
mapName = "City Brawl!";
}
switch (lv) {
case 1 :
diffString = "Normal";
break;
case 2 :
diffString = "Hard";
break;
case 3 :
diffString = "Insane";
}
getClip().map_txt.text = mapName;
getClip().score_txt.text = pts;
var _local2 = Math.floor(time / 1000);
var _local3 = Math.floor(_local2 / 60);
var _local4 = _local2 - (60 * _local3);
getClip().time_txt.text = _local3;
getClip().time2_txt.text = _local4;
getClip().difficulty_txt.text = diffString;
getClip().return_btn.owner = this;
getClip().return_btn.onPress = function () {
this.owner.replay();
};
getClip().submit_btn.owner = this;
getClip().submit_btn.onPress = function () {
this.owner.submitScores(diffString, mapName, pts, time);
};
getClip().highscores_btn.owner = this;
getClip().highscores_btn.onPress = function () {
this.owner.displayScores();
};
testing();
}
function displayScores() {
var _local2 = SM.playSound("click2");
main.showHighScoreList();
}
function enterName() {
var _local2 = SM.playSound("click2");
getClip().gotoAndStop(2);
}
function replay() {
main.won = false;
var _local2 = SM.playSound("click2");
destroy();
main.levelSelection();
}
function setClip(mc) {
clip = mc;
}
function getClip() {
return(clip);
}
function destroy() {
getClip().removeMovieClip();
}
}
Symbol 122 MovieClip [tooltip] Frame 1
stop();
Symbol 135 MovieClip Frame 63
stop();
this._parent._parent._parent.owner.doneDying();
Symbol 136 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 63
stop();
this._parent._parent._parent.owner.doneDying();
Symbol 169 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 188 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 63
stop();
this._parent._parent._parent.owner.doneDying();
Symbol 201 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 63
stop();
this._parent._parent._parent.owner.doneDying();
Symbol 233 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 64
stop();
this._parent._parent._parent.owner.doneDying();
Symbol 276 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 1
stop();
Symbol 329 MovieClip Frame 64
stop();
this._parent._parent._parent.owner.doneDying();
Symbol 330 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 31
stop();
this._parent._parent._parent.owner.doneDying();
Symbol 388 MovieClip Frame 1
stop();
Symbol 391 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 409 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 440 MovieClip Frame 1
stop();
Symbol 442 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 448 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 465 MovieClip [badguys_mc] Frame 1
stop();
Symbol 516 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 516 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 519 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 537 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 537 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 538 MovieClip Frame 1
stop();
Symbol 541 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 547 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 547 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 548 MovieClip Frame 1
stop();
Symbol 551 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 557 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 557 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 558 MovieClip Frame 1
stop();
Symbol 561 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 567 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 567 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 568 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 577 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 577 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 578 MovieClip Frame 1
stop();
Symbol 581 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 587 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 587 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 588 MovieClip Frame 1
stop();
Symbol 591 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 597 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 597 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 598 MovieClip Frame 1
stop();
Symbol 601 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 607 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 607 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 608 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 618 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 620 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 648 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 648 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 649 MovieClip Frame 1
stop();
Symbol 651 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 658 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 658 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 659 MovieClip Frame 1
stop();
Symbol 661 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 668 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 668 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 669 MovieClip Frame 1
stop();
Symbol 671 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 678 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 678 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 679 MovieClip Frame 1
stop();
Symbol 681 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 688 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 688 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 689 MovieClip Frame 1
stop();
Symbol 691 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 697 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 697 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 698 MovieClip Frame 1
stop();
Symbol 699 MovieClip Frame 1
stop();
Symbol 713 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 713 MovieClip Frame 16
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 715 MovieClip Frame 4
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 720 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 720 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 721 MovieClip Frame 1
stop();
Symbol 726 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 726 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 727 MovieClip Frame 1
stop();
Symbol 730 MovieClip Frame 4
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 735 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 735 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 736 MovieClip Frame 1
stop();
Symbol 741 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 741 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 742 MovieClip Frame 1
stop();
Symbol 747 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 747 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 748 MovieClip Frame 1
stop();
Symbol 753 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 753 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 754 MovieClip Frame 1
stop();
Symbol 759 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 759 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 760 MovieClip Frame 1
stop();
Symbol 765 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 765 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 766 MovieClip Frame 1
stop();
Symbol 767 MovieClip Frame 1
stop();
Symbol 781 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 781 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 785 MovieClip Frame 10
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 791 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 791 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 792 MovieClip Frame 1
stop();
Symbol 796 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 802 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 802 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 803 MovieClip Frame 1
stop();
Symbol 805 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 811 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 811 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 812 MovieClip Frame 1
stop();
Symbol 814 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 820 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 820 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 821 MovieClip Frame 1
stop();
Symbol 823 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 829 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 829 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 830 MovieClip Frame 1
stop();
Symbol 831 MovieClip Frame 1
stop();
Symbol 838 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 838 MovieClip Frame 16
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 840 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 845 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 845 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 846 MovieClip Frame 1
stop();
Symbol 848 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 857 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 857 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 858 MovieClip Frame 1
stop();
Symbol 860 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 865 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 865 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 866 MovieClip Frame 1
stop();
Symbol 868 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 877 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 877 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 878 MovieClip Frame 1
stop();
Symbol 879 MovieClip Frame 1
stop();
Symbol 885 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 885 MovieClip Frame 30
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 887 MovieClip Frame 4
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 892 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 892 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 893 MovieClip Frame 1
stop();
Symbol 898 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 898 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 899 MovieClip Frame 1
stop();
Symbol 901 MovieClip Frame 4
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 906 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 906 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 907 MovieClip Frame 1
stop();
Symbol 912 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 912 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 913 MovieClip Frame 1
stop();
Symbol 918 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 918 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 919 MovieClip Frame 1
stop();
Symbol 924 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 924 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 925 MovieClip Frame 1
stop();
Symbol 930 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 930 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 931 MovieClip Frame 1
stop();
Symbol 936 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 936 MovieClip Frame 18
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 937 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 1
stop();
Symbol 947 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 947 MovieClip Frame 33
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 949 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 949 MovieClip Frame 3
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 965 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 965 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 966 MovieClip Frame 1
stop();
Symbol 968 MovieClip Frame 1
this._parent._parent._parent.owner.starting();
Symbol 968 MovieClip Frame 3
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 974 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 974 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 975 MovieClip Frame 1
stop();
Symbol 977 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 984 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 984 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 985 MovieClip Frame 1
stop();
Symbol 987 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 993 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 993 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 994 MovieClip Frame 1
stop();
Symbol 996 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 1002 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 1002 MovieClip Frame 20
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 1003 MovieClip Frame 1
stop();
Symbol 1004 MovieClip Frame 1
stop();
Symbol 1014 MovieClip Frame 35
stop();
stop();
this._parent._parent._parent.owner.doneStarting();
Symbol 1016 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 1021 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 1021 MovieClip Frame 12
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 1022 MovieClip Frame 1
stop();
Symbol 1027 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 1027 MovieClip Frame 12
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 1028 MovieClip Frame 1
stop();
Symbol 1030 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 1035 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 1035 MovieClip Frame 12
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 1036 MovieClip Frame 1
stop();
Symbol 1038 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 1043 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 1043 MovieClip Frame 12
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 1044 MovieClip Frame 1
stop();
Symbol 1046 MovieClip Frame 5
stop();
stop();
this._parent._parent._parent.owner.doneIdling();
Symbol 1051 MovieClip Frame 1
this._parent._parent._parent.owner.firing();
Symbol 1051 MovieClip Frame 12
stop();
stop();
this._parent._parent._parent.owner.doneFiring();
Symbol 1052 MovieClip Frame 1
stop();
Symbol 1053 MovieClip Frame 1
stop();
Symbol 1054 MovieClip [towers_mc] Frame 1
stop();
Symbol 1070 MovieClip Frame 18
stop();
this._parent.removeMovieClip();
Symbol 1092 MovieClip Frame 24
stop();
this._parent.removeMovieClip();
Symbol 1120 MovieClip Frame 31
stop();
this._parent.removeMovieClip();
Symbol 1138 MovieClip Frame 21
stop();
this._parent.removeMovieClip();
Symbol 1151 MovieClip Frame 16
stop();
this._parent.removeMovieClip();
Symbol 1175 MovieClip Frame 35
stop();
this._parent.removeMovieClip();
Symbol 1182 MovieClip Frame 30
stop();
this._parent.removeMovieClip();
Symbol 1183 MovieClip Frame 31
stop();
this._parent.removeMovieClip();
Symbol 1184 MovieClip [collision] Frame 1
stop();
Symbol 1246 MovieClip [projectile] Frame 1
stop();
Symbol 1252 MovieClip Frame 1
stop();
Symbol 1258 MovieClip [hpFloat] Frame 30
stop();
removeMovieClip(this);
Symbol 1261 MovieClip [dollarFloat] Frame 30
stop();
removeMovieClip(this);
Symbol 1285 MovieClip Frame 1
holder_mc.loadMovie(_root.adURL);
Symbol 1319 MovieClip Frame 1
stop();
Symbol 1321 MovieClip Frame 4
stop();
Symbol 1323 MovieClip Frame 4
stop();
Symbol 1325 MovieClip Frame 4
stop();
Symbol 1326 MovieClip [mini_instructions] Frame 1
stop();
Symbol 1326 MovieClip [mini_instructions] Frame 2
stop();
Symbol 1326 MovieClip [mini_instructions] Frame 3
stop();
Symbol 1339 MovieClip [announcement] Frame 150
stop();
removeMovieClip(this);
if (main.gs.newGame2) {
removeMovieClip(_level0.main_mc.game_screen.popupContainer.miniInstructions);
main.gs.newGame2 = false;
}
main.gs.advanceLevel();
Symbol 1340 MovieClip [explosion] Frame 39
stop();
removeMovieClip(this);
Symbol 1388 MovieClip [IntroScreen] Frame 26
stop();
shine_mc._visible = false;
Symbol 1428 MovieClip [WinScreen] Frame 1
stop();
Symbol 1442 MovieClip [LoseScreen] Frame 1
stop();
Symbol 1464 MovieClip Frame 1
stop();
this.gotoAndStop(1 + random(_totalframes));
Symbol 1492 MovieClip Frame 1
stop();
Symbol 1494 MovieClip Frame 1
stop();
Symbol 1496 MovieClip Frame 1
stop();
Symbol 1505 MovieClip Frame 1
stop();
Symbol 1507 MovieClip [LevelSelectScreen] Frame 1
stop();