Frame 1
function doLoader() {
ratio = getBytesLoaded() / getBytesTotal();
loader.counter_mc.text = Math.ceil(ratio * 100) + "%";
if (ratio == 1) {
clearInterval(loader_int);
loader.play();
}
}
var ratio;
var FRAMES = 100;
loader_int = setInterval(doLoader, 5);
Frame 5
project.init();
stop();
Symbol 63 MovieClip Frame 95
stop();
Symbol 63 MovieClip Frame 100
_parent.gotoAndStop("game");
stop();
Symbol 681 MovieClip [__Packages.smashing.rampage.BaseEngine] Frame 0
class smashing.rampage.BaseEngine extends MovieClip
{
var __gameStartTime, isPaused, __interval, mouse, key;
function BaseEngine () {
super();
}
function init() {
__gameStartTime = getTimer();
__initInterval();
__initSounds();
__initGameState();
__initUI();
__initViewport();
__initMouse();
__initKey();
isPaused = false;
smashing.rampage.Messenger.registerAddress("engine", this);
}
function __initInterval() {
__interval = new smashing.IntervalEngine(this, "update");
__interval.startFast();
}
function __initSounds() {
}
function __initGameState() {
}
function __initUI() {
}
function __initViewport() {
}
function update(dt) {
}
function pause() {
isPaused = true;
}
function unpause() {
isPaused = false;
}
function onQuit() {
stopAllSounds();
destroy();
}
function destroy() {
__interval.clear();
__clearMouse();
__clearKey();
}
function __initMouse() {
mouse = {};
mouse.owner = this;
Mouse.addListener(mouse);
}
function __clearMouse() {
Mouse.removeListener(mouse);
}
function mouse_up() {
}
function mouse_down() {
}
function __initKey() {
key = {};
key.owner = this;
Key.addListener(key);
}
function __clearKey() {
Key.removeListener(key);
}
function key_down() {
}
function key_up() {
}
function onMessageReceived(message, args) {
this[message](args);
}
}
Symbol 682 MovieClip [__Packages.smashing.IntervalEngine] Frame 0
class smashing.IntervalEngine
{
var _uo, _uf, _update_interval, _last_update, _i, _ft, _el;
function IntervalEngine (update_object, update_function) {
_uo = update_object;
_uf = update_function;
}
function startFlat(FPS) {
_FPS = FPS;
_update_interval = 1 / FPS;
_last_update = getTimer() * 0.001;
_i = setInterval(this, "_flat_step", 0);
}
function startFlex() {
_last_update = getTimer() * 0.001;
_i = setInterval(this, "_flex_step", 0);
}
function startFast() {
_last_update = getTimer();
_i = setInterval(this, "_fast_step", 10);
}
function reset(Void) {
if (_i != undefined) {
clearInterval(_i);
}
_ft = 0;
_last_update = getTimer() * 0.001;
_lel = _MAX_FRAMETIME / 2;
}
function _flex_step(Void) {
_el = Math.min(_MAX_FRAMETIME, (-_last_update) + ((_last_update = getTimer() * 0.001)));
_lel = _lel - Math.max(-_MAX_TIMEDIFF, Math.min(_MAX_TIMEDIFF, _lel - _el));
_uo[_uf](_lel);
}
function _flat_step(Void) {
_ft = _ft + ((-_last_update) + ((_last_update = getTimer() * 0.001)));
if (_ft < _update_interval) {
return(undefined);
}
_uo[_uf](_ft);
_ft = 0;
}
function _fast_step(Void) {
_el = (-_last_update) + ((_last_update = getTimer()));
_uo[_uf](_el * 0.001);
}
function clear() {
clearInterval(_i);
}
var _MAX_TIMEDIFF = 0.005;
var _MIN_FPS = 5;
var _MAX_FRAMETIME = 1 / smashing.IntervalEngine.prototype._MIN_FPS;
var _lel = 0.2;
var _FPS = 0;
}
Symbol 683 MovieClip [__Packages.smashing.rampage.Messenger] Frame 0
class smashing.rampage.Messenger
{
static var __addresses;
function Messenger () {
}
static function registerAddress(id, obj) {
if (__addresses == undefined) {
__addresses = {};
}
__addresses[id] = obj;
}
static function removeAddress(id) {
__addresses[id] = "";
}
static function sendMessage(id, message, args) {
if ((__addresses[id] != "") && (__addresses[id] != undefined)) {
__addresses[id].onMessageReceived(message, args);
return(undefined);
}
trace("[Messenger] Error locating message recipient " + id);
}
}
Symbol 684 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.Engine] Frame 0
class cartoonnetwork.reanimated.picklebomb.Engine extends smashing.rampage.BaseEngine
{
var activeWorld, pause, __sounds, __state, viewport_mc, isPaused, __screen, __isGameActive, unpause, __interval, __screenshotData, screenshot_mc, gotoAndStop, screen_mc, popup_mc, countdown_mc, mouse, key, __gameStartTime;
function Engine () {
super();
}
function init() {
super.init();
activeWorld = new cartoonnetwork.reanimated.picklebomb.World();
activeWorld.init(this);
pause();
__sounds.playMusic("music");
goScreen("splash");
__state.resetCheats();
}
function __initSounds() {
cartoonnetwork.reanimated.picklebomb.Sounds.init();
__sounds = cartoonnetwork.reanimated.picklebomb.Sounds.getInstance();
__sounds.generateSounds(viewport_mc);
}
function __initGameState() {
cartoonnetwork.reanimated.picklebomb.GameState.init();
__state = cartoonnetwork.reanimated.picklebomb.GameState.getInstance();
}
function __initUI() {
}
function __initViewport() {
smashing.rampage.viewport.Viewport.init(viewport_mc, 2, cartoonnetwork.reanimated.picklebomb.GameState.getInstance());
var _local2 = smashing.rampage.viewport.Viewport.getInstance();
_local2.setScrollport(1);
_local2.createGroup({id:"bg", index:0, slots:10});
_local2.createGroup({id:"grass", index:1, slots:500});
_local2.createGroup({id:"ui", index:2, slots:5});
_local2.createGroup({id:"entity", index:3, slots:5000, sortAxis:"y"});
_local2.createGroup({id:"player", index:4, slots:50});
_local2.createGroup({id:"effect", index:5, slots:50});
_local2.initGroups();
cartoonnetwork.reanimated.picklebomb.GameCamera.init();
}
function update(dt) {
if (!isPaused) {
activeWorld.update(dt);
}
if (__screen == "gameplay") {
activeWorld.updateGameplayHUD(false);
}
updateAfterEvent();
}
function startGame() {
__state.resetGame();
startLevel();
__isGameActive = true;
CNGameTracker();
__sounds.playMusic("music");
}
function startLevel() {
goScreen("gameplay");
smashing.rampage.viewport.Viewport.getInstance().newView();
activeWorld.generate(__state.levelNum);
activeWorld.start();
unpause();
}
function endLevel() {
pause();
if (__state.relativeScore >= 0) {
__state.nextLevel();
activeWorld.playerWinAnimation();
activeWorld.win();
} else {
activeWorld.lose();
__sounds.stopMusic();
}
}
function nextLevel() {
activeWorld.explodeAllBombs();
unpause();
}
function clear() {
activeWorld.clear();
smashing.rampage.viewport.Viewport.getInstance().newView();
}
function destroy() {
__interval.clear();
__clearMouse();
__clearKey();
}
function showScreenshot() {
__screenshotData = new flash.display.BitmapData(600, 400);
screenshot_mc.createEmptyMovieClip("bitmap", 1);
screenshot_mc.bitmap.attachBitmap(__screenshotData, 1);
__screenshotData.draw(viewport_mc);
viewport_mc._visible = false;
}
function hideScreenshot() {
__screenshotData.dispose();
screenshot_mc.bitmap.removeMovieClip();
viewport_mc._visible = true;
}
function CNGameTracker() {
var _local1 = new Date().getTime();
loadMovieNum ("tracker.swf?" + _local1, 10000);
}
function onPressHelp() {
if (__screen != "gameplay") {
return(undefined);
}
goScreen("help");
activeWorld.hideAllObjects();
}
function onPressPlayAgain() {
checkForCheats();
startGame();
}
function onPressToggleMusic() {
if (__screen != "gameplay") {
return(undefined);
}
if (__sounds.muteMusic) {
__sounds.muteMusic = false;
__sounds.playMusic("music");
} else {
__sounds.muteMusic = true;
__sounds.stopMusic();
}
}
function goScreen(pFrame) {
__screen = pFrame;
gotoAndStop(__screen);
switch (__screen) {
case "splash" :
__isGameActive = false;
break;
case "help" :
pause();
if (__isGameActive) {
screen_mc.gotoAndPlay("intro");
}
break;
case "gameplay" :
hideScreenshot();
updateGameplayHUD(true);
activeWorld.showAllObjects();
if (!__isGameActive) {
screen_mc.gotoAndPlay("intro");
}
break;
case "end" :
pause();
__isGameActive = false;
screen_mc.anim_mc.score_mc.filter_mc.txt_score.text = __state.score;
screen_mc.anim_mc.score_mc.shadow_mc.txt_score.text = __state.score;
}
}
function onScreenOutroComplete() {
switch (__screen) {
case "splash" :
goScreen("help");
break;
case "help" :
if (__isGameActive) {
goScreen("gameplay");
unpause();
} else {
startGame();
}
break;
case "gameplay" :
goScreen("end");
break;
case "end" :
startGame();
}
}
function onWinAnimComplete() {
nextLevel();
}
function playPopup() {
pause();
if (__state.levelNum < 5) {
popup_mc.gotoAndPlay("in");
} else {
onpopupOut();
}
}
function onpopupUp() {
if (__state.levelNum < 5) {
popup_mc.contents_mc.gotoAndPlay(__state.levelNum - 1);
}
}
function onpopupOut() {
trace("onpopupOut called");
unpause();
popup_mc.gotoAndStop(1);
}
function updateGameplayHUD(pForceUpdate) {
if (__state.hasChanged || (pForceUpdate == true)) {
screen_mc.score_mc.filter_mc.scoretext_mc.txt_score.text = __state.score;
screen_mc.score_mc.shadow_mc.scoretext_mc.txt_score.text = __state.score;
screen_mc.round_mc.filter_mc.roundtext_mc.txt_round.text = __state.levelNum;
screen_mc.round_mc.shadow_mc.roundtext_mc.txt_round.text = __state.levelNum;
__state.hasChanged = false;
}
screen_mc.timer_mc.gotoAndStop(Math.ceil((1 - activeWorld.getPercentTimeRemaining()) * 240) + 1);
}
function startCountDown() {
pause();
countdown_mc.gotoAndPlay("count");
}
function countDownComplete() {
unpause();
}
function __initMouse() {
mouse = {};
mouse.owner = this;
mouse.onMouseUp = function () {
this.owner.mouse_up();
};
mouse.onMouseDown = function () {
this.owner.mouse_down();
};
Mouse.addListener(mouse);
}
function __clearMouse() {
Mouse.removeListener(mouse);
}
function mouse_up() {
if (!isPaused) {
activeWorld.onMouseUp();
}
}
function mouse_down() {
if (!isPaused) {
activeWorld.onMouseDown();
}
}
function __initKey() {
key = {};
key.owner = this;
key.onKeyDown = function () {
this.owner.key_down();
};
Key.addListener(key);
}
function __clearKey() {
Key.removeListener(key);
}
function key_down() {
if (Key.getCode() == 32) {
}
}
function checkForCheats() {
if (Key.isDown(17) == true) {
__state.speedy = true;
} else {
__state.speedy = false;
}
if (Key.isDown(16) == true) {
__state.quickStart = true;
} else {
__state.quickStart = false;
}
if (Key.isDown(32) == true) {
__state.shortRounds = true;
} else {
__state.shortRounds = false;
}
trace("checkForCheats()");
trace((__state.speedy + ", ") + __state.quickStart);
}
function key_up() {
if (Key.getCode(32)) {
}
}
function get gameStartTime() {
return(__gameStartTime);
}
function isMusicMuted() {
return(__sounds.muteMusic);
}
var __STARTLEVEL = 0;
}
Symbol 685 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.World] Frame 0
class cartoonnetwork.reanimated.picklebomb.World
{
var engine, __state, __randomBombSpawn, __introPlaying, __introTime, __bombCount, __bombsSploding, __roundPlaying, __time, __pickles, __entitys, __projectiles, __effects, __pickups, __player, __enemy, loop, __roundCounter, __picklesLose, __picklesWin, __cursor, __scoreboard, __butterfly, __camera;
function World (t_engine) {
}
function init(t_engine) {
engine = t_engine;
__state = cartoonnetwork.reanimated.picklebomb.GameState.getInstance();
__randomBombSpawn = __DEFAULT_BOMB_SPAWN;
smashing.rampage.Messenger.registerAddress("world", this);
__introPlaying = false;
__introTime = 0;
__bombCount = 0;
__bombsSploding = 0;
__roundPlaying = 0;
}
function start() {
if (cartoonnetwork.reanimated.picklebomb.GameState.getInstance().shortRounds == true) {
__time = 20;
} else {
__time = __TIME_TOTAL;
}
__pickles.playPickles();
__introPlaying = true;
__introTime = 3.8;
__randomBombSpawn = __DEFAULT_BOMB_SPAWN;
}
function clear() {
var _local2 = __entitys.length;
while (_local2--) {
__entitys[_local2].requestErase();
}
__bombCount = 0;
__entitys = [];
__projectiles = [];
__effects = [];
__pickups = [];
}
function emptyWorld() {
clear();
__player.requestErase();
__enemy.requestErase();
}
function onMouseDown() {
if (__player.bombType != 0) {
__player.startThrowing();
return(undefined);
}
var _local2;
loop = __entitys.length;
while (loop--) {
_local2 = __entitys[loop];
if (_local2.inFlight == false) {
if (_local2.runHD(__player, 0) == true) {
if ((((_local2.bombType != undefined) && (__player.bombType == 0)) && (__player.isStunned() == false)) && (_local2.hasExploded == false)) {
_local2.pickedUp();
__bombCount--;
__player.pickUp({val:_local2.bombType, desc:_local2.bombDesc, timer:_local2.bombTimer});
return(undefined);
}
}
}
}
}
function onMouseUp() {
}
function __updatePlayerMovement() {
var _local3 = 0;
var _local2 = 0;
if (Key.isDown(39)) {
_local3 = _local3 + 1;
}
if (Key.isDown(37)) {
_local3 = _local3 - 1;
}
if (Key.isDown(38)) {
_local2 = _local2 - 1;
}
if (Key.isDown(40)) {
_local2 = _local2 + 1;
}
__player.setVelocity(_local3, _local2);
}
function update(dt) {
if (dt > 0.2) {
dt = 0.2;
}
var _local2;
if (__bombsSploding > 0) {
__bombsSploding = __bombsSploding - dt;
if (__bombsSploding <= 0) {
clear();
__roundCounter.mc.levelNum = __state.levelNum;
__roundCounter.mc.gotoAndPlay(2);
__roundPlaying = 1.7;
}
return(undefined);
}
if (__roundPlaying > 0) {
__roundPlaying = __roundPlaying - dt;
if (__roundPlaying <= 0) {
generateNextLevel();
}
return(undefined);
}
if (__introPlaying == true) {
__introTime = __introTime - dt;
if ((__introTime <= 3.8) && (__pickles.isPlaying == false)) {
__pickles.playPickles();
}
if (__pickles.isPicklesDone() == true) {
loop = __entitys.length;
while (loop--) {
_local2 = __entitys[loop];
if (_local2.doUpdate) {
_local2.updateAndRender(dt);
if (_local2.doRemove) {
__entitys.splice(loop, 1);
}
}
}
if (__introTime <= 0) {
__introPlaying = false;
engine.pause();
engine.startCountDown();
}
}
return(undefined);
}
loop = __entitys.length;
while (loop--) {
_local2 = __entitys[loop];
if (_local2.doUpdate) {
_local2.updateAndRender(dt);
if (_local2.inFlight == false) {
if (_local2.runHD(__enemy, dt) == true) {
if ((((_local2.bombType != undefined) && (__enemy.bombType == 0)) && (__enemy.isStunned() == false)) && (_local2.hasExploded == false)) {
_local2.pickedUp();
__bombCount--;
__enemy.pickUp({val:_local2.bombType, desc:_local2.bombDesc, timer:_local2.bombTimer});
}
}
}
if (_local2.doRemove) {
__entitys.splice(loop, 1);
}
}
}
__updatePlayerMovement();
__time = __time - dt;
if (__time < 0) {
smashing.rampage.Messenger.sendMessage("engine", "endLevel");
return(undefined);
}
if (__time < 15) {
cartoonnetwork.reanimated.picklebomb.Sounds.getInstance().playMusic("music_fast");
}
__randomBombSpawn = __randomBombSpawn - dt;
if (__randomBombSpawn < 0) {
if (__bombCount < 15) {
__pickles.playPickles();
__introTime = 2.5;
__randomBombSpawn = __DEFAULT_BOMB_SPAWN;
}
}
if ((__bombCount < 3) && (__introTime <= 0)) {
__pickles.playPickles();
__introTime = 2.5;
__randomBombSpawn = __DEFAULT_BOMB_SPAWN;
}
if (__introTime > 0) {
__introTime = __introTime - dt;
if (__introTime <= 0) {
trace("new bombs spawning");
generateInitialBombs(2);
__introTime == 0;
}
}
__player.updateAndRender(dt);
__pickles.updateAndRender(dt);
__picklesLose.updateAndRender(dt);
__picklesWin.updateAndRender(dt);
if (__state.quickStart == false) {
__enemy.updateAndRender(dt, __entitys, __state.levelNum);
} else {
__enemy.updateAndRender(dt, __entitys, 10);
}
__cursor.updateAndRender(dt, __player);
__scoreboard.updateAndRender(dt, __player);
__butterfly.updateAndRender(dt);
}
function generate(pLevelNum) {
clear();
__camera = cartoonnetwork.reanimated.picklebomb.GameCamera.getInstance();
__camera.generate({x:__state.HALF_WIDTH, y:__state.HALF_HEIGHT});
__player = new cartoonnetwork.reanimated.picklebomb.ents.Player({y:200, x:0, owner:this});
__player.render();
__enemy = new cartoonnetwork.reanimated.picklebomb.ents.Enemy({y:200, x:550, owner:this});
__enemy.render();
__cursor = new cartoonnetwork.reanimated.picklebomb.ents.Cursor({y:-100, x:-100, owner:this});
__cursor.render();
__scoreboard = new cartoonnetwork.reanimated.picklebomb.ents.Scoreboard({owner:this});
__scoreboard.render();
__butterfly = new cartoonnetwork.reanimated.picklebomb.ents.Butterfly({x:350, y:320, owner:this});
__butterfly.render();
__pickles = new cartoonnetwork.reanimated.picklebomb.ents.Pickles({x:285, y:151, owner:this});
__pickles.render();
__picklesWin = new cartoonnetwork.reanimated.picklebomb.ents.PicklesWin({x:0, y:0, owner:this});
__picklesWin.render();
__picklesLose = new cartoonnetwork.reanimated.picklebomb.ents.PicklesLose({x:0, y:0, owner:this});
__picklesLose.render();
__roundCounter = new cartoonnetwork.reanimated.picklebomb.ents.RoundCounter({x:0, y:100, owner:this});
__roundCounter.render();
__entitys = [];
generateInitialBombs(10);
}
function explodeAllBombs() {
var _local2 = __entitys.length;
while (_local2--) {
__entitys[_local2].mc.bomb.gotoAndStop("splode");
}
__bombsSploding = 1.5;
}
function generateNextLevel(pLevelNum) {
if (cartoonnetwork.reanimated.picklebomb.GameState.getInstance().shortRounds == true) {
__time = 20;
} else {
__time = __TIME_TOTAL;
}
engine.playPopup();
__introPlaying = true;
if (__state.levelNum < 5) {
__introTime = 5;
} else {
__introTime = 3.8;
}
clear();
__player.bombType = 0;
__enemy.bombType = 0;
__player.idle();
__enemy.idle();
__state.relativeScore = 0;
__randomBombSpawn = __DEFAULT_BOMB_SPAWN;
generateInitialBombs(10);
cartoonnetwork.reanimated.picklebomb.Sounds.getInstance().playMusic("music");
}
function generateInitialBombs(bombCount) {
trace("generateInitialBombs() called");
var _local6 = bombCount;
var _local7 = 1;
var _local8;
var _local4 = [];
var _local3 = [1, 1, 1, 1, 1, 1, 1];
if (__state.quickStart == false) {
if ((__state.levelNum >= 2) && (__state.levelNum < 5)) {
_local3.push(__state.levelNum);
} else if (__state.levelNum >= 5) {
_local3.push(2);
_local3.push(3);
_local3.push(4);
}
} else {
_local3.push(2);
_local3.push(3);
_local3.push(4);
}
while (_local6--) {
_local7 = _local3[random(_local3.length)];
_local8 = spawnBomb((300 - ((bombCount - 1) / 2)) + _local6, -200, 0, 0, _local7, 0);
_local4.push(_local8);
}
var _local5 = _local4.length;
var _local2;
while (_local5--) {
_local2 = _local4[_local5];
if (_local2.x <= 300) {
_local2.dropMe((Math.random() * 270) + 20, (Math.random() * 330) + 50);
} else if (_local2.x > 300) {
_local2.dropMe(500 - (Math.random() * 150), (Math.random() * 330) + 50);
}
}
}
function showCursor() {
__cursor.show();
}
function hideCursor() {
__cursor.hide();
}
function hideAllObjects() {
__enemy.mc._visible = false;
__cursor.mc._visible = false;
__player.mc._visible = false;
var _local2 = __entitys.length;
while (_local2--) {
__entitys[_local2].mc._visible = false;
}
}
function showAllObjects() {
__enemy.mc._visible = true;
__cursor.mc._visible = true;
__player.mc._visible = true;
var _local2 = __entitys.length;
while (_local2--) {
__entitys[_local2].mc._visible = true;
}
}
function spawnBomb(x, y, xDir, yDir, bombType, bombTimer) {
var _local2;
__bombCount++;
switch (bombType) {
case 1 :
_local2 = new cartoonnetwork.reanimated.picklebomb.ents.Bombs.Stinker({x:x, y:y, owner:this, type:bombType, timer:bombTimer});
break;
case 2 :
_local2 = new cartoonnetwork.reanimated.picklebomb.ents.Bombs.Flower({x:x, y:y, owner:this, type:bombType, timer:bombTimer});
break;
case 3 :
_local2 = new cartoonnetwork.reanimated.picklebomb.ents.Bombs.Scrambler({x:x, y:y, owner:this, type:bombType, timer:bombTimer});
break;
case 4 :
_local2 = new cartoonnetwork.reanimated.picklebomb.ents.Bombs.Splitter({x:x, y:y, owner:this, type:bombType, timer:bombTimer});
break;
default :
_local2 = new cartoonnetwork.reanimated.picklebomb.ents.Bombs.Stinker({x:x, y:y, owner:this, type:bombType, timer:bombTimer});
}
_local2.updateAndRender(0);
__entitys.push(_local2);
if ((xDir != 0) || (yDir != 0)) {
_local2.throwMe(xDir, yDir, 0);
}
return(_local2);
}
function explosion(x, y) {
trace("explosion called");
__bombCount--;
var _local4 = new cartoonnetwork.reanimated.picklebomb.ents.Stink({x:x, y:y});
if (x < 300) {
__state.relativeScore--;
__state.addScore(100);
} else {
__state.relativeScore++;
}
if (__enemy.mc.hitTest(x, y)) {
__enemy.hitAndStun();
}
if (__player.mc.hitTest(x, y)) {
__player.hitAndStun();
}
__entitys.push(_local4);
}
function repair(x, y) {
var _local6 = __entitys.length;
var _local2;
__bombCount--;
while (_local6--) {
_local2 = __entitys[_local6];
if (_local2.TYPE == "stink") {
var _local4 = Math.pow(_local2.x - x, 2);
var _local5 = Math.pow(_local2.y - y, 2);
var _local3 = Math.sqrt(_local4 + _local5);
if (_local3 <= __REPAIR_BOMB_RADIUS) {
if (_local2.x < 300) {
__state.relativeScore++;
__state.addScore(100);
} else {
__state.relativeScore--;
}
_local2.requestErase();
}
}
}
}
function randomizeBombs(x) {
var _local3 = __entitys.length;
var _local2;
__bombCount--;
if (x > 300) {
__state.addScore(200);
}
while (_local3--) {
_local2 = __entitys[_local3];
if ((((_local2.TYPE == "bomb") && (_local2.hasExploded == false)) && (_local2.inFlight == false)) && (_local2.y >= 0)) {
if (x < 300) {
if (_local2.x < 300) {
if ((_local2.bombTimer < 8) && (_local2.bombTimer != 0)) {
_local2.throwMe(Math.random() * 300, (Math.random() * 330) + 50, 0);
} else {
_local2.dropMe(Math.random() * 300, (Math.random() * 330) + 50);
}
}
} else if (_local2.x >= 300) {
if (_local2.bombTimer > 0) {
_local2.throwMe(580 - (Math.random() * 279), (Math.random() * 330) + 50, 0);
} else {
_local2.dropMe(Math.random() * 300, (Math.random() * 330) + 50);
}
}
}
}
}
function splitterExplosion(x, y) {
trace("spawning splitter bombs");
__bombCount--;
if (x > 300) {
__state.addScore(100);
}
spawnBomb(x, y, x - 10, y, 1, 8);
spawnBomb(x, y, x + 10, y, 1, 8);
}
function playerWinAnimation() {
__player.mc.gotoAndStop("win");
}
function enemyWinAnimation() {
__enemy.animateLoop("win");
}
function win() {
__scoreboard.mc.gotoAndStop("win");
__picklesWin.playPickles();
cartoonnetwork.reanimated.picklebomb.Sounds.getInstance().stopMusic();
__enemy.idle();
__cursor.hide();
}
function lose() {
__picklesLose.playPickles();
__scoreboard.mc.gotoAndStop("lose");
__cursor.hide();
enemyWinAnimation();
}
function updateGameplayHUD() {
__scoreboard.mc.score_mc.filter_mc.scoretext_mc.txt_score.text = __state.score;
__scoreboard.mc.score_mc.shadow_mc.scoretext_mc.txt_score.text = __state.score;
__scoreboard.mc.round_mc.filter_mc.roundtext_mc.txt_round.text = __state.levelNum;
__scoreboard.mc.round_mc.shadow_mc.roundtext_mc.txt_round.text = __state.levelNum;
__roundCounter.mc.levelNum = __state.levelNum;
__state.hasChanged = false;
__scoreboard.mc.timer_mc.gotoAndStop(Math.ceil((1 - getPercentTimeRemaining()) * 220) + 1);
}
function getPercentTimeRemaining() {
if (cartoonnetwork.reanimated.picklebomb.GameState.getInstance().shortRounds == true) {
return(__time / 20);
}
return(__time / __TIME_TOTAL);
}
function getPlayer() {
return(__player);
}
function get camera() {
return(__camera);
}
function onMessageReceived(message, args) {
this[message](args);
}
var __TIME_TOTAL = 60;
var __DEFAULT_BOMB_SPAWN = 10;
var __REPAIR_BOMB_RADIUS = 30;
}
Symbol 686 MovieClip [__Packages.smashing.rampage.BaseCamera] Frame 0
class smashing.rampage.BaseCamera
{
static var __instance;
var __gameState, x, y, z, fl, farClip, __bound_left, __bound_right, __bound_top, __bound_bottom, left, right, top, bottom;
function BaseCamera (t_data) {
}
static function init(t_path, t_depth, dimensions) {
__instance = new smashing.rampage.BaseCamera(t_path, t_depth, dimensions);
}
static function getInstance() {
return(__instance);
}
function generate(t_data) {
__gameState = getGameState();
x = (y = (z = 0));
if (t_data.x != undefined) {
x = t_data.x;
}
if (t_data.y != undefined) {
y = t_data.y;
}
if (t_data.z != undefined) {
z = t_data.z;
}
fl = __FL_DEF;
farClip = __DEF_CLIP;
refreshEdges();
}
function getGameState() {
return(new Object());
}
function update(dt) {
}
function setBounds(left, right, top, bottom) {
__bound_left = left + __gameState.HALF_WIDTH;
__bound_right = right - __gameState.HALF_WIDTH;
__bound_top = top + __gameState.HALF_HEIGHT;
__bound_bottom = bottom - __gameState.HALF_HEIGHT;
}
function enforceBounds() {
if (x < __bound_left) {
x = __bound_left;
} else if (x > __bound_right) {
x = __bound_right;
}
if (y < __bound_top) {
y = __bound_top;
} else if (y > __bound_bottom) {
y = __bound_bottom;
}
}
function refreshEdges() {
left = x - __gameState.HALF_WIDTH;
right = x + __gameState.HALF_WIDTH;
top = y - __gameState.HALF_HEIGHT;
bottom = y + __gameState.HALF_HEIGHT;
}
function get sc() {
return(__gameState.sc);
}
function screenWidth() {
return(__gameState.SCREEN_WIDTH);
}
function screenHeight() {
return(__gameState.SCREEN_WIDTH);
}
function halfWidth() {
return(__gameState.HALF_WIDTH);
}
function halfHeight() {
return(__gameState.HALF_HEIGHT);
}
function toString() {
return((((("Camera : focus : " + x) + " , ") + y) + " , ") + z);
}
var __DEF_CLIP = 100000;
var __FL_DEF = 1000;
var __EDGE_PADDING = 50;
}
Symbol 687 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.GameCamera] Frame 0
class cartoonnetwork.reanimated.picklebomb.GameCamera extends smashing.rampage.BaseCamera
{
static var __instance;
var x, y, __bound_top, __bound_bottom;
function GameCamera () {
super();
}
static function init(t_path, t_depth, dimensions) {
__instance = new cartoonnetwork.reanimated.picklebomb.GameCamera(t_path, t_depth, dimensions);
}
static function getInstance() {
return(__instance);
}
function getGameState() {
return(cartoonnetwork.reanimated.picklebomb.GameState.getInstance());
}
function update(dt, player) {
var _local3 = player.nextX - x;
var _local2 = player.nextY - y;
if (_local2 > __SCROLL_TETHER_V) {
y = y + (__SCROLL_RATE * dt);
} else if (_local2 < (-__SCROLL_TETHER_V)) {
y = y - (__SCROLL_RATE * dt);
}
if (y < __bound_top) {
y = __bound_top;
} else if (y > __bound_bottom) {
y = __bound_bottom;
}
}
var __ENFORCE_BOUNDS = true;
var __SCROLL_TETHER_V = 25;
var __SCROLL_RATE = 180;
}
Symbol 688 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.GameState] Frame 0
class cartoonnetwork.reanimated.picklebomb.GameState
{
static var __instance;
var levelNum, score, relativeScore, hasChanged, speedy, quickStart, shortRounds;
function GameState () {
}
static function init() {
__instance = new cartoonnetwork.reanimated.picklebomb.GameState();
}
static function getInstance() {
return(__instance);
}
function resetGame() {
levelNum = 1;
score = 0;
relativeScore = 0;
hasChanged = true;
}
function resetCheats() {
speedy = false;
quickStart = false;
shortRounds = false;
}
function nextLevel() {
levelNum++;
hasChanged = true;
}
function addScore(val) {
score = score + val;
hasChanged = true;
}
var SCREEN_WIDTH = Stage.width;
var SCREEN_HEIGHT = Stage.height;
var HALF_WIDTH = Stage.width / 2;
var HALF_HEIGHT = Stage.height / 2;
var sc = {x:Stage.width / 2, y:Stage.height / 2};
}
Symbol 689 MovieClip [__Packages.smashing.rampage.Renderable] Frame 0
class smashing.rampage.Renderable
{
var mc, baseWidth, baseHeight, hdWidth, hdHeight, radius, assetID, startX, startY, startZ, __camera, x, y, z, depthInfluence, flipH, doUpdate, threedScale, __onscreen, isDrawn, isAlive, isHidden, scale, startScale, hdReg;
function Renderable (t_data) {
mc = null;
baseWidth = __DEF_WIDTH;
baseHeight = __DEF_HEIGHT;
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
} else {
hdWidth = __DEF_HD_WIDTH / 2;
hdHeight = __DEF_HD_HEIGHT / 2;
radius = hdWidth;
}
setHDRegistration();
init(t_data);
}
function init(t_data) {
if (t_data.asset == undefined) {
t_data.asset = __DEF_ASSET;
}
assetID = t_data.asset;
if (t_data.x == undefined) {
t_data.x = 0;
}
startX = t_data.x;
if (t_data.y == undefined) {
t_data.y = 0;
}
startY = t_data.y;
if (t_data.z == undefined) {
t_data.z = __DEF_Z;
}
startZ = t_data.z;
if (__camera != undefined) {
initScale();
}
x = startX;
y = startY;
z = startZ;
if (t_data.depthInfluence == undefined) {
t_data.depthInfluence = 0;
}
depthInfluence = t_data.depthInfluence;
if (t_data.flip != undefined) {
flip();
} else {
flipH = false;
}
doUpdate = __DO_UPDATE;
threedScale = __3D_SCALE;
__onscreen = false;
if (((mc == undefined) || (mc == null)) || (mc == "")) {
isDrawn = false;
}
isAlive = true;
isHidden = false;
}
function linkCamera(cam) {
__camera = cam;
if (startZ != undefined) {
initScale();
}
}
function onDraw(t_newmc) {
isDrawn = true;
mc = t_newmc;
if (isHidden) {
mc._visible = false;
}
if (__USE_ACTUAL_DIMENSIONS) {
baseWidth = mc._width;
baseHeight = mc._height;
setHDRegistration();
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
}
}
if (flipH) {
mc._xscale = -100;
}
mc._x = -1000 - baseWidth;
mc._y = -1000 - baseHeight;
}
function update(dt) {
}
function updateAndRender(dt) {
}
function render(dt) {
updateDraw();
if (!isDrawn) {
return(undefined);
}
if (threedScale) {
if (z < __camera.z) {
return(undefined);
}
var _local2 = __camera.fl / (z - __camera.z);
if (scale != _local2) {
scale = _local2;
mc._xscale = (mc._yscale = 100 * (1 + (scale - startScale)));
if (flipH) {
mc._xscale = mc._xscale * -1;
}
}
}
mc._x = ((x - __camera.x) * scale) + __camera.__get__sc().x;
mc._y = ((y - __camera.y) * scale) + __camera.__get__sc().y;
}
function renderDirect(camera) {
mc._x = x;
mc._y = y;
}
function initScale() {
startScale = (scale = __camera.fl / (startZ - __camera.z));
}
function updateDraw() {
__onscreen = false;
if (CUSTOMDRAW) {
__onscreen = true;
} else if (z >= __camera.z) {
if (((Math.abs((x - __camera.x) * scale) < (__camera.__get__sc().x + baseWidth)) && (Math.abs((y - __camera.y) * scale) < (__camera.__get__sc().y + baseHeight))) && ((z - __camera.z) < __camera.farClip)) {
__onscreen = true;
}
}
if ((!isDrawn) && (__onscreen)) {
smashing.rampage.viewport.Viewport.getInstance().draw({element:this});
} else if (isDrawn && (!__onscreen)) {
requestErase();
}
}
function onErase(t_viewport) {
isDrawn = false;
mc = null;
}
function requestErase() {
smashing.rampage.viewport.Viewport.getInstance().erase({element:this});
}
function requestDepthSort() {
smashing.rampage.viewport.Viewport.getInstance().requestGroupDepthSort(getDrawType());
}
function requestDepthChange() {
smashing.rampage.viewport.Viewport.getInstance().requestDepthChange(this);
}
function deleteMe() {
}
function kill() {
isAlive = false;
}
function hide() {
if (isDrawn) {
mc._visible = false;
}
isHidden = true;
}
function show() {
if (isDrawn) {
mc._visible = true;
}
isHidden = false;
}
function flip() {
flipH = true;
if (isDrawn) {
mc._xscale = -100;
}
}
function unflip() {
flipH = false;
if (isDrawn) {
mc._xscale = 100;
}
}
function toggleFlip() {
if (flipH) {
unflip();
} else {
flip();
}
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
function runHD_entity_radius(t_target, dt) {
var _local4 = (x + hdReg.x) - (t_target.x + t_target.hdReg.x);
var _local3 = (y + hdReg.y) - (t_target.y + t_target.hdReg.y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= (t_target.radius + radius)) {
return(true);
}
return(false);
}
function runHD_entity_box(t_target, dt) {
if (Math.abs((x + hdReg.x) - (t_target.x + t_target.hdReg.x)) < (hdWidth + t_target.hdWidth)) {
if (Math.abs((y + hdReg.y) - (t_target.y + t_target.hdReg.y)) < (hdHeight + t_target.hdHeight)) {
return(true);
}
}
return(false);
}
function runHD_entity_3D(t_target, dt) {
var _local3 = z - t_target.z;
var _local2 = (z + radius) - t_target.z;
if ((_local3 * _local2) <= 0) {
return(runHD_entity_radius(t_target, dt));
}
return(false);
}
function runHD_line_sphere(t_lineStart, t_lineEnd, dt) {
var _local4 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local3 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local6 = _local4.x - _local3.x;
var _local7 = _local4.y - _local3.y;
var _local2 = getLineSeperation(_local3, {x:x, y:y}, _local6, _local7);
var _local5;
if (_local2.distance <= radius) {
_local5 = new smashing.Point3D(x + _local2.xSeparation, y + _local2.ySeparation);
return(true);
}
_local5.x = (_local5.y = 0);
return(false);
}
function runHD_line_sphere_complex(t_lineStart, t_lineEnd, dt) {
var _local5 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local7 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local8;
var _local16 = getDistBetween(_local5, {x:x, y:y});
var _local15 = getDistBetween(_local7, {x:x, y:y});
var _local11 = getDistBetween(_local5, _local7);
var _local4 = new smashing.Point3D(_local5.x, _local5.y);
var _local9 = new smashing.Point3D(_local7.x, _local7.y);
var _local12 = _local9.x - _local4.x;
var _local13 = _local9.y - _local4.y;
var _local3 = _local12 / _local11;
var _local2 = _local13 / _local11;
var _local10;
_local4.subtractScalarMe(_local3 * radius, _local2 * radius);
_local9.addScalarMe(_local3 * radius, _local2 * radius);
var _local6 = getLineSeperation(_local5, {x:x, y:y}, _local12, _local13);
_local12 = _local9.x - _local4.x;
_local13 = _local9.y - _local4.y;
var _local14 = getLineSeperation(_local4, {x:x, y:y}, _local12, _local13);
if (_local6.distance <= radius) {
if (_local15 > _local11) {
_local8 = Math.sqrt((radius * radius) - (_local14.distance * _local14.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local14.xSeparation) + _local3;
_local10 = (y + _local14.ySeparation) + _local2;
} else {
_local8 = Math.sqrt((radius * radius) - (_local6.distance * _local6.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local6.xSeparation) + _local3;
_local10 = (y + _local6.ySeparation) + _local2;
if (getDistBetween(_local5, _local10) >= _local11) {
_local10.copy(_local7);
}
}
return(true);
}
_local10.x = (_local10.y = 0);
return(false);
}
function getLineSeperation(p0, s, dx, dy) {
var _local1 = new Object();
var _local5 = p0.x - s.x;
var _local6 = p0.y - s.y;
var _local7 = (dx * dx) + (dy * dy);
var _local2 = (-((_local5 * dx) + (_local6 * dy))) / _local7;
_local2 = Math.min(Math.max(_local2, 0), 1);
_local1.xSeparation = _local5 + (_local2 * dx);
_local1.ySeparation = _local6 + (_local2 * dy);
_local1.distance = Math.sqrt((_local1.xSeparation * _local1.xSeparation) + (_local1.ySeparation * _local1.ySeparation));
return(_local1);
}
function getDistBetween(p0, p1) {
return(Math.sqrt((p1.x - p0.x) * (p1.x - p0.x)) + ((p1.y - p0.y) * (p1.y - p0.y)));
}
function hitReact(t_source) {
}
function getDrawType() {
return(DRAWTYPE);
}
function animate(t_frame, t_subFrame) {
mc.gotoAndStop(t_frame);
if (t_subFrame != undefined) {
mc.anim.gotoAndStop(t_subFrame);
}
}
function toString() {
return("Renderable: " + TYPE);
}
function drawHitBox() {
var _local3 = hdReg.x;
var _local4 = hdReg.y;
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.endFill();
}
function drawReg() {
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(-5, -5);
_local2.lineTo(5, -5);
_local2.lineTo(5, 5);
_local2.lineTo(-5, 5);
_local2.lineTo(-5, -5);
}
var TYPE = "element";
var DRAWTYPE = "element";
var __DEF_ASSET = "";
var __DEF_Z = 1000;
var __3D_SCALE = false;
var __DEF_WIDTH = 50;
var __DEF_HEIGHT = 50;
var __USE_ACTUAL_DIMENSIONS = true;
var CUSTOMDRAW = false;
var __DEF_HD_WIDTH = 25;
var __DEF_HD_HEIGHT = 25;
var __USE_DIMENSIONS_AS_HD = true;
var __DO_UPDATE = true;
}
Symbol 690 MovieClip [__Packages.smashing.rampage.viewport.Viewport] Frame 0
class smashing.rampage.viewport.Viewport
{
static var __instance;
var __a_groups, __o_groups, __dimensions, __viewportPath, __viewportDepth, __useScrollport, __sortGroupHasChanged, __groupsToBeUpdated, __groupsToBeSorted, __scrollportDepth, __loop, mc, scrollmc;
function Viewport (pPath, pDepth, pDimensions) {
__a_groups = [];
__o_groups = {};
__dimensions = pDimensions;
__viewportPath = pPath;
__viewportDepth = pDepth;
__useScrollport = false;
__sortGroupHasChanged = false;
__groupsToBeUpdated = [];
__groupsToBeSorted = [];
trace("-- Init Viewport --");
}
static function init(pPath, pDepth, pDimensions) {
__instance = new smashing.rampage.viewport.Viewport(pPath, pDepth, pDimensions);
}
static function getInstance() {
return(__instance);
}
function setScrollport(pDepth) {
__useScrollport = true;
__scrollportDepth = pDepth;
}
function initGroups() {
var _local6 = __a_groups.length;
var _local2;
var _local5 = [];
var _local3 = 0;
while (_local5.length < _local6) {
_local2 = __a_groups.length;
while (_local2--) {
if (__a_groups[_local2].index < __a_groups[_local3].index) {
_local3 = _local2;
}
}
_local5.push(__a_groups[_local3]);
__a_groups.splice(_local3, 1);
}
__a_groups = _local5;
var _local4 = __defaultMCDepth;
_local2 = 0;
while (_local2 < __a_groups.length) {
_local4 = __a_groups[_local2].init(_local4);
_local4++;
_local2++;
}
newView();
}
function update(dt) {
if (__sortGroupHasChanged) {
__loop = __groupsToBeSorted.length;
while (__loop--) {
__groupsToBeSorted[__loop].requestDepthSort();
}
__groupsToBeSorted = [];
__sortGroupHasChanged = false;
}
__loop = __groupsToBeUpdated.length;
while (__loop--) {
__groupsToBeUpdated[__loop].update(dt);
}
}
function newView() {
var _local2 = __a_groups.length;
while (_local2--) {
__a_groups[_local2].reset();
}
if (mc != undefined) {
mc.removeMovieClip();
}
mc = __viewportPath.createEmptyMovieClip("viewport" + __viewportDepth, __viewportDepth);
if (__useScrollport) {
if (scrollmc != undefined) {
scrollmc.removeMovieClip();
}
scrollmc = __viewportPath.createEmptyMovieClip("scrollport" + __scrollportDepth, __scrollportDepth);
scrollmc.scrollRect = new flash.geom.Rectangle(0, 0, __dimensions.SCREEN_WIDTH + 1, __dimensions.SCREEN_HEIGHT);
}
}
function clearGroup(pGroupID) {
__o_groups[pGroupID].clear();
}
function draw(pData) {
var _local4;
if (pData.element != undefined) {
var _local3 = pData.element;
_local4 = __drawElement(_local3);
if (_local4 != undefined) {
_local3.onDraw(_local4);
// unexpected jump
}
trace("* Viewport Error: Error drawing asset " + _local3.assetID);
return(undefined);
}
if (pData.assetID == "_empty") {
return(__drawEmpty(pData.groupID, pData.depth + pData.depthInfluence));
}
return(__drawAsset(pData.assetID, pData.groupID, pData.depth + pData.depthInfluence));
}
function erase(pData) {
if (pData.element != undefined) {
__eraseAsset(pData.element.mc, pData.element.getDrawType());
pData.element.onErase();
} else {
__eraseAsset(pData.mc, pData.groupID);
}
}
function createGroup(pData) {
__a_groups.push((__o_groups[pData.id] = new smashing.rampage.viewport.ViewportGroup(pData)));
if (__a_groups[__a_groups.length - 1].doActiveSort) {
__groupsToBeUpdated.push(__a_groups[__a_groups.length - 1]);
}
}
function requestGroupDepthSort(pGroup) {
__o_groups[pGroup].requestDepthSort();
}
function requestDepthChange(pElement) {
__o_groups[pElement.getDrawType()].requestDepthChange(pElement);
}
function __drawElement(pElement) {
var _local2 = __o_groups[pElement.getDrawType()];
if (_local2 == undefined) {
trace(("* [Viewport] Error: Group " + pElement.getDrawType()) + " not found.");
return(null);
}
var _local5 = _local2.getDepth();
var _local4 = mc;
if (_local2.scrollport) {
_local4 = scrollmc;
}
if (pElement.assetID == "_empty") {
var _local6 = _local4.createEmptyMovieClip(pElement.getDrawType() + _local2.getID(), _local5);
} else {
var _local6 = _local4.attachMovie(pElement.assetID, pElement.assetID + _local2.getID(), _local5);
}
_local2.addElement(new smashing.rampage.viewport.ViewportElement(_local6, _local5, pElement));
if (_local2.doSort) {
if (!_local2.awaitingSort) {
__groupsToBeSorted.push(_local2);
_local2.awaitingSort = true;
}
__sortGroupHasChanged = true;
}
return(_local6);
}
function __drawAsset(pAsset, pGroupID, pDepth) {
var _local2 = __o_groups[pGroupID];
var _local5 = _local2.getDepth(pDepth);
var _local4 = mc;
if (_local2.scrollport) {
_local4 = scrollmc;
}
var _local3 = _local4.attachMovie(pAsset, pAsset + _local2.getID(), _local5);
_local2.addElement(new smashing.rampage.viewport.ViewportElement(_local3, _local5));
return(_local3);
}
function __drawEmpty(pGroupID, pDepth) {
var _local2 = __o_groups[pGroupID];
var _local5 = _local2.getDepth(pDepth);
var _local4 = mc;
if (_local2.scrollport) {
_local4 = scrollmc;
}
var _local3 = _local4.createEmptyMovieClip(pGroupID + _local2.getID(), _local5);
__o_groups[pGroupID].addElement(new smashing.rampage.viewport.ViewportElement(_local3, _local5));
return(_local3);
}
function __eraseAsset(pMc, pGroupID) {
__o_groups[pGroupID].removeElementByMC(pMc);
}
function toString() {
return("Viewport exists");
}
var __defaultMCDepth = 100;
}
Symbol 691 MovieClip [__Packages.smashing.rampage.viewport.ViewportGroup] Frame 0
class smashing.rampage.viewport.ViewportGroup
{
var id, elements, index, totalSlots, scrollport, sortAxis, reverse, ascending, __sortRate, doSort, doActiveSort, __sortTimer, idCounter, awaitingSort, __min, __max, __current, __ra, __targetDepth, __loop;
function ViewportGroup (t_data) {
id = t_data.id;
elements = [];
index = t_data.index;
totalSlots = t_data.slots;
if (t_data.scrollport == undefined) {
t_data.scrollport = false;
}
scrollport = t_data.scrollport;
if (t_data.sortAxis == undefined) {
t_data.sortAxis = "";
}
sortAxis = t_data.sortAxis;
if (sortAxis == "") {
if (t_data.reverse == undefined) {
t_data.reverse = false;
}
reverse = t_data.reverse;
ascending = false;
__sortRate = 0;
doSort = false;
doActiveSort = false;
} else {
doSort = true;
reverse = false;
if (totalSlots < 10000) {
totalSlots = 10000;
}
if (t_data.ascending == undefined) {
t_data.ascending = false;
}
ascending = t_data.ascending;
if (t_data.sortRate == undefined) {
t_data.sortRate = 0;
doActiveSort = false;
} else {
doActiveSort = true;
}
__sortRate = t_data.sortRate;
__sortTimer = __sortRate;
}
idCounter = 0;
awaitingSort = false;
}
function update(dt) {
__sortTimer = __sortTimer - dt;
if (__sortTimer < 0) {
requestDepthSort();
}
}
function init(pDepth) {
__min = pDepth;
__max = pDepth + totalSlots;
reset();
return(__max);
}
function reset() {
elements = [];
if (doSort) {
__current = __max;
} else if (reverse) {
__current = __max;
} else {
__current = __min;
}
}
function clear() {
while (elements.length > 0) {
removeElementByMC(elements[elements.length - 1].mc);
}
reset();
}
function addElement(pElement) {
elements.push(pElement);
}
function removeElementByMC(pMc) {
var _local2 = elements.length;
while (_local2--) {
if (elements[_local2].mc == pMc) {
elements[_local2].mc.removeMovieClip();
elements.splice(_local2, 1);
return(undefined);
}
}
trace("[ViewportGroup][removeElementByMC] Error: Unable to find mc " + pMc);
}
function getID() {
idCounter++;
return(("_" + id) + idCounter);
}
function requestDepthChange(pElement) {
__resortDepths();
}
function requestDepthSort() {
__resortDepths();
}
function getDepth() {
if (!doSort) {
__calculateFastDepth();
} else {
__calculateTempDepth();
}
return(__current);
}
function __calculateFastDepth() {
if (reverse) {
__current--;
if (__current < __min) {
__current = __flattenDepths();
}
} else {
__current++;
if (__current > __max) {
__current = __flattenDepths();
}
}
}
function __calculateTempDepth() {
__current--;
}
function __flattenDepths() {
trace("Flatten Depths!");
__ra = [];
while (__ra.length < elements.length) {
__ra.push(elements[__ra.length]);
}
elements = [];
__targetDepth = (reverse ? (__max) : (__min));
var _local2;
var _local3;
while (__ra.length > 0) {
_local2 = (reverse ? (__min - 1000) : (__max + 1000));
__loop = __ra.length;
while (__loop--) {
if ((reverse ? (_local2 < __ra[__loop].depth) : (_local2 > __ra[__loop].depth))) {
_local3 = __loop;
_local2 = __ra[__loop].depth;
}
}
__ra[_local3].redepth(__targetDepth);
elements.push(__ra[_local3]);
__ra.splice(_local3, 1);
if (reverse) {
__targetDepth--;
if (__targetDepth < __min) {
trace(("[ViewportGroup] Critical depth error: more Elements in group " + id) + " than slots");
}
} else {
__targetDepth++;
if (__targetDepth > __max) {
trace(("[ViewportGroup] Critical depth error: more Elements in group " + id) + " than slots");
}
}
}
return(__targetDepth);
}
function __resortDepths() {
__ra = [];
while (__ra.length < elements.length) {
__ra.push(elements[__ra.length]);
}
elements = [];
__targetDepth = __min;
var _local3;
var _local2;
while (__ra.length > 0) {
_local3 = 10000000 /* 0x989680 */;
_local2 = -1;
__loop = __ra.length;
while (__loop--) {
if (_local3 > __ra[__loop].getAxis(sortAxis)) {
_local2 = __loop;
_local3 = __ra[__loop].getAxis(sortAxis);
}
}
__ra[_local2].redepth(__targetDepth);
elements.push(__ra[_local2]);
__ra.splice(_local2, 1);
__targetDepth++;
if (__targetDepth > __max) {
trace(("[ViewportGroup] Critical depth error: more Elements in group " + id) + " than slots");
}
}
__current = __max;
__sortTimer = __sortRate;
awaitingSort = false;
}
}
Symbol 692 MovieClip [__Packages.smashing.rampage.viewport.ViewportElement] Frame 0
class smashing.rampage.viewport.ViewportElement
{
var mc, depth, __needsDepthRecalc, isElement, element, __storedDepth;
function ViewportElement (pMc, pDepth, pElement) {
mc = pMc;
depth = pDepth;
__needsDepthRecalc = true;
if (pElement == undefined) {
isElement = false;
} else {
isElement = true;
element = pElement;
}
}
function redepth(pDepth) {
depth = pDepth;
mc.swapDepths(depth);
__needsDepthRecalc = true;
}
function getAxis(pAxis) {
if (__needsDepthRecalc) {
__storedDepth = element[pAxis] + element.depthInfluence;
__needsDepthRecalc = false;
}
return(__storedDepth);
}
}
Symbol 693 MovieClip [__Packages.smashing.Point3D] Frame 0
class smashing.Point3D
{
var x, y, z;
function Point3D (x, y, z) {
this.x = Number(x);
this.y = Number(y);
this.z = Number(z);
}
function get length() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function set length(newLength) {
if (length != 0) {
var _local2 = newLength / length;
x = x * _local2;
y = y * _local2;
z = z * _local2;
}
//return(length);
}
function get lengthSqu() {
return(((x * x) + (y * y)) + (z * z));
}
function copy() {
return(new smashing.Point3D(x, y, z));
}
function addPoint(p) {
return(new smashing.Point3D(p.x + x, p.y + y, p.z + z));
}
function subtractPoint(p) {
return(new smashing.Point3D(x - p.x, y - p.y, z - p.z));
}
function addScalar(n) {
return(new smashing.Point3D(x + n, y + n, z + n));
}
function subtractScalar(n) {
return(new smashing.Point3D(x - n, y - n, z - n));
}
function addPointMe(p) {
x = x + p.x;
y = y + p.y;
z = z + p.z;
}
function subtractPointMe(p) {
x = x - p.x;
y = y - p.y;
z = z - p.z;
}
function addScalarMe(n) {
x = x + n;
y = y + n;
z = z + n;
}
function subtractScalarMe(n) {
x = x - n;
y = y - n;
z = z - n;
}
function multiply(n) {
var _local2 = copy();
_local2.x = _local2.x * n;
_local2.y = _local2.y * n;
_local2.z = _local2.z * n;
return(_local2);
}
function divide(n) {
var _local2 = copy();
if (n == 0) {
_local2.x = 0;
_local2.y = 0;
_local2.z = 0;
return(undefined);
}
_local2.x = _local2.x / n;
_local2.y = _local2.y / n;
_local2.z = _local2.z / n;
return(_local2);
}
function multiplyMe(n) {
x = x * n;
y = y * n;
z = z * n;
}
function divideMe(n) {
x = x / n;
y = y / n;
z = z / n;
}
function dot(p) {
return(((x * p.x) + (y * p.y)) + (z * p.z));
}
function cross(p) {
return(new smashing.Point3D((y * p.z) - (z * p.y), (z * p.x) - (x * p.z), (x * p.y) - (y * p.x)));
}
function pseudoCross() {
return(new smashing.Point3D(y, -x, z));
}
function normalize() {
if (((!x) && (!y)) && (!z)) {
return(undefined);
}
var _local2 = length;
return(new smashing.Point3D(x / _local2, y / _local2, z / _local2));
}
function normalizeMe() {
if ((!x) && (!y)) {
return(undefined);
}
var _local2 = length;
x = x / _local2;
y = y / _local2;
z = z / _local2;
}
function reverse() {
var _local2 = new smashing.Point3D(x * -1, y * -1, z * -1);
return(_local2);
}
function reverseMe() {
x = x * -1;
y = y * -1;
z = z * -1;
}
function findCosine(vOther) {
var _local3 = dot(vOther);
var _local4 = length * vOther.__get__length();
var _local2 = _local3 / _local4;
return(_local2);
}
function equals(p) {
if (((x == p.x) && (y == p.y)) && (z == p.z)) {
return(true);
}
return(false);
}
function zero() {
x = 0;
y = 0;
z = 0;
}
function distSqu(p) {
var _local4 = p.x - x;
var _local3 = p.y - y;
var _local2 = p.z - z;
return(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2));
}
function toString() {
var _local2 = ((((("Point3D (" + x) + ",") + y) + ",") + z) + ")";
return(_local2);
}
function rotateMe(angle) {
var _local3 = Math.cos((angle * Math.PI) / 180);
var _local2 = Math.sin((angle * Math.PI) / 180);
x = (x * _local3) - (y * _local2);
y = (x * _local2) + (y * _local3);
}
function rotate(angle) {
var _local3 = Math.cos((angle * Math.PI) / 180);
var _local2 = Math.sin((angle * Math.PI) / 180);
return(new smashing.Point3D((x * _local3) - (y * _local2), (x * _local2) + (y * _local3), 0));
}
}
Symbol 694 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.GameRenderable] Frame 0
class cartoonnetwork.reanimated.picklebomb.GameRenderable extends smashing.rampage.Renderable
{
var linkCamera;
function GameRenderable (t_data) {
super(t_data);
}
function init(t_data) {
linkCamera(cartoonnetwork.reanimated.picklebomb.GameCamera.getInstance());
super.init(t_data);
}
}
Symbol 695 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Entity] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Entity extends cartoonnetwork.reanimated.picklebomb.GameRenderable
{
var doRemove, velocity, __animation, kill, requestErase, isAlive, hdWidth, hdReg, x, hdHeight, y, z, mc, __isAnimating, DRAWTYPE, specialDepth;
function Entity (t_data) {
super(t_data);
}
function init(t_data) {
doRemove = false;
super.init(t_data);
velocity = new smashing.Point3D(0, 0, 0);
__animation = __IDLE_ANIMATION;
}
function startDie() {
kill();
animate(__DEATH_ANIMATION);
if (__USES_VELOCITY) {
velocity.x = (velocity.y = 0);
}
}
function endDie() {
requestErase();
}
function onErase() {
super.onErase();
doRemove = true;
}
function updateDraw() {
if (doRemove) {
return(undefined);
}
super.updateDraw();
}
function runHD(t_target, dt) {
if (!(isAlive && (t_target.isAlive))) {
return(false);
}
if (Math.abs((x + hdReg.x) - (t_target.x + t_target.hdReg.x)) < (hdWidth + t_target.hdWidth)) {
if (Math.abs((y + hdReg.y) - (t_target.y + t_target.hdReg.y)) < (hdHeight + t_target.hdHeight)) {
return(true);
}
}
return(false);
}
function hitReact(t_source) {
}
function onDraw(t_newmc) {
super.onDraw(t_newmc);
animateLoop(__IDLE_ANIMATION);
}
function update(dt) {
updateAnim();
if (__USES_VELOCITY) {
x = x + (velocity.x * dt);
y = y + (velocity.y * dt);
z = z + (velocity.z * dt);
}
}
function updateAndRender(dt) {
updateAnim();
if (__USES_VELOCITY) {
x = x + (velocity.x * dt);
y = y + (velocity.y * dt);
z = z + (velocity.z * dt);
}
render(dt);
}
function render(dt) {
super.render(dt);
}
function animate(frame) {
if (frame != undefined) {
__animation = frame;
}
mc.gotoAndStop(__animation);
if (__animation == __IDLE_ANIMATION) {
__isAnimating = false;
} else {
__isAnimating = true;
}
}
function animateLoop(frame) {
if (frame != undefined) {
__animation = frame;
}
mc.gotoAndStop(__animation);
__isAnimating = false;
}
function updateAnim() {
if (__isAnimating) {
if (mc.anim._currentFrame == mc.anim._totalFrames) {
if (__animation == __DEATH_ANIMATION) {
endDie();
} else {
animateLoop(__IDLE_ANIMATION);
}
}
}
}
function freezeAnimation() {
mc.anim.stop();
}
function unfreezeAnimation() {
if (__isAnimating) {
mc.anim.play();
} else {
animate();
}
}
function replaceVelocity(t_vector) {
velocity = t_vector.copy();
}
function inputVelocity(t_vector) {
velocity.x = velocity.x + t_vector.x;
velocity.y = velocity.y + t_vector.y;
velocity.z = velocity.z + t_vector.z;
}
function addVelocity(t_vector, dt, maxVelocity, xMult, yMult, zMult) {
if (maxVelocity == undefined) {
maxVelocity = __MAX_VELOCITY;
}
zMult = 1;
yMult = zMult;
xMult = yMult;
if ((Math.abs(velocity.x) < maxVelocity) || ((velocity.x * t_vector.x) < 0)) {
velocity.x = velocity.x + ((t_vector.x * dt) * xMult);
}
if ((Math.abs(velocity.y) < maxVelocity) || ((velocity.y * t_vector.y) < 0)) {
velocity.y = velocity.y + ((t_vector.y * dt) * yMult);
}
if ((Math.abs(velocity.z) < maxVelocity) || ((velocity.z * t_vector.z) < 0)) {
velocity.z = velocity.z + ((t_vector.z * dt) * zMult);
}
}
function magnitudeToVector(t_magnitude, t_angle) {
var _local2;
var _local1;
var _local3 = t_angle * (Math.PI/180);
_local2 = t_magnitude * Math.cos(_local3);
_local2 = Math.round(_local2 * 100) / 100;
_local1 = t_magnitude * Math.sin(_local3);
_local1 = Math.round(_local1 * 100) / 100;
return(new smashing.Point3D(_local2, _local1, 0));
}
function getDrawType() {
return(((HAS_SPECIAL_DEPTH == true) ? ((DRAWTYPE + "_") + specialDepth) : (DRAWTYPE)));
}
function getIsAnimating() {
return(__isAnimating);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
var HAS_SPECIAL_DEPTH = false;
var __IDLE_ANIMATION = "idle";
var __DEATH_ANIMATION = "die";
var __MAX_VELOCITY = 300;
var __USES_VELOCITY = false;
}
Symbol 696 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Player] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Player extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, bombType, __bombTimer, __stunTimer, __throwing, __alreadyThrown, __facing, __bombDescription, mc, x, y, velocity, __movement, __bomb, __animation, __targetY, __targetX, animateLoop, hdReg;
function Player (t_data) {
super(t_data);
__owner = t_data.owner;
bombType = 0;
__bombTimer = 0;
__stunTimer = 0;
__throwing = false;
__alreadyThrown = false;
__facing = "right_";
__bombDescription = "";
}
function updateAndRender(dt) {
mc.cacheAsBitmap = true;
var _local8 = _xmouse - x;
var _local6 = _ymouse - y;
velocity = new smashing.Point3D(_local8, _local6, 0);
if (velocity.__get__length() < 5) {
velocity.__set__length(0);
velocity.x = 0;
velocity.y = 0;
} else {
velocity.__set__length(__RUN_SPEED);
}
if ((x >= 275) && (velocity.x > 0)) {
velocity.x = 0;
} else if ((x < 20) && (velocity.x < 0)) {
velocity.x = 0;
}
if ((y < 50) && (velocity.y < 0)) {
velocity.y = 0;
} else if ((y > 400) && (velocity.y > 0)) {
velocity.y = 0;
}
if (velocity.__get__length() > 0) {
__movement = "run";
} else {
__movement = "idle";
}
var _local5 = Math.abs(velocity.x);
var _local4 = Math.abs(velocity.y);
if (__throwing == true) {
__movement = "throw";
__bomb = "";
if ((!__alreadyThrown) && (mc.anim != undefined)) {
if ((((__animation == "right_throw") || (__animation == "left_throw")) || (__animation == "back_throw")) || (__animation == "forward_throw")) {
if (mc.anim._currentframe > 9) {
throwBomb();
__owner.hideCursor();
}
}
}
if (((mc.anim._currentframe == mc.anim._totalframes) && (mc.anim._totalframes > 1)) && (mc.anim != undefined)) {
__throwing = false;
__alreadyThrown = true;
}
_local4 = Math.abs(__targetY);
_local5 = Math.abs(__targetX);
if (_local4 > _local5) {
if (__targetY < 0) {
__facing = "back_";
} else {
__facing = "forward_";
}
} else if (__targetX < 0) {
__facing = "left_";
} else {
__facing = "right_";
}
velocity.x = 0;
velocity.y = 0;
} else if (__stunTimer <= 0) {
if (_local4 > _local5) {
if (velocity.y < 0) {
__facing = "back_";
} else if (velocity.y > 0) {
__facing = "forward_";
}
} else if (velocity.x < 0) {
__facing = "left_";
} else if (velocity.x > 0) {
__facing = "right_";
}
if (bombType == 0) {
__bomb = "";
__owner.hideCursor();
} else {
__owner.showCursor();
__bomb = "_B";
}
}
if (__stunTimer > 0) {
__stunTimer = __stunTimer - dt;
velocity.x = 0;
velocity.y = 0;
__movement = "hit";
__bomb = "";
__throwing = false;
mc.anim.bomb.bomb.gotoAndStop("splode");
mc.anim.damage.gotoAndStop(__bombDescription);
}
animateLoop((__facing + __movement) + __bomb);
if (bombType != 0) {
if (cartoonnetwork.reanimated.picklebomb.GameState.getInstance().speedy == true) {
__RUN_SPEED = 200;
} else {
__RUN_SPEED = 125;
}
var _local3 = "off";
mc.anim.bomb.gotoAndStop(__bombDescription);
if (__bombTimer > 0) {
__bombTimer = __bombTimer - dt;
if (__bombTimer > 4) {
_local3 = "on";
} else if (__bombTimer > 2) {
_local3 = "slow";
} else if (__bombTimer > 0) {
_local3 = "fast";
} else if (__bombTimer <= 0) {
trace("bomb exploded in the player's hands");
bombType = 0;
__bombTimer = 0;
_local3 = "splode";
hitAndStun();
}
}
mc.anim.bomb.bomb.gotoAndStop(_local3);
mc.anim.bomb.bomb.shadow._visible = false;
} else if (cartoonnetwork.reanimated.picklebomb.GameState.getInstance().speedy == true) {
__RUN_SPEED = 300;
} else {
__RUN_SPEED = 175;
}
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
mc.gotoAndStop("right_idle");
}
function idle() {
mc.gotoAndStop("right_idle");
bombType = 0;
__bombTimer = 0;
__stunTimer = 0;
__throwing = false;
__alreadyThrown = false;
__facing = "right_";
__bombDescription = "";
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -30;
}
function startThrowing() {
trace("startThrowing() called");
if (bombType == 0) {
trace("no bomb in player's hands");
return(undefined);
}
__alreadyThrown = false;
__throwing = true;
var _local4 = _xmouse - x;
var _local3 = _ymouse - y;
var _local2 = new smashing.Point3D(_local4, _local3, 0);
if (_local2.__get__length() >= 320) {
_local2.__set__length(320);
}
__targetX = _xmouse;
__targetY = _ymouse;
}
function throwBomb() {
trace("player trying to throw a bomb");
__alreadyThrown = true;
if ((__targetX == 0) && (__targetY == 0)) {
__targetX = 1;
}
__owner.spawnBomb((x + __DEF_HD_WIDTH) + 5, (y - __DEF_HD_HEIGHT) - 28, __targetX, __targetY, bombType, __bombTimer);
bombType = 0;
}
function hitAndStun() {
__movement = "hit";
__stunTimer = 2.2;
}
function pickUp(t_data) {
bombType = t_data.val;
__bombDescription = t_data.desc;
__bombTimer = t_data.timer;
trace("Bomb timer: " + t_data.timer);
if ((__bombTimer < 2) && (__bombTimer > 0)) {
__bombTimer = 2;
} else if (__bombTimer == 8) {
__bombTimer = 0;
}
cartoonnetwork.reanimated.picklebomb.Sounds.getInstance().p("pickup");
}
function setVelocity(x, y) {
}
function isStunned() {
if (__stunTimer > 0) {
return(true);
}
return(false);
}
var TYPE = "player";
var DRAWTYPE = "player";
var __DEF_ASSET = "jimmy_main";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 40;
var __DEF_HD_HEIGHT = 65;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
var __RUN_SPEED = 175;
var __USES_VELOCITY = true;
}
Symbol 697 MovieClip [__Packages.smashing.sound.SoundEngine] Frame 0
class smashing.sound.SoundEngine
{
var __mc, o_sounds, o_groups, __a_soundQueue, __flag_muted, __flag_overwrite, __groupCount, __callbackPath, __callbackFunc;
function SoundEngine () {
}
function generateSounds(t_path, t_depth, t_overwrite) {
if (t_path == undefined) {
trace("Sound Engine Error - no path movieclip supplied!");
}
__mc = t_path.createEmptyMovieClip(__DEFAULTMCNAME, t_depth);
o_sounds = {};
o_groups = {};
__a_soundQueue = [];
__flag_muted = false;
if (t_overwrite == undefined) {
t_overwrite = false;
}
__flag_overwrite = t_overwrite;
__groupCount = 0;
createGroup(__DEFAULTGROUPNAME);
trace("-- Init Sound Engine -- ");
}
function setCallback(path, func) {
__callbackPath = path;
__callbackFunc = func;
}
function createGroup(t_name) {
__groupCount++;
var _local2 = __mc.createEmptyMovieClip(t_name, __groupCount);
_local2.soundObject = new Sound(_local2);
o_groups[t_name] = _local2;
}
function createSound(t_name, t_assetID, t_groupName, doCallback) {
var _local4;
if (((t_groupName == undefined) || (t_groupName == "")) || (t_groupName == null)) {
_local4 = o_groups[__DEFAULTGROUPNAME];
} else {
_local4 = o_groups[t_groupName];
}
if (_local4 != undefined) {
var _local2 = {};
_local2.soundEffect = new Sound(_local4);
_local2.soundEffect.attachSound(t_assetID);
if (doCallback == undefined) {
doCallback = false;
}
_local2.doCallback = doCallback;
o_sounds[t_name] = _local2;
} else {
trace(("Error Locating Group " + t_groupName) + " for create Sound");
}
}
function playSound(t_soundName, t_loops, t_queued) {
if (__flag_muted) {
return(undefined);
}
var _local2 = o_sounds[t_soundName];
if (_local2 != undefined) {
if (t_loops == undefined) {
t_loops = 1;
} else if (t_loops == 0) {
t_loops = 100000 /* 0x0186A0 */;
}
if (__flag_overwrite) {
_local2.soundEffect.stop();
}
if (t_queued == true) {
__a_soundQueue[0].doCallback = _local2.doCallback;
_local2.soundEffect.onSoundComplete = mx.utils.Delegate.create(this, onQueuedSoundComplete);
} else if (_local2.doCallback) {
_local2.soundEffect.owner = this;
_local2.soundEffect.myName = t_soundName;
_local2.soundEffect.onSoundComplete = function () {
this.owner.onCallbackSoundComplete(this.myName);
};
}
_local2.soundEffect.start(0, t_loops);
} else {
trace(("Error - sound " + t_soundName) + " not found");
}
}
function stopSound(t_soundName) {
o_sounds[t_soundName].soundEffect.stop();
}
function stopAll() {
clearQueue();
stopAllSounds();
}
function changeVolume(t_vol, t_groupName) {
if (t_groupName == undefined) {
t_groupName = __DEFAULTGROUPNAME;
}
o_groups[t_groupName].soundObject.setVolume(t_vol);
}
function toggleSound() {
if (__flag_muted) {
soundOn();
} else {
soundOff();
}
return(!__flag_muted);
}
function soundOff() {
__flag_muted = true;
}
function soundOn() {
__flag_muted = false;
}
function callbackSound(t_soundName, t_loops, path, func) {
playSound(t_soundName, t_loops, false);
var _local2 = o_sounds[t_soundName];
_local2.soundEffect.cbpath = path;
_local2.soundEffect.cbfunc = func;
_local2.soundEffect.onSoundComplete = function () {
this.onSoundComplete = null;
this.cbpath[func]();
};
}
function onCallbackSoundComplete(name) {
__callbackPath[__callbackFunc](name);
}
function queueSound(t_soundName) {
__a_soundQueue.push({soundName:t_soundName, isPlaying:false, doCallback:false});
__playQueue();
}
function __playQueue() {
if (__a_soundQueue.length == 0) {
return(undefined);
}
if (!__a_soundQueue[0].isPlaying) {
playSound(__a_soundQueue[0].soundName, 1, true);
__a_soundQueue[0].isPlaying = true;
}
}
function onQueuedSoundComplete() {
if (__a_soundQueue[0].doCallback) {
onCallbackSoundComplete(__a_soundQueue[0].soundName);
}
__a_soundQueue.splice(0, 1);
__playQueue();
}
function clearQueue() {
__a_soundQueue = [__a_soundQueue[0]];
}
function get queueLength() {
return(__a_soundQueue.length);
}
function get isQueuePlaying() {
if (__a_soundQueue.length == 0) {
return(false);
}
return(true);
}
var __DEFAULTMCNAME = "soundEngine_MC";
var __DEFAULTGROUPNAME = "sound";
}
Symbol 698 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 699 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.Sounds] Frame 0
class cartoonnetwork.reanimated.picklebomb.Sounds extends smashing.sound.SoundEngine
{
static var __instance;
var createGroup, createSound, changeVolume, __currentMusic, muteMusic, muteSound, queueSound, callbackSound, stopSound, __get__isQueuePlaying;
function Sounds () {
super();
}
static function init() {
__instance = new cartoonnetwork.reanimated.picklebomb.Sounds();
}
static function getInstance() {
return(__instance);
}
function generateSounds(path) {
super.generateSounds(path, __DEPTH, __DO_OVERWRITE);
createGroup("music");
createSound("music", "music_loop_short.wav", "music");
createSound("music_fast", "music_loop_timerunningout.wav", "music");
createSound("pickup", "jimmy_pickup.wav", "music");
changeVolume(60);
__currentMusic = "";
muteMusic = (muteSound = false);
}
function playSound(name, loops) {
if (muteSound == true) {
return(undefined);
}
super.playSound(name, loops);
}
function p(name) {
playSound(name, 1);
}
function q(name) {
queueSound(name);
}
function c(name, cbpath, cbfunc) {
callbackSound(name, 1, cbpath, cbfunc);
}
function playMusic(name) {
if (muteMusic) {
__currentMusic = name;
return(undefined);
}
if (name == undefined) {
name = __currentMusic;
}
if (((__currentMusic != "") && (__currentMusic != undefined)) && (__currentMusic != name)) {
stopMusic();
}
if (__currentMusic != name) {
__currentMusic = name;
trace(name);
playSound(__currentMusic, 0);
}
}
function stopMusic() {
stopSound(__currentMusic);
__currentMusic = "";
}
function playOptional(t_name) {
if (!__get__isQueuePlaying()) {
queueSound(t_name);
}
}
var __DEPTH = 20;
var __DO_OVERWRITE = false;
}
Symbol 700 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Cursor] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Cursor extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, __isVisible, velocity, mc, x, y, hdReg;
function Cursor (t_data) {
super(t_data);
__owner = t_data.owner;
__isVisible = true;
velocity = new smashing.Point3D(0, 0, 0);
}
function updateAndRender(dt, player) {
mc.cacheAsBitmap = true;
mc._visible = __isVisible;
var _local6 = _xmouse - player.x;
var _local5 = _ymouse - player.y;
var _local3 = new smashing.Point3D(_local6, _local5, 0);
mc.gotoAndStop(1);
x = _local3.x + player.x;
y = _local3.y + player.y;
if (x < 0) {
x = 0;
}
if (y < 0) {
y = 0;
} else if (y > 400) {
y = 400;
}
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function hide() {
__isVisible = false;
}
function show() {
__isVisible = true;
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -44;
}
var TYPE = "cursor";
var DRAWTYPE = "player";
var __DEF_ASSET = "arrow_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 31;
var __DEF_HD_HEIGHT = 89;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 701 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Enemy] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Enemy extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, bombType, __bombTimer, __stunTimer, __throwing, __alreadyThrown, __facing, __bombDescription, __throwCooldown, __targetBomb, __AIReset, x, y, __targetBombX, __targetBombY, velocity, __movement, __bomb, __animation, mc, animateLoop, hdReg, __targetX, __targetY;
function Enemy (t_data) {
super(t_data);
__owner = t_data.owner;
bombType = 0;
__bombTimer = 0;
__stunTimer = 0;
__throwing = false;
__alreadyThrown = false;
__facing = "right_";
__bombDescription = "";
__throwCooldown = 3;
}
function updateAndRender(dt, bombList, level) {
__RUN_SPEED = 70 + ((level - 1) * 15);
if (__RUN_SPEED > 130) {
__RUN_SPEED = 130;
}
__throwCooldown = __throwCooldown - dt;
if (__throwCooldown <= 0) {
if (((__targetBomb == undefined) || (__targetBomb.hasExploded == true)) || (__AIReset == true)) {
__AIReset = false;
AI(bombList, level);
}
}
if (__targetBomb != undefined) {
var _local5 = __targetBomb.x - x;
var _local3 = __targetBomb.y - y;
if (__targetBomb.x < 300) {
trace("Bad Bomb Targeted: " + __targetBomb.x);
__AIReset = true;
return(undefined);
}
if (bombType != 0) {
trace("bombType: " + bombType);
_local5 = (__targetBombX + 310) - x;
_local3 = __targetBombY - y;
velocity = new smashing.Point3D(_local5, _local3, 0);
if (velocity.__get__length() > __RUN_SPEED) {
velocity.__set__length(__RUN_SPEED);
} else if (velocity.__get__length() < 5) {
velocity.__set__length(0);
velocity.x = 0;
velocity.y = 0;
}
var _local9 = new smashing.Point3D(__targetBombX - x, _local3, 0);
if ((_local9.__get__length() <= 400) && (__throwing == false)) {
startThrowing(level);
}
} else {
velocity = new smashing.Point3D(_local5, _local3, 0);
if (velocity.__get__length() > __RUN_SPEED) {
velocity.__set__length(__RUN_SPEED);
} else if (velocity.__get__length() < 5) {
velocity.__set__length(0);
velocity.x = 0;
velocity.y = 0;
}
if (__targetBomb.x < 300) {
trace("Bad Bomb Targeted: " + __targetBomb.x);
__AIReset = true;
return(undefined);
}
if ((velocity.x == 0) && (velocity.y == 0)) {
__targetBomb.requestErase();
__targetBomb = undefined;
__AIReset = true;
}
}
if ((x <= 325) && (velocity.x < 0)) {
velocity.x = 0;
} else if ((x > 580) && (velocity.x > 0)) {
velocity.x = 0;
}
if ((y < 50) && (velocity.y < 0)) {
velocity.y = 0;
} else if ((y > 400) && (velocity.y > 0)) {
velocity.y = 0;
}
var _local10 = Math.abs(_local5);
var _local7 = Math.abs(_local3);
if (__throwing == true) {
__movement = "throw";
__bomb = "";
if ((((__animation == "right_throw") || (__animation == "left_throw")) || (__animation == "back_throw")) || (__animation == "forward_throw")) {
if (mc.anim._currentframe >= 10) {
throwBomb();
__throwing = false;
}
}
velocity.x = 0;
velocity.y = 0;
} else if (__stunTimer <= 0) {
if (_local7 > _local10) {
if (velocity.y < 0) {
__facing = "back_";
} else {
__facing = "forward_";
}
} else if (velocity.x < 0) {
__facing = "left_";
} else {
__facing = "right_";
}
if (bombType == 0) {
__bomb = "";
} else {
__bomb = "_B";
}
if (velocity.__get__length() > 0) {
__movement = "run";
} else {
__movement = "idle";
}
}
} else if (velocity.__get__length() > 0) {
__movement = "run";
} else {
__movement = "idle";
}
if (x < 300) {
x = 300;
} else if (x > 600) {
x = 600;
}
if (y < 30) {
y = 30;
} else if (y > 400) {
y = 400;
}
if (__stunTimer > 0) {
__stunTimer = __stunTimer - dt;
velocity.x = 0;
velocity.y = 0;
__movement = "hit";
__bomb = "";
mc.anim.bomb.bomb.gotoAndStop("splode");
mc.anim.damage.gotoAndStop(__bombDescription);
}
animateLoop((__facing + __movement) + __bomb);
if (bombType != 0) {
__bomb = "_B";
var _local4 = "off";
mc.anim.bomb.gotoAndStop(__bombDescription);
if (__bombTimer > 0) {
__bombTimer = __bombTimer - dt;
if (__bombTimer > 4) {
_local4 = "on";
} else if (__bombTimer > 2) {
_local4 = "slow";
} else if (__bombTimer > 0) {
_local4 = "fast";
} else if (__bombTimer <= 0) {
trace("bomb exploded in the enemy's hands");
bombType = 0;
__bombTimer = 0;
_local4 = "splode";
hitAndStun();
}
}
mc.anim.bomb.bomb.gotoAndStop(_local4);
mc.anim.bomb.shadow._visible = false;
}
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
mc.gotoAndStop("left_idle");
}
function idle() {
mc.gotoAndStop("left_idle");
bombType = 0;
__throwing = false;
__alreadyThrown = false;
__targetBomb = undefined;
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -32;
}
function AI(bombList, level) {
var _local2 = bombList.length;
var _local4 = [];
while (_local2--) {
if ((((bombList[_local2].TYPE == "bomb") && (bombList[_local2].x > 300)) && (bombList[_local2].hasExploded == false)) && (bombList[_local2].y >= 0)) {
_local4.push(bombList[_local2]);
}
}
_local2 = _local4.length;
if (_local2 != 0) {
var _local6 = _local4[random(_local2)];
while (__targetBomb != _local6) {
__targetBomb = _local4[random(_local2)];
}
if ((level > 4) && (__targetBomb.bombType != 2)) {
var _local7 = random(3);
if (_local7 == 2) {
if (random(2)) {
if (random(2)) {
__targetBombX = random(290);
__targetBombY = 75;
} else {
__targetBombX = random(290);
__targetBombY = 375;
}
} else if (random(2)) {
__targetBombX = 25;
__targetBombY = random(300) + 20;
} else {
__targetBombX = 275;
__targetBombY = random(300) + 20;
}
} else if (_local7 == 1) {
if (random(2)) {
if (random(2)) {
__targetBombX = 25;
__targetBombY = 75;
} else {
__targetBombX = 275;
__targetBombY = 75;
}
} else if (random(2)) {
__targetBombX = 25;
__targetBombY = 375;
} else {
__targetBombX = 275;
__targetBombY = 375;
}
} else {
__targetBombX = random(290);
__targetBombY = random(300) + 20;
}
} else if (level > 2) {
if (__targetBomb.bombType == 2) {
_local2 = bombList.length;
var _local5;
while (_local2--) {
if (((bombList[_local2].TYPE == "stink") && (bombList[_local2].x > 300)) && (bombList[_local2].y >= 0)) {
_local5 = bombList[_local2];
break;
}
}
if (_local5 == undefined) {
__AIReset = true;
} else {
__targetBombX = _local5.x;
__targetBombY = _local5.y;
}
} else {
__targetBombX = random(290);
__targetBombY = random(300) + 20;
}
} else {
__targetBombX = random(290);
__targetBombY = random(300) + 20;
}
} else {
__targetBomb = new Object();
__targetBomb.x = 450;
__targetBomb.y = 200;
__AIReset = true;
}
}
function startThrowing(level) {
trace("enemy.startThrowing()");
__alreadyThrown = false;
__throwing = true;
__targetX = __targetBombX;
__targetY = __targetBombY;
__throwCooldown = (3 - level) + 1;
if (__throwCooldown < 0) {
__throwCooldown = 0.5;
}
}
function throwBomb() {
__alreadyThrown = true;
__throwing = false;
__owner.spawnBomb(x + __DEF_HD_WIDTH, (y - __DEF_HD_HEIGHT) - 5, __targetX, __targetY, bombType, __bombTimer);
bombType = 0;
__targetBomb = undefined;
}
function pickUp(t_data) {
bombType = t_data.val;
__bombDescription = t_data.desc;
__bombTimer = t_data.timer;
if (__bombTimer < 2) {
__bombTimer = 2;
}
}
function hitAndStun() {
__movement = "hit";
__stunTimer = 2.2;
bombType = 0;
}
function isStunned() {
if (__stunTimer > 0) {
return(true);
}
return(false);
}
var TYPE = "enemy";
var DRAWTYPE = "player";
var __DEF_ASSET = "golly_main";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 20;
var __DEF_HD_HEIGHT = 65;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
var __RUN_SPEED = 70;
var __USES_VELOCITY = true;
}
Symbol 702 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Scoreboard] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Scoreboard extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, x, y, mc, __isVisible, hdReg;
function Scoreboard (t_data) {
super(t_data);
__owner = t_data.owner;
x = -22.8;
y = -32;
}
function updateAndRender(dt, player) {
if (cartoonnetwork.reanimated.picklebomb.Sounds.getInstance().muteMusic == true) {
mc.music_btn._visible = false;
mc.mute_btn._visible = true;
} else {
mc.music_btn._visible = true;
mc.mute_btn._visible = false;
}
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function hide() {
__isVisible = false;
}
function show() {
__isVisible = true;
}
function playPickles() {
mc.pickles_mc.gotoAndPlay(1);
}
function isPicklesDone() {
if (mc.pickles_mc._currentframe == mc.pickles_mc._totalframes) {
return(true);
}
return(false);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -44;
}
var TYPE = "cursor";
var DRAWTYPE = "ui";
var __DEF_ASSET = "scoreboard_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 31;
var __DEF_HD_HEIGHT = 89;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 703 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Butterfly] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Butterfly extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, __isVisible, mc, hdReg;
function Butterfly (t_data) {
super(t_data);
__owner = t_data.owner;
__isVisible = true;
}
function updateAndRender(dt) {
mc.cacheAsBitmap = true;
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function hide() {
__isVisible = false;
Mouse.show();
}
function show() {
__isVisible = true;
Mouse.hide();
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -44;
}
var TYPE = "butterfly";
var DRAWTYPE = "effect";
var __DEF_ASSET = "butterfly_path_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 31;
var __DEF_HD_HEIGHT = 89;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 704 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Pickles] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Pickles extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, velocity, isPlaying, mc, hdReg;
function Pickles (t_data) {
super(t_data);
__owner = t_data.owner;
velocity = new smashing.Point3D(0, 0, 0);
isPlaying = false;
}
function updateAndRender(dt) {
if ((isPicklesDone() == true) && (mc._currentframe > 1)) {
trace("pickles reset");
isPlaying = false;
mc.gotoAndStop(1);
}
super.updateAndRender(dt);
}
function playPickles() {
mc.gotoAndPlay(1);
isPlaying = true;
}
function isPicklesDone() {
if (mc._currentframe == mc._totalframes) {
return(true);
}
return(false);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -44;
}
var TYPE = "pickles";
var DRAWTYPE = "effect";
var __DEF_ASSET = "pickles_ani_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 31;
var __DEF_HD_HEIGHT = 89;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 705 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.PicklesWin] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.PicklesWin extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, velocity, mc, hdReg;
function PicklesWin (t_data) {
super(t_data);
__owner = t_data.owner;
velocity = new smashing.Point3D(0, 0, 0);
}
function updateAndRender(dt) {
if ((isPicklesDone() == true) && (mc._currentframe > 1)) {
trace("PicklesWin reset");
mc.gotoAndStop(1);
}
super.updateAndRender(dt);
}
function playPickles() {
trace("PicklesWin.playPickles()");
mc.gotoAndPlay(1);
}
function isPicklesDone() {
if (mc._currentframe == mc._totalframes) {
return(true);
}
return(false);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -44;
}
var TYPE = "pickles";
var DRAWTYPE = "effect";
var __DEF_ASSET = "pickles_win_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 31;
var __DEF_HD_HEIGHT = 89;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 706 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.PicklesLose] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.PicklesLose extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, velocity, mc, y, render, hdReg;
function PicklesLose (t_data) {
super(t_data);
__owner = t_data.owner;
velocity = new smashing.Point3D(0, 0, 0);
}
function updateAndRender(dt) {
mc.cacheAsBitmap = true;
y = -200;
super.updateAndRender(dt);
render(dt);
}
function playPickles() {
trace("picklesLose.playPickles()");
mc.gotoAndStop(10);
mc._y = -200;
trace(mc);
trace(mc._totalframes);
}
function isPicklesDone() {
if (mc._currentframe == mc._totalframes) {
return(true);
}
return(false);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -44;
}
var TYPE = "pickles";
var DRAWTYPE = "effect";
var __DEF_ASSET = "pickles_lose_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 31;
var __DEF_HD_HEIGHT = 89;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 707 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.RoundCounter] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.RoundCounter extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, velocity, hdReg;
function RoundCounter (t_data) {
super(t_data);
__owner = t_data.owner;
velocity = new smashing.Point3D(0, 0, 0);
}
function updateAndRender(dt) {
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -44;
}
var TYPE = "round";
var DRAWTYPE = "effect";
var __DEF_ASSET = "round_text_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 31;
var __DEF_HD_HEIGHT = 89;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 708 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Bomb] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Bomb extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var __owner, bombType, __flightTimer, __arcY, __bombDescription, __bombActivated, hasExploded, inFlight, __bombState, __bombCountdown, __neutralThrow, __bouncesRemaining, __totalFlightTime, mc, y, x, velocity, endDie, hdReg, doRemove;
function Bomb (t_data) {
super(t_data);
__owner = t_data.owner;
bombType = t_data.type;
__flightTimer = 0;
__arcY = 0;
__bombDescription = "";
__bombActivated = false;
hasExploded = false;
inFlight = false;
__bombState = "";
__bombCountdown = __DEFAULT_BOMB_TIMER;
__neutralThrow = false;
__bouncesRemaining = 0;
__totalFlightTime = 0;
if (t_data.timer > 0) {
__bombCountdown = t_data.timer;
}
}
function updateAndRender(dt) {
mc.cacheAsBitmap = true;
if ((__flightTimer > 0) && (__bombActivated == false)) {
if (__bombCountdown > 0) {
if (__bombCountdown == __DEFAULT_BOMB_TIMER) {
__bombState = "off";
} else if (__bombCountdown > __HALF_BOMB_TIMER) {
__bombState = "on";
} else if (__bombCountdown > (__HALF_BOMB_TIMER / 2)) {
__bombState = "slow";
} else {
__bombState = "fast";
}
}
if (y < 0) {
}
__flightTimer = __flightTimer - dt;
if (__flightTimer <= 0) {
mc.bomb.shadow._y = 12;
if (__neutralThrow == false) {
__bombActivated = true;
}
__neutralThrow = false;
inFlight = false;
if (__bouncesRemaining <= 0) {
__bouncesRemaining = 0;
}
if (x < 20) {
x = 20;
} else if (x > 580) {
x = 580;
}
if (y < 50) {
y = 50;
} else if (y > 380) {
y = 380;
}
__bouncesRemaining--;
} else {
var _local5 = __flightTimer / __totalFlightTime;
var _local4 = Math.cos(_local5 * Math.PI);
__arcY = _local4 * __ARC_HEIGHT;
y = y + (__arcY * dt);
mc.bomb.shadow._y = mc.bomb.shadow._y - (__arcY * dt);
if (__neutralThrow == false) {
if ((x < 0) || (x > 580)) {
velocity.x = velocity.x * -1;
}
if ((y < 50) || (y > 380)) {
velocity.y = velocity.y * -1;
}
if (y < 50) {
y = 50;
} else if (y > 380) {
y = 380;
}
}
}
} else {
velocity.x = 0;
velocity.y = 0;
if (__bombActivated == true) {
__bombCountdown = __bombCountdown - dt;
if (__bombCountdown > __HALF_BOMB_TIMER) {
__bombState = "on";
} else if (__bombCountdown > (__HALF_BOMB_TIMER / 2)) {
__bombState = "slow";
} else if (__bombCountdown > 0) {
__bombState = "fast";
} else {
__bombState = "splode";
}
} else {
__bombState = "off";
}
}
if ((__bombState == "splode") && (mc.bomb.bomb._currentframe >= mc.bomb.bomb._totalframes)) {
if (hasExploded == false) {
trace("trying to splode");
explode();
} else if (mc.bomb.bomb._currentFrame == mc.bomb.bomb._totalframes) {
endDie();
}
}
if (x < 20) {
x = 20;
} else if (x > 580) {
x = 580;
}
mc.bomb.gotoAndStop(__bombState);
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
mc.gotoAndStop(__bombDescription);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
function explode() {
hasExploded = true;
__owner.explosion(x, y);
}
function chainExplosion() {
__bombCountdown = 0.0001;
__bombActivated = true;
}
function throwMe(xDir, yDir, bounces) {
inFlight = true;
velocity = new smashing.Point3D(xDir - x, yDir - y, 0);
__flightTimer = velocity.__get__length() / __THROWN_VELOCITY;
__totalFlightTime = __flightTimer;
velocity.normalizeMe();
velocity.x = velocity.x * __THROWN_VELOCITY;
velocity.y = velocity.y * __THROWN_VELOCITY;
__bouncesRemaining = bounces;
__bombActivated = false;
trace(__flightTimer);
}
function dropMe(xDir, yDir) {
inFlight = true;
velocity = new smashing.Point3D(xDir - x, yDir - y, 0);
__flightTimer = velocity.__get__length() / __THROWN_VELOCITY;
__totalFlightTime = __flightTimer;
velocity.normalizeMe();
velocity.x = velocity.x * __THROWN_VELOCITY;
velocity.y = velocity.y * __THROWN_VELOCITY;
__bouncesRemaining = 0;
__bombActivated = false;
__neutralThrow = true;
}
function lobMe(xDir, yDir) {
__flightTimer = 0.25;
inFlight = true;
velocity = new smashing.Point3D(xDir, yDir, 0);
velocity.normalizeMe();
velocity.x = velocity.x * (__THROWN_VELOCITY / 2);
velocity.y = velocity.y * (__THROWN_VELOCITY / 2);
__bouncesRemaining = 0;
__bombActivated = false;
}
function pickedUp() {
__flightTimer = 0;
__bombActivated = false;
inFlight = true;
doRemove = true;
mc._visible = false;
}
function get bombDesc() {
return(__bombDescription);
}
function get bombTimer() {
return(__bombCountdown);
}
var TYPE = "bomb";
var DRAWTYPE = "entity";
var __DEF_ASSET = "bombs_all_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 40;
var __DEF_HD_HEIGHT = 60;
var __USE_DIMENSIONS_AS_HD = true;
var CUSTOMDRAW = true;
var __DEFAULT_BOMB_TIMER = 8;
var __HALF_BOMB_TIMER = 4;
var __THROWN_VELOCITY = 500;
var __THROWN_TIMER = 0.5;
var __ARC_HEIGHT = 200;
var __USES_VELOCITY = true;
}
Symbol 709 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Bombs.Stinker] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Bombs.Stinker extends cartoonnetwork.reanimated.picklebomb.ents.Bomb
{
var __bombDescription;
function Stinker (t_data) {
super(t_data);
__bombDescription = "stinker";
}
function explode() {
super.explode();
}
}
Symbol 710 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Bombs.Flower] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Bombs.Flower extends cartoonnetwork.reanimated.picklebomb.ents.Bomb
{
var __bombDescription, hasExploded, __owner, x, y;
function Flower (t_data) {
super(t_data);
__bombDescription = "flower";
}
function explode() {
hasExploded = true;
__owner.repair(x, y);
}
}
Symbol 711 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Bombs.Scrambler] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Bombs.Scrambler extends cartoonnetwork.reanimated.picklebomb.ents.Bomb
{
var __bombDescription, hasExploded, __owner, x;
function Scrambler (t_data) {
super(t_data);
__bombDescription = "scrambler";
}
function explode() {
super.explode();
hasExploded = true;
__owner.randomizeBombs(x);
}
}
Symbol 712 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Bombs.Splitter] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Bombs.Splitter extends cartoonnetwork.reanimated.picklebomb.ents.Bomb
{
var __bombDescription, hasExploded, __owner, x, y;
function Splitter (t_data) {
super(t_data);
__bombDescription = "splitter";
}
function explode() {
hasExploded = true;
__owner.splitterExplosion(x, y);
}
}
Symbol 713 MovieClip [__Packages.cartoonnetwork.reanimated.picklebomb.ents.Stink] Frame 0
class cartoonnetwork.reanimated.picklebomb.ents.Stink extends cartoonnetwork.reanimated.picklebomb.ents.Entity
{
var velocity, hdReg;
function Stink (t_data) {
super(t_data);
velocity = new smashing.Point3D(0, 0, 0);
}
function updateAndRender(dt) {
super.updateAndRender(dt);
}
function onDraw(pNewMC) {
super.onDraw(pNewMC);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 47;
hdReg.y = 34;
}
function explode() {
}
var TYPE = "stink";
var DRAWTYPE = "grass";
var __DEF_ASSET = "stink_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 60;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 95;
var __DEF_HD_HEIGHT = 69;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
}
Symbol 82 MovieClip Frame 52
stop();
Symbol 128 MovieClip Frame 24
stop();
Symbol 186 MovieClip Frame 15
stop();
Symbol 187 MovieClip Frame 15
stop();
Symbol 194 Button
on (release) {
gotoAndPlay ("outro");
}
Symbol 212 MovieClip Frame 21
stop();
Symbol 213 MovieClip Frame 21
stop();
Symbol 214 MovieClip Frame 29
stop();
Symbol 214 MovieClip Frame 41
play();
_parent.checkForCheats();
Symbol 214 MovieClip Frame 66
stop();
_parent.onScreenOutroComplete();
Symbol 259 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 65
stop();
Symbol 287 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 13
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 18
stop();
Symbol 303 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 21
stop();
Symbol 310 MovieClip Frame 1
stop();
Symbol 311 MovieClip [bombs_all_mc] Frame 1
stop();
Symbol 334 Button
on (release) {
_parent.gotoAndPlay("outro");
}
Symbol 348 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 7
play();
Symbol 348 MovieClip Frame 15
stop();
_parent.onScreenOutroComplete();
Symbol 348 MovieClip Frame 19
play();
Symbol 393 MovieClip Frame 2
stop();
Symbol 393 MovieClip Frame 10
play();
Symbol 393 MovieClip Frame 48
_parent.countDownComplete();
Symbol 400 MovieClip Frame 1
stop();
Symbol 401 MovieClip Frame 2
stop();
Symbol 401 MovieClip Frame 10
play();
Symbol 401 MovieClip Frame 13
_parent.onpopupUp();
Symbol 401 MovieClip Frame 80
_parent.onpopupOut();
Symbol 418 MovieClip Frame 15
stop();
Symbol 419 MovieClip Frame 15
stop();
Symbol 421 Button
on (release) {
_parent._parent.onPressPlayAgain();
}
Symbol 424 MovieClip Frame 20
stop();
Symbol 425 MovieClip Frame 1
play();
Symbol 425 MovieClip Frame 6
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 50
stop();
Symbol 476 MovieClip Frame 50
stop();
Symbol 480 MovieClip Frame 50
stop();
Symbol 485 MovieClip [jimmy_main] Frame 1
stop();
Symbol 485 MovieClip [jimmy_main] Frame 262
stop();
Symbol 497 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 1
stop();
Symbol 599 MovieClip Frame 240
stop();
Symbol 620 Button
on (release) {
_parent._parent._parent.onPressHelp();
}
Symbol 623 Button
on (release) {
_parent._parent._parent.onPressToggleMusic();
}
Symbol 626 Button
on (release) {
_parent._parent._parent.onPressToggleMusic();
}
Symbol 629 MovieClip Frame 26
stop();
Symbol 634 MovieClip Frame 13
stop();
Symbol 635 MovieClip Frame 23
stop();
Symbol 639 MovieClip [scoreboard_mc] Frame 9
stop();
Symbol 639 MovieClip [scoreboard_mc] Frame 19
play();
Symbol 639 MovieClip [scoreboard_mc] Frame 103
stop();
_parent._parent._parent.onWinAnimComplete();
Symbol 639 MovieClip [scoreboard_mc] Frame 104
play();
Symbol 639 MovieClip [scoreboard_mc] Frame 121
stop();
_parent._parent._parent.onScreenOutroComplete();
Symbol 659 MovieClip [pickles_ani_mc] Frame 58
stop();
Symbol 673 MovieClip [pickles_win_mc] Frame 1
stop();
Symbol 673 MovieClip [pickles_win_mc] Frame 48
stop();
Symbol 674 MovieClip [pickles_lose_mc] Frame 1
stop();
Symbol 674 MovieClip [pickles_lose_mc] Frame 18
stop();
Symbol 676 MovieClip Frame 1
txt_round.text = "Round " + _parent._parent.levelNum;
Symbol 678 MovieClip [round_text_mc] Frame 42
stop();
Symbol 680 MovieClip [__project] Frame 1
#initclip 34
Object.registerClass("__project", cartoonnetwork.reanimated.picklebomb.Engine);
#endinitclip