Frame 1
function link_mobclub() {
trace("_root::link_mobclub invoked");
getURL ("http://www.mobclub.com", "_blank");
_root.kvClick(345);
}
function link_kerb() {
trace("_root::link_kerb invoked");
getURL ("http://www.kerb.co.uk", "_blank");
_root.kvClick(344);
}
function link_uctv() {
trace("_root::link_uctv invoked");
getURL ("http://uc.tv", "_blank");
_root.kvClick(346);
}
function link_freeloader() {
trace("_root::link_freeloader invoked");
getURL ("http://www.freeloader.com", "_blank");
_root.kvClick(344);
}
function preloaderStage2() {
var _local1 = getTimer() - t0;
if (_local1 > tTotal) {
trace(("preloading stage 2 took " + _local1) + " ms");
preloader_mc.plc.dispose();
delete onEnterFrame;
gotoAndStop (2);
} else {
var _local2 = 100 - realPercentageOfTotalPreloaderTime;
var _local3 = realPercentageOfTotalPreloaderTime + Math.ceil((_local2 * _local1) / tTotal);
preloader_mc.gotoAndStop(_local3);
}
}
function preloaderStage1() {
var _local2 = this.getBytesLoaded();
var _local3 = this.getBytesTotal();
if ((_local2 > 0) && (_local3 > 0)) {
if (_local2 >= _local3) {
tTotal = getTimer() - t0;
t0 = getTimer();
trace(("preloading stage 1 took " + tTotal) + " ms");
tTotal = ((100 * tTotal) / realPercentageOfTotalPreloaderTime) - tTotal;
trace(("next should take " + tTotal) + " ms");
onEnterFrame = preloaderStage2;
} else {
var _local4 = Math.ceil((realPercentageOfTotalPreloaderTime * _local2) / _local3);
preloader_mc.gotoAndStop(_local4);
}
}
}
stop();
Branding.mode = Branding.MOBCLUB_UCTV;
_root._xscale = (_root._yscale = 100);
if (Branding.mode == Branding.MOBCLUB_UCTV) {
loadMovieNum ("http://watches.whodidit.co.uk/watch74.swf", 10);
} else {
loadMovieNum ("http://watches.whodidit.co.uk/watch78.swf", 10);
}
i = -16734;
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:198, td:"198.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_mc.kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", i - 1);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
var realPercentageOfTotalPreloaderTime = 35;
var t0 = 0;
var tTotal = 0;
t0 = getTimer();
onEnterFrame = preloaderStage1;
Frame 2
stop();
Main.instance().setup(this);
Frame 3
readyForTransition();
stop();
Frame 4
stop();
Main.instance().setupMainMenu();
Frame 29
readyForTransition();
stop();
Frame 30
play();
Frame 69
stop();
Main.instance().setupInstructions();
Frame 110
readyForTransition();
stop();
Frame 111
play();
Frame 183
Main.instance().setupUCTVButton();
Frame 194
stop();
Main.instance().setupEndScreen();
Frame 244
readyForTransition();
stop();
Frame 245
play();
Frame 408
stop();
Main.instance().setupEndScreen();
Frame 464
readyForTransition();
stop();
Frame 465
stop();
Main.instance().setupGame();
Frame 485
readyForTransition();
stop();
Symbol 37 MovieClip Frame 430
gotoAndPlay ("loop");
Symbol 54 MovieClip Frame 1
var plc = new PreloaderLogoCycler(this);
Symbol 561 MovieClip [__Packages.Branding] Frame 0
class Branding
{
function Branding () {
}
static var SWITCH_LOGO_PERIOD = 18000;
static var MOBCLUB_UCTV = 0;
static var MOBCLUB_FREELOADER = 1;
static var mode = -1;
}
Symbol 562 MovieClip [__Packages.PreloaderLogoCycler] Frame 0
class PreloaderLogoCycler
{
function PreloaderLogoCycler (clip) {
_clip = clip;
_clip.mobclub_mc.onRelease = _root.link_mobclub;
_clip.uctv_mc.onRelease = _root.link_uctv;
_clip.freeloader_mc.onRelease = _root.link_freeloader;
if (Branding.mode == Branding.MOBCLUB_UCTV) {
_clip.mobclub_mc._visible = false;
_clip.freeloader_mc._visible = false;
} else if (Branding.mode == Branding.MOBCLUB_FREELOADER) {
_interval = new uk.kerb.utils.Interval(this, "_switchAdverts", Branding.SWITCH_LOGO_PERIOD);
_clip.uctv_mc._visible = false;
_clip.freeloader_mc._visible = false;
}
}
function _switchAdverts() {
if (Branding.mode == Branding.MOBCLUB_FREELOADER) {
if (_clip.mobclub_mc._visible) {
_clip.mobclub_mc._visible = false;
_clip.freeloader_mc._visible = true;
} else {
_clip.mobclub_mc._visible = true;
_clip.freeloader_mc._visible = false;
}
}
}
function dispose() {
if (_interval != null) {
_interval.dispose();
_interval = null;
}
}
var _clip = null;
var _interval = null;
}
Symbol 563 MovieClip [__Packages.uk.kerb.utils.Interval] Frame 0
class uk.kerb.utils.Interval
{
function Interval (objectReference, methodName, period) {
_objectReference = objectReference;
_methodName = methodName;
_period = period;
_interval = setInterval(objectReference, methodName, period);
_t0 = getTimer();
}
function get t0() {
return(_t0);
}
function get isPaused() {
return(_interval == -1);
}
function pause() {
if (_interval >= 0) {
dispose();
}
}
function resume() {
if (_interval == -1) {
_interval = setInterval(_objectReference, _methodName, _period);
}
}
function dispose() {
clearInterval(_interval);
_interval = -1;
}
function toString() {
return(String(getTimer() - _t0));
}
var _interval = -1;
var _objectReference = null;
var _methodName = null;
var _period = 0;
var _t0 = 0;
}
Symbol 564 MovieClip [__Packages.Main] Frame 0
class Main
{
var _timeline, _interface, _transition;
function Main () {
}
static function instance() {
if (_instance == undefined) {
_instance = new Main();
}
return(_instance);
}
function setup(t1) {
_timeline = t1;
_interface = t1.interface_mc;
_transition = t1.transition_mc;
_interface.pause_mc._visible = false;
Sounds.init();
Sounds.initButton(_interface.snd_mc);
_transition.onTransitionClosed = uk.kerb.utils.EventDelegate.create(this, onTransitionClosed);
transitionTo(NEXT_ACTION_SHOW_MENU);
_interface.mobclub_mc.onRelease = _root.link_mobclub;
_interface.uctv_mc.onRelease = _root.link_uctv;
_interface.freeloader_mc.onRelease = _root.link_freeloader;
_interface.freeloader_mc._visible = false;
_interface.uctv_mc._visible = false;
_adInterval = new uk.kerb.utils.Interval(this, "_switchAdverts", Branding.SWITCH_LOGO_PERIOD);
}
function _switchAdverts() {
if (Branding.mode == Branding.MOBCLUB_UCTV) {
if (_interface.mobclub_mc._visible) {
_interface.mobclub_mc._visible = false;
_interface.uctv_mc._visible = true;
} else {
_interface.mobclub_mc._visible = true;
_interface.uctv_mc._visible = false;
}
} else if (Branding.mode == Branding.MOBCLUB_FREELOADER) {
if (_interface.mobclub_mc._visible) {
_interface.mobclub_mc._visible = false;
_interface.freeloader_mc._visible = true;
} else {
_interface.mobclub_mc._visible = true;
_interface.freeloader_mc._visible = false;
}
}
}
function setupMainMenu() {
_timeline.play_mc.onRelease = uk.kerb.utils.EventDelegate.create(this, transitionTo, NEXT_ACTION_PLAY_GAME);
_timeline.instructions_mc.onRelease = uk.kerb.utils.EventDelegate.create(this, transitionTo, NEXT_ACTION_SHOW_INSTRUCTIONS);
}
function setupInstructions() {
_timeline.panel_mc.back_btn.onRelease = uk.kerb.utils.EventDelegate.create(this, transitionTo, NEXT_ACTION_SHOW_MENU);
}
function showInstructionsPage(page) {
_timeline.panel_mc.gotoAndStop(page);
_timeline.panik_mc.gotoAndStop(page);
}
function setupUCTVButton() {
_timeline.uctv_mc.onRelease = _root.link_uctv;
}
function setupEndScreen() {
Key.addListener(this);
_timeline.button_mc.onRelease = uk.kerb.utils.EventDelegate.create(this, transitionTo, NEXT_ACTION_SHOW_MENU);
}
function onKeyDown() {
if (Key.getCode() == 32) {
Key.removeListener(this);
transitionTo(NEXT_ACTION_SHOW_MENU);
}
}
function setupGame() {
_game = new Game(_timeline.game, _interface);
_game.start();
}
function onTransitionClosed() {
if (((_currentAction == NEXT_ACTION_SHOW_MENU) || (_currentAction == NEXT_ACTION_SHOW_INSTRUCTIONS)) && ((_nextAction != NEXT_ACTION_SHOW_MENU) && (_nextAction != NEXT_ACTION_SHOW_INSTRUCTIONS))) {
Sounds.stopSound("MusicLoop");
Sounds.playSound("MusicLoopGame", -1);
}
if (((_currentAction != NEXT_ACTION_SHOW_MENU) && (_currentAction != NEXT_ACTION_SHOW_INSTRUCTIONS)) && ((_nextAction == NEXT_ACTION_SHOW_MENU) || (_nextAction == NEXT_ACTION_SHOW_INSTRUCTIONS))) {
Sounds.stopSound("MusicLoopGame");
Sounds.playSound("MusicLoop", -1);
}
if (_currentAction == NEXT_ACTION_PLAY_GAME) {
_game.destroy();
}
switch (_nextAction) {
case NEXT_ACTION_GAME_OVER :
_timeline.gotoAndPlay("gameover");
break;
case NEXT_ACTION_GAME_WON :
_timeline.gotoAndPlay("gamewon");
break;
case NEXT_ACTION_PLAY_GAME :
_timeline.gotoAndPlay("game");
break;
case NEXT_ACTION_SHOW_INSTRUCTIONS :
_timeline.gotoAndPlay("instructions");
break;
case NEXT_ACTION_SHOW_MENU :
_timeline.gotoAndStop("menu");
}
_currentAction = _nextAction;
_nextAction = -1;
}
function transitionTo(next) {
_nextAction = next;
_timeline.readyForTransition = uk.kerb.utils.EventDelegate.create(_transition, _transition.play);
_timeline.play();
}
static var _instance = null;
static var NEXT_ACTION_PLAY_GAME = 0;
static var NEXT_ACTION_SHOW_INSTRUCTIONS = 1;
static var NEXT_ACTION_SHOW_MENU = 2;
static var NEXT_ACTION_GAME_OVER = 3;
static var NEXT_ACTION_GAME_WON = 4;
var _game = null;
var _nextAction = -1;
var _currentAction = -1;
var _adInterval = null;
}
Symbol 565 MovieClip [__Packages.Game] Frame 0
class Game
{
function Game (clip, iface) {
_clip = clip;
_interface = iface;
}
function start() {
_controller = new Controller(_clip.container_mc, _interface, _score);
_controller.addListener(this);
_controller.addPlayer(_clip.container_mc._width / 2);
_setupLevel();
_controller.halt();
_clip.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, _update);
_doLevelIntro();
}
function _update() {
_controller.update();
}
function onLifeLost() {
var _local2 = _controller.__get__lives();
if (_local2 == 3) {
_interface.lives_mc.gotoAndStop(1);
} else if (_local2 == 2) {
_interface.lives_mc.gotoAndStop(2);
} else if (_local2 == 1) {
_interface.lives_mc.gotoAndStop(3);
} else {
_interface.lives_mc.gotoAndStop(4);
}
_restartLevel();
_controller.start();
}
function onGameOver() {
Sounds.stopSound("MusicLoopGame");
_controller.halt();
_gameOverClip = _clip.attachMovie(SYMBOL_GAME_OVER_MESSAGE, SYMBOL_GAME_OVER_MESSAGE + "_mc", _clip.getNextHighestDepth(), {_x:316, _y:210});
_gameOverClip.showGameOverScreen = uk.kerb.utils.EventDelegate.create(this, _showGameOverScreen);
}
function _showGameOverScreen() {
_gameOverClip.removeMovieClip();
_gameOverClip = null;
Sounds.playSound("kerb panik game over");
_clip.container_mc._visible = (_clip.level_mc._visible = false);
Main.instance().transitionTo(Main.NEXT_ACTION_GAME_OVER);
Key.removeListener(this);
}
function _restartLevel() {
_controller.reset();
_setupLevel();
}
function onLevelComplete() {
_controller.halt();
Sounds.playSound("LevelComplete");
_level++;
if (_level == NUMBER_OF_LEVELS) {
_showLevelScore();
} else {
_nextLevelClip = _clip.attachMovie(SYMBOL_NEXT_LEVEL, SYMBOL_NEXT_LEVEL + "_mc", _clip.getNextHighestDepth(), {_x:316, _y:210});
_nextLevelClip.showLevelScore = uk.kerb.utils.EventDelegate.create(this, _showLevelScore);
}
}
function _showLevelScore() {
_clip.container_mc._visible = (_clip.level_mc._visible = false);
if (_nextLevelClip != null) {
_nextLevelClip.removeMovieClip();
_nextLevelClip = null;
}
_applyBonus();
_resultsMoveScreen = _clip.attachMovie(SYMBOL_RESULTS_MOVE_SCREEN, SYMBOL_RESULTS_MOVE_SCREEN + "_mc", _clip.getNextHighestDepth(), {_x:3, _y:7});
_resultsMoveScreen.applyBonus = uk.kerb.utils.EventDelegate.create(this, _applyBonus);
}
function _applyBonus() {
_score = _score + _controller.score;
_levelBonus = 100 * _controller.getTimeRemaining();
_resultsMoveScreen.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, _doApplyBonus);
}
function _doApplyBonus() {
_resultsMoveScreen.bonus_txt.text = _levelBonus.toString();
_resultsMoveScreen.score_txt.text = _score.toString();
if (_levelBonus > 0) {
if (_levelBonus >= 500) {
_levelBonus = _levelBonus - 500;
_score = _score + 500;
} else {
_score = _score + _levelBonus;
_levelBonus = 0;
}
} else {
delete _resultsMoveScreen.onEnterFrame;
_resultsMoveScreen.attachMovie(SYMBOL_NEXT_LEVEL_BUTTON, SYMBOL_NEXT_LEVEL_BUTTON + "_mc", _resultsMoveScreen.getNextHighestDepth(), {_x:300, _y:320});
_resultsMoveScreen[SYMBOL_NEXT_LEVEL_BUTTON + "_mc"].assignLevelHandler = uk.kerb.utils.EventDelegate.create(this, _assignNextLevelButtonEventHandler);
}
}
function _assignNextLevelButtonEventHandler(nextLevelButtonClip) {
Key.addListener(this);
nextLevelButtonClip.onRelease = uk.kerb.utils.EventDelegate.create(this, foobar);
}
function onKeyDown() {
var _local2 = Key.getCode();
if (_local2 == 32) {
foobar();
}
}
function foobar() {
Key.removeListener(this);
if (_level < NUMBER_OF_LEVELS) {
_resultsMoveScreen.removeMovieClip();
_resultsMoveScreen = null;
_clip.container_mc._visible = (_clip.level_mc._visible = true);
_restartLevel();
_doLevelIntro();
} else {
_doGameComplete();
}
}
function _doLevelIntro() {
_controller.halt(false);
_controller.start();
}
function _doGameComplete() {
_controller.halt();
Sounds.stopSound("MusicLoopGame");
Sounds.playSound("endgame");
_clip.container_mc._visible = (_clip.level_mc._visible = false);
Main.instance().transitionTo(Main.NEXT_ACTION_GAME_WON);
Key.removeListener(this);
}
function _setupLevel() {
switch (_level) {
case 0 :
_controller.addBall(300, 200);
break;
case 1 :
_controller.addBall(100, 250);
_controller.addPlatform(120, 140);
break;
case 2 :
_controller.addBall(100, 250);
_controller.addPlatform(90, 180);
_controller.addPlatform(280, 140);
break;
case 3 :
_controller.addBall(100, 250);
_controller.addPlatform(80, 190, 27);
_controller.addPlatform(300, 180);
break;
case 4 :
_controller.addBall(100, 250);
_controller.addBall(300, 250);
_controller.addPlatform(100, 180);
break;
}
var _local2 = _level + 1;
_clip.attachMovie("level" + _local2.toString(), "level_mc", _clip.level_mc.getDepth(), {_x:_clip.level_mc._x, _y:_clip.level_mc._y});
}
function destroy() {
_clip.removeMovieClip();
Sounds.stopSound("MusicLoopGame");
}
static var SYMBOL_NEXT_LEVEL = "next_level";
static var SYMBOL_UI_INTRO = "ui_intro";
static var SYMBOL_NEXT_LEVEL_BUTTON = "next_level_button";
static var SYMBOL_RESULTS_MOVE_SCREEN = "results_move_screen";
static var SYMBOL_GAME_OVER_MESSAGE = "game_over_message";
static var NUMBER_OF_LEVELS = 5;
var _controller = null;
var _clip = null;
var _interface = null;
var _nextLevelClip = null;
var _gameOverClip = null;
var _resultsMoveScreen = null;
var _level = 0;
var _score = 0;
var _levelBonus = 0;
var _interval = 0;
}
Symbol 566 MovieClip [__Packages.Controller] Frame 0
class Controller
{
function Controller (clip, iface, score) {
AsBroadcaster.initialize(this);
_a = [];
_p = [];
_powerUps = [];
_clip = clip;
_interface = iface;
_bounds = _clip.createEmptyMovieClip("bounds_mc", _clip.getNextHighestDepth());
_bounds.beginFill(16777215);
_bounds.lineStyle(0, 0);
_bounds.lineTo(0, 0);
_bounds.lineTo(_clip._width, 0);
_bounds.lineTo(_clip._width, _clip._height);
_bounds.lineTo(0, _clip._height);
_bounds.lineTo(0, 0);
_bounds.endFill();
_bounds._visible = false;
_resetOxygenTank();
_score_txt = _interface.score_txt;
_score_txt.text = score.toString();
_score = score;
}
function get score() {
return(_score);
}
function start() {
halt();
_resetOxygenTank();
_interval = setInterval(this, "_realStart", 1000);
}
function getTimeRemaining() {
var _local2 = getTimer() - _t0;
return(Math.floor((TIME_ALLOWED - _local2) / 1000));
}
function _realStart() {
clearInterval(_interval);
_resetOxygenTank();
Sounds.playSound("StartGame");
halt(false);
_interface.pause_mc.gotoAndStop(2);
_interface.pause_mc._visible = true;
_interface.pause_mc.onRelease = uk.kerb.utils.EventDelegate.create(this, _onPauseOrResumeClicked);
}
function _onPauseOrResumeClicked() {
if (_paused) {
_interface.pause_mc.gotoAndStop(2);
_paused = false;
_t0 = _t0 + (getTimer() - _pause_t0);
} else {
_interface.pause_mc.gotoAndStop(1);
_paused = true;
_pause_t0 = getTimer();
}
}
function addBall(x, y) {
_a.push(new Ball(_clip, _bounds, x, y));
}
function addPlatform(x, y, scale) {
_p.push(new Platform(_clip, _bounds, x, y, _p.length, scale));
}
function addPlayer(x) {
_player = new Player(_clip, _bounds, x);
_player.addListener(this);
}
function removeBall(b) {
var _local2 = 0;
while (_local2 < _a.length) {
if (_a[_local2] == b) {
_a.splice(_local2, 1);
break;
}
_local2++;
}
}
function removePowerup(powerup) {
var _local2 = 0;
while (_local2 < _powerUps.length) {
if (_powerUps[_local2] == powerup) {
_powerUps.splice(_local2, 1);
break;
}
_local2++;
}
}
function onRemovePowerup() {
var _local3 = [];
var _local2 = 0;
while (_local2 < _powerUps.length) {
if (_powerUps[_local2].finished) {
_local3.push(_powerUps[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < _local3.length) {
removePowerup(_local3[_local2]);
_local2++;
}
}
function onFireWeapon() {
Sounds.playSound("LazorSound");
}
function onDeathComplete() {
if (_player.lives >= 0) {
_resetOxygenTank();
_player.x = _clip._width / 2;
broadcastMessage(ON_LIFE_LOST);
} else {
broadcastMessage(ON_GAME_OVER);
}
}
function _resetOxygenTank() {
_t0 = getTimer();
}
function update() {
if (_halted || (_paused)) {
return(undefined);
}
if (frozen) {
_t0 = _t0 + (getTimer() - _lastTime);
}
_lastTime = getTimer();
var _local7 = getTimer() - _t0;
if (frozen) {
if ((getTimer() - _frozen_t0) > BALL_FREEZE_PERIOD) {
frozen = false;
}
}
if (!_player.dying) {
if (_local7 > TIME_ALLOWED) {
_killPlayer();
} else {
_interface.time_txt.text = getTimeRemaining();
}
}
var _local2 = null;
var _local5 = _a.slice();
var _local6 = _local5.length;
var _local4 = 0;
while (_local4 < _local6) {
_local2 = _local5[_local4];
if (!frozen) {
_local2.vy = _local2.vy + GRAVITY;
}
if (!_cdBallContainer(_local2)) {
_cdBallPlatform(_local2);
}
_cdBallWeapon(_local2);
if ((!frozen) && (!_player.invulnerable)) {
_cdBallPlayer(_local2);
}
if (!frozen) {
_local2.x = _local2.x + _local2.vx;
_local2.y = _local2.y + _local2.vy;
}
_local2.update();
_local4++;
}
_player.checkKeys();
_cdPlayerContainer();
_player.x = _player.x + _player.vx;
_player.update();
_cdWeaponPlatform();
var _local3 = null;
_local5 = _powerUps.slice();
_local6 = _local5.length;
_local4 = 0;
while (_local4 < _powerUps.length) {
_local3 = _local5[_local4];
if (!_local3.atRest) {
_local3.vy = _local3.vy + GRAVITY;
}
if (!_cdPowerupPlayer(_local3)) {
_cdPowerupContainer(_local3);
}
_local3.y = _local3.y + _local3.vy;
_local3.update();
_local4++;
}
}
function _cdPowerupPlayer(powerup) {
var _local3 = false;
if (((!powerup.pickedUp) && (!powerup.disappearing)) && (powerup.hitTest(_player.getClip()))) {
powerup.pickup();
_activatePowerup(powerup);
_local3 = true;
}
return(_local3);
}
function _activatePowerup(powerup) {
switch (powerup.type) {
case Powerup.BOMB :
Sounds.playSound("PickUpBomb");
splitAllNonSmallest();
_checkLevelComplete();
break;
case Powerup.DOUBLE :
Sounds.playSound("PickUpDouble");
_player.giveDouble();
break;
case Powerup.FREEZE :
Sounds.playSound("PickUpFreeze");
_freezeAll();
break;
case Powerup.GRAPPLE :
Sounds.playSound("PickUpGrapple");
_player.giveGrapple();
break;
case Powerup.LAZER :
Sounds.playSound("PickUpLazer");
trace("TODO! lazer");
break;
case Powerup.OXYGEN :
Sounds.playSound("PickUpOxygen");
_t0 = Math.min(_t0 + OXYGEN_BONUS, getTimer());
break;
case Powerup.POWER :
Sounds.playSound("PickUpShield");
_player.makeInvulnerable();
break;
}
}
function _freezeAll() {
frozen = true;
_frozen_t0 = getTimer();
_lastTime = getTimer();
}
function _cdPowerupContainer(powerup) {
var _local2 = false;
if (((powerup.y + powerup.vy) - powerup.__get__height()) < 0) {
powerup.vy = 0;
powerup.y = powerup.height;
powerup.atRest = true;
_local2 = true;
}
return(_local2);
}
function _cdBallPlayer(b) {
var _local2 = false;
if (b.hitTest(_player.getClip())) {
_killPlayer();
}
return(_local2);
}
function _killPlayer() {
_player.__get__weapon().retract();
popAll();
disappearAllPowerups();
Sounds.playSound("dead");
_player.die();
if (!_player.hasNormal()) {
_player.giveNormal();
}
_interface.pause_mc._visible = false;
}
function _cdBallWeapon(b) {
var _local2 = false;
var _local3 = _player.__get__weapon();
if (_local3.isFired) {
_local2 = b.hitTest(_local3.getClip());
if (_local2) {
Sounds.playSound("PopSound");
splitOne(b, _nonSmallBalls());
_local3.retract();
_checkLevelComplete();
}
}
return(_local2);
}
function _checkLevelComplete() {
if ((_a.length == 0) && (!_halted)) {
_interface.pause_mc._visible = false;
broadcastMessage(ON_LEVEL_COMPLETE);
}
}
function _cdPlayerContainer() {
var _local2 = false;
if (((_player.x + _player.vx) - _player.__get__width()) < 0) {
_player.vx = 0;
_player.x = _player.width;
} else if (((_player.x + _player.vx) + _player.__get__width()) > _bounds._width) {
_player.vx = 0;
_player.x = _bounds._width - _player.__get__width();
}
return(_local2);
}
function _cdBallContainer(b) {
var _local3 = false;
if (((b.x + b.vx) - b.__get__radius()) < 0) {
b.vx = b.vx * -1;
_local3 = true;
} else if (((b.x + b.vx) + b.__get__radius()) > _bounds._width) {
b.vx = b.vx * -1;
_local3 = true;
}
if (((b.y + b.vy) - b.__get__radius()) < 0) {
_bounceOffFloor(b);
_local3 = true;
} else if (((b.y + b.vy) + b.__get__radius()) > _bounds._height) {
b.y = (_bounds._height - b.__get__radius()) - COLLISION_CORRECTION;
b.vy = b.vy * -1;
_local3 = true;
}
if (_local3) {
Sounds.playSound("bounce");
}
return(_local3);
}
function _cdWeaponPlatform() {
var _local6 = false;
var _local7 = _p.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local2 = _player.__get__weapon();
var _local5 = _p[_local3];
var _local4 = _local5.getBottom();
if ((_local2.isFired && (!_local2.isEmbedded)) && (_local2.hitTest(_local4))) {
_local2.embed();
_local6 = true;
}
if (_local6) {
break;
}
_local3++;
}
return(_local6);
}
function _cdBallPlatform(b) {
var _local4 = false;
var _local3 = 0;
while (_local3 < _p.length) {
if (b.hitTest(_p[_local3].getTop())) {
b.y = b.y + COLLISION_CORRECTION;
b.vy = b.vy * (-ELASTICITY);
_local4 = true;
} else if (b.hitTest(_p[_local3].getBottom())) {
b.y = b.y - COLLISION_CORRECTION;
b.vy = b.vy * (-ELASTICITY);
_local4 = true;
}
if (b.hitTest(_p[_local3].getLeft())) {
b.x = b.x - COLLISION_CORRECTION;
b.vx = b.vx * -1;
_local4 = true;
} else if (b.hitTest(_p[_local3].getRight())) {
b.x = b.x + COLLISION_CORRECTION;
b.vx = b.vx * -1;
_local4 = true;
}
if (_local4) {
break;
}
_local3++;
}
if (_local4) {
Sounds.playSound("bounce");
}
return(_local4);
}
function _bounceOffFloor(b) {
switch (b.size) {
case 4 :
b.vy = 12;
break;
case 3 :
b.vy = 10;
break;
default :
b.vy = 8;
}
}
function popAll() {
var _local4 = _a.slice();
var _local5 = _local4.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local4[_local2];
_local3.burst();
removeBall(_local3);
_local2++;
}
}
function disappearAllPowerups() {
var _local4 = _powerUps.slice();
var _local5 = _local4.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local4[_local2];
_local3.disappear();
_local2++;
}
}
function splitAllNonSmallest() {
var _local3 = _a.slice();
var _local5 = _local3.length;
var _local4 = _nonSmallBalls();
var _local2 = 0;
while (_local2 < _local5) {
if (_local3[_local2].size > 1) {
splitOne(_local3[_local2], _local4);
}
_local2++;
}
}
function splitOne(b, nonSmallBalls) {
var _local3 = b.size - 1;
if (_local3 > 0) {
_a.push(new Ball(_clip, _bounds, b.x, b.y, b.vx, Ball.POST_SPLIT_Y_VELOCITY, _local3));
_a.push(new Ball(_clip, _bounds, b.x, b.y, -b.vx, Ball.POST_SPLIT_Y_VELOCITY, _local3));
}
_addPoints(100 * Math.pow(2, 4 - b.size));
b.burst();
removeBall(b);
if (Math.floor(Math.random() * DROP_POWERUP_FREQUENCY) == 0) {
if (_powerUps.length < 2) {
var _local5 = Powerup.getRandomPowerupType((getTimer() - _t0) > OXYGEN_BONUS, !_player.hasGrapple(), !_player.hasDouble(), nonSmallBalls > 0);
var _local4 = new Powerup(_clip, _bounds, b.x, b.y, _local5, _powerUps.length);
_local4.addListener(this);
_powerUps.push(_local4);
}
}
}
function _nonSmallBalls() {
var _local3 = 0;
var _local4 = _a.length;
var _local2 = 0;
while (_local2 < _local4) {
if (_a[_local2].size > 1) {
_local3++;
}
_local2++;
}
return(_local3);
}
function _addPoints(s) {
_score = _score + s;
_score_txt.text = _score.toString();
}
function get lives() {
return(_player.lives);
}
function get ballsLeft() {
return(_a.length);
}
function reset() {
var _local2 = 0;
while (_local2 < _a.length) {
_a[_local2].destroy();
_local2++;
}
_a = [];
_local2 = 0;
while (_local2 < _powerUps.length) {
_powerUps[_local2].destroy();
_local2++;
}
_powerUps = [];
_local2 = 0;
while (_local2 < _p.length) {
_p[_local2].destroy();
_local2++;
}
_p = [];
if (!_player.hasNormal()) {
_player.giveNormal();
}
_player.makeVulnerable();
}
function halt(state) {
_player.update();
_player.halt();
state = ((state == undefined) ? true : (state));
_halted = state;
}
function broadcastMessage() {
}
function addListener() {
}
function removeListener() {
}
static var BALL_FREEZE_PERIOD = 3500;
static var GRAVITY = -0.35;
static var ELASTICITY = 0.9;
static var COLLISION_CORRECTION = 3;
static var ON_LIFE_LOST = "onLifeLost";
static var ON_GAME_OVER = "onGameOver";
static var ON_LEVEL_COMPLETE = "onLevelComplete";
static var DROP_POWERUP_FREQUENCY = 5;
static var TIME_ALLOWED = 60000;
static var OXYGEN_BONUS = 10000;
var _a = null;
var _p = null;
var _powerUps = null;
var _player = null;
var _clip = null;
var _interface = null;
var _bounds = null;
var _t0 = 0;
var _score_txt = null;
var _score = 0;
var _halted = false;
var _interval = -1;
var frozen = false;
var _frozen_t0 = 0;
var _lastTime = 0;
var _pause_t0 = 0;
var _paused = false;
}
Symbol 567 MovieClip [__Packages.ContainedObject] Frame 0
class ContainedObject
{
function ContainedObject (bounds) {
_bounds = bounds;
}
function update() {
_clip._x = x;
_clip._y = _ty(y);
}
function _ty(y) {
return(_bounds._height - y);
}
function hitTest(clip) {
return(_clip.hitTest(clip));
}
function getClip() {
return(_clip);
}
function destroy() {
_clip.removeMovieClip();
}
var x = 0;
var y = 0;
var vx = 0;
var vy = 0;
var _clip = null;
var _bounds = null;
}
Symbol 568 MovieClip [__Packages.Player] Frame 0
class Player extends ContainedObject
{
var _clip, x, y, vx;
function Player (parent, bounds, x) {
super(bounds);
AsBroadcaster.initialize(this);
lives = INITIAL_LIVES;
var _local5 = Depths.PLAYER;
var _local3 = "player_mc";
_clip = parent.attachMovie(SYMBOL, _local3, _local5);
this.x = x;
y = 0;
update();
_weapon = new WeaponNormal(parent, bounds);
__parent = parent;
__bounds = bounds;
}
function makeInvulnerable() {
if (!invulnerable) {
var _local2 = {_xscale:INVULNERABLE_SCALE, _yscale:INVULNERABLE_SCALE, _y:-40, _alpha:65};
_clip.attachMovie(SYMBOL_INVULNERABILITY, SYMBOL_INVULNERABILITY + "_mc", _clip.getNextHighestDepth(), _local2);
}
_invulnerable_t0 = getTimer();
invulnerable = true;
}
function checkKeys() {
if (dying) {
return(undefined);
}
if ((!_aiming) && (Key.isDown(39))) {
_clip._xscale = Math.abs(_clip._xscale);
vx = FULL_SPEED;
_clip.gotoAndStop(FRAME_RUNNING);
} else if ((!_aiming) && (Key.isDown(37))) {
_clip._xscale = -Math.abs(_clip._xscale);
vx = -FULL_SPEED;
_clip.gotoAndStop(FRAME_RUNNING);
} else {
vx = 0;
if (!_aiming) {
_clip.gotoAndStop(FRAME_IDLE);
}
}
if ((!_aiming) && (Key.isDown(32))) {
if (!_weapon.isFired) {
_fireWeapon();
}
}
}
function halt() {
_clip.gotoAndStop(FRAME_IDLE);
}
function _fireWeapon() {
_clip.gotoAndStop(FRAME_SHOOTING);
_aiming = true;
var _local2 = x + (HORIZONTAL_GUN_OFFSET * ((_clip._xscale < 0) ? -1 : 1));
_weapon.fire(_local2, y, _clip._xscale < 0);
_t0 = getTimer();
broadcastMessage(ON_FIRE_WEAPON);
}
function update() {
var _local5 = getTimer() - _t0;
if (dying) {
if (_local5 > DEATH_SEQUENCE_TIME) {
dying = false;
broadcastMessage(ON_DEATH_COMPLETE);
}
return(undefined);
}
if (invulnerable) {
var _local4 = getTimer() - _invulnerable_t0;
var _local3 = _clip[SYMBOL_INVULNERABILITY + "_mc"];
if (_local4 > INVULNERABLE_TIME) {
_local3.removeMovieClip();
invulnerable = false;
} else if (_local4 > (0.7 * INVULNERABLE_TIME)) {
_local3._visible = (Math.floor(_local4 / 50) % 2) == 0;
_local3.gotoAndStop(_local3._totalframes);
}
}
if (_aiming) {
if (_local5 > WEAPON_AIM_TIME) {
_aiming = false;
}
}
_weapon.update();
if (!_aiming) {
super.update();
}
}
function makeVulnerable() {
if (invulnerable) {
_clip[SYMBOL_INVULNERABILITY + "_mc"].removeMovieClip();
invulnerable = false;
}
}
function die() {
if (!dying) {
dying = true;
_t0 = getTimer();
_clip.gotoAndStop(FRAME_DEAD);
lives--;
}
}
function get width() {
return(_clip._width / 2);
}
function get weapon() {
return(_weapon);
}
function giveGrapple() {
_weapon.destroy();
_weapon = new WeaponGrapple(__parent, __bounds);
}
function hasGrapple() {
return(_weapon instanceof WeaponGrapple);
}
function giveDouble() {
_weapon.destroy();
_weapon = new WeaponDouble(__parent, __bounds);
}
function hasDouble() {
return(_weapon instanceof WeaponDouble);
}
function giveNormal() {
_weapon.destroy();
_weapon = new WeaponNormal(__parent, __bounds);
}
function hasNormal() {
return(!(hasDouble() || (hasGrapple())));
}
function destroy() {
_weapon.destroy();
_clip.removeMovieClip();
}
function broadcastMessage() {
}
function addListener() {
}
function removeListener() {
}
static var INITIAL_LIVES = 3;
static var ON_FIRE_WEAPON = "onFireWeapon";
static var ON_DEATH_COMPLETE = "onDeathComplete";
static var WEAPON_AIM_TIME = 250;
static var DEATH_SEQUENCE_TIME = 2300;
static var INVULNERABLE_TIME = 7500;
static var INVULNERABLE_SCALE = 60;
static var HORIZONTAL_GUN_OFFSET = 17;
static var FULL_SPEED = 10;
static var ZERO_SPEED = 1;
static var SYMBOL = "player";
static var SYMBOL_INVULNERABILITY = "invulnerability";
static var FRAME_IDLE = 1;
static var FRAME_RUNNING = 2;
static var FRAME_DEAD = 3;
static var FRAME_SHOOTING = 4;
var _weapon = null;
var _t0 = 0;
var _aiming = false;
var dying = false;
var lives = 0;
var invulnerable = false;
var _invulnerable_t0 = 0;
var __parent = null;
var __bounds = null;
}
Symbol 569 MovieClip [__Packages.Weapon] Frame 0
class Weapon extends ContainedObject
{
var _clip;
function Weapon (parent, bounds) {
super(bounds);
_mask = parent.attachMovie(SYMBOL_MASK, SYMBOL_MASK + "_mc", parent.getNextHighestDepth());
_mask._visible = false;
}
function fire(x, y, right) {
if (!isFired) {
isFired = true;
}
}
function retract() {
if (isFired) {
isFired = false;
if (isEmbedded) {
isEmbedded = false;
}
}
}
function embed() {
if (!isEmbedded) {
isEmbedded = true;
}
}
function _showWeapon(state) {
_clip._visible = state;
}
function destroy() {
_mask.removeMovieClip();
super.destroy();
}
static var SYMBOL_MASK = "weaponMask";
var isFired = false;
var isEmbedded = false;
var _mask = null;
}
Symbol 570 MovieClip [__Packages.Depths] Frame 0
class Depths
{
function Depths () {
}
static var BALLS = 1000;
static var WEAPONS = 2000;
static var PLATFORMS = 3000;
static var POWERUPS = 4000;
static var PLAYER = 5000;
}
Symbol 571 MovieClip [__Packages.WeaponNormal] Frame 0
class WeaponNormal extends Weapon
{
var _clip, isFired, isEmbedded, x, _mask, y, _showWeapon, _bounds;
function WeaponNormal (parent, bounds) {
super(parent, bounds);
_clip = parent.createEmptyMovieClip("weapon_mc", Depths.WEAPONS);
_clip.attachMovie(SYMBOL_HARPOON, SYMBOL_HARPOON + "_mc", _clip.getNextHighestDepth());
_clip.attachMovie(SYMBOL_WARHEAD, SYMBOL_WARHEAD + "_mc", _clip.getNextHighestDepth());
_clip._visible = false;
_embedPeriod = EMBED_PERIOD;
}
function fire(x, y, right) {
if ((!isFired) && (!isEmbedded)) {
this.x = (_mask._x = x);
this.y = (_mask._y = (_fireY = y));
_showWeapon(true);
_t0 = getTimer();
super.fire(x, y, right);
}
}
function update() {
var _local3 = getTimer() - _t0;
if (isFired) {
if (isEmbedded && (_local3 > _embedPeriod)) {
retract();
} else if (!isEmbedded) {
if ((_local3 >= FULL_FIRE_TIME) || (y > _bounds._height)) {
embed();
} else {
y = com.robertpenner.easing.Quart.easeOut(_local3, _fireY, _bounds._height, FULL_FIRE_TIME);
}
}
super.update();
}
}
function embed() {
_t0 = getTimer();
super.embed();
}
function retract() {
if (isFired) {
_showWeapon(false);
super.retract();
}
}
function getClip() {
return(_clip);
}
static var EMBED_PERIOD = 0;
static var SYMBOL_HARPOON = "harpoon";
static var SYMBOL_WARHEAD = "warhead";
static var FULL_FIRE_TIME = 1000;
var _t0 = 0;
var _fireY = 0;
var _embedPeriod = 0;
}
Symbol 572 MovieClip [__Packages.com.robertpenner.easing.Quart] Frame 0
class com.robertpenner.easing.Quart
{
function Quart () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
}
Symbol 573 MovieClip [__Packages.WeaponGrapple] Frame 0
class WeaponGrapple extends WeaponNormal
{
var _clip, _embedPeriod;
function WeaponGrapple (parent, bounds) {
super(parent, bounds);
_clip.onEnterFrame = uk.kerb.utils.EventDelegate.create(this, _jumpToGrappleFrame);
_embedPeriod = EMBED_PERIOD;
}
function _jumpToGrappleFrame() {
delete _clip.onEnterFrame;
_clip[WeaponNormal.SYMBOL_HARPOON + "_mc"].gotoAndStop(2);
}
static var EMBED_PERIOD = 2000;
}
Symbol 574 MovieClip [__Packages.uk.kerb.utils.EventDelegate] Frame 0
class uk.kerb.utils.EventDelegate
{
function EventDelegate () {
}
static function create(scope, method) {
var params = arguments.splice(2, arguments.length - 2);
var _local2 = function () {
return(method.apply(scope, arguments.concat(params)));
};
return(_local2);
}
}
Symbol 575 MovieClip [__Packages.WeaponDouble] Frame 0
class WeaponDouble extends WeaponNormal
{
var _clip, _mask, _embedPeriod, isFired, isEmbedded;
function WeaponDouble (parent, bounds) {
super(parent, bounds);
_clip.attachMovie(WeaponNormal.SYMBOL_HARPOON, WeaponNormal.SYMBOL_HARPOON + "2_mc", _clip.getNextHighestDepth());
_clip.attachMovie(WeaponNormal.SYMBOL_WARHEAD, WeaponNormal.SYMBOL_WARHEAD + "2_mc", _clip.getNextHighestDepth());
_mask = parent.attachMovie(SYMBOL_MASK, SYMBOL_MASK + "_mc", _mask.getDepth());
_mask._visible = false;
_embedPeriod = EMBED_PERIOD;
}
function fire(x, y, right) {
if ((!isFired) && (!isEmbedded)) {
var _local3 = (right ? (SECOND_HARPOON_DISTANCE) : (-SECOND_HARPOON_DISTANCE));
_clip[WeaponNormal.SYMBOL_HARPOON + "2_mc"]._x = _local3;
_clip[WeaponNormal.SYMBOL_WARHEAD + "2_mc"]._x = _local3;
super.fire(x, y, right);
}
}
static var SYMBOL_MASK = "weaponMaskWide";
static var EMBED_PERIOD = 0;
static var SECOND_HARPOON_DISTANCE = 15;
}
Symbol 576 MovieClip [__Packages.Sounds] Frame 0
class Sounds
{
static var s_mainSounds, m_mcSoundsHolder, m_mcSoundButton, m_oSoundsList;
function Sounds () {
}
static function init() {
if (s_mainSounds == undefined) {
s_mainSounds = new Sound(_root);
m_mcSoundsHolder = _root.createEmptyMovieClip("m_mcSoundsHolder", _root.getNextHighestDepth());
setSounds();
mainSoundUp();
}
}
static function initButton(btn) {
m_mcSoundButton = btn;
if (s_mainSounds.getVolume() == 0) {
mainSoundDown();
} else {
mainSoundUp();
}
}
static function mainSoundUp() {
if (m_mcSoundButton != undefined) {
m_mcSoundButton.gotoAndStop("on");
m_mcSoundButton.onRelease = mainSoundDown;
s_mainSounds.setVolume(100);
}
}
static function mainSoundDown() {
if (m_mcSoundButton != undefined) {
m_mcSoundButton.gotoAndStop("off");
m_mcSoundButton.onRelease = mainSoundUp;
s_mainSounds.setVolume(0);
}
}
static function setSounds() {
var _local4 = ["bounce", "dead", "endgame", "kerb panik game over", "MusicLoop", "PopSound", "LazorSound", "Screamhigh", "PickUp", "PickUpBomb", "PickUpOxygen", "PickUpShield", "PickUpDouble", "PickUpGrapple", "PickUpFreeze", "StartGame", "MusicLoopGame", "LevelComplete"];
m_oSoundsList = {};
var _local5 = _local4.length;
var _local1 = 0;
while (_local1 < _local5) {
var _local2 = _local4[_local1];
var _local3 = m_mcSoundsHolder.createEmptyMovieClip("holder" + _local1, _local1);
m_oSoundsList[_local2] = new Sound(_local3);
m_oSoundsList[_local2].attachSound(_local2);
_local1++;
}
}
static function playSound(sName, loops) {
if (loops == undefined) {
loops = 0;
} else if (loops == -1) {
loops = 1000000 /* 0x0F4240 */;
}
m_oSoundsList[sName].start(0, loops);
}
static function stopSound(name) {
m_oSoundsList[name].stop();
}
static function stopAllSounds(sExcept) {
for (var _local1 in m_oSoundsList) {
if (_local1 != sExcept) {
stopSound(_local1);
}
}
}
static function setVolume(name, volume) {
m_oSoundsList[name].setVolume(volume);
}
static function getVolume(name) {
return(m_oSoundsList[name].getVolume());
}
}
Symbol 577 MovieClip [__Packages.Ball] Frame 0
class Ball extends ContainedObject
{
var _clip, x, y, update, vx, vy;
function Ball (parent, bounds, x, y, vx, vy, size) {
super(bounds);
if (size != undefined) {
this.size = size;
}
_colour = Math.floor(Math.random() * NUMBER_OF_COLOURS) + 1;
var _local4 = parent.getNextHighestDepth();
var _local5 = (SYMBOL + _local4.toString()) + "_mc";
var _local3 = _getScale();
_clip = parent.attachMovie(SYMBOL, _local5, _local4, {_xscale:_local3, _yscale:_local3});
_clip.gotoAndStop(_colour);
_clip.removeMe = uk.kerb.utils.EventDelegate.create(this, _removeMe);
this.x = x;
this.y = y;
update();
if (vx != undefined) {
this.vx = vx;
} else {
this.vx = BASE_X_VELOCITY + (BASE_X_VELOCITY * Math.random());
}
if (vy != undefined) {
this.vy = vy;
} else {
this.vy = 0;
}
}
function _getScale() {
switch (size) {
case 4 :
return(100);
case 3 :
return(50);
case 2 :
return(25);
case 1 :
return(12.5);
}
return(0);
}
function get radius() {
return(_clip._width / 2);
}
function burst() {
_clip.gotoAndPlay((11 * (_colour - 1)) + 5);
}
function destroy() {
_removeMe();
}
function _removeMe() {
_clip.removeMovieClip();
}
static var POST_SPLIT_Y_VELOCITY = 5;
static var BASE_X_VELOCITY = 2.5;
static var SYMBOL = "ball";
static var NUMBER_OF_COLOURS = 4;
var size = 4;
var _colour = 0;
}
Symbol 578 MovieClip [__Packages.Platform] Frame 0
class Platform extends ContainedObject
{
var _clip, x, y, update;
function Platform (parent, bounds, x, y, depthOffset, scale) {
super(bounds);
_scale = ((scale == undefined) ? (DEFAULT_SCALE) : (scale));
var _local3 = Depths.PLATFORMS + depthOffset;
var _local4 = (SYMBOL + _local3.toString()) + "_mc";
_clip = parent.attachMovie(SYMBOL, _local4, _local3, {_xscale:_scale, _yscale:_scale});
this.x = x;
this.y = y;
update();
_clip.top_mc._visible = false;
_clip.bottom_mc._visible = false;
_clip.left_mc._visible = false;
_clip.right_mc._visible = false;
}
function getTop() {
return(_clip.top_mc);
}
function getBottom() {
return(_clip.bottom_mc);
}
function getLeft() {
return(_clip.left_mc);
}
function getRight() {
return(_clip.right_mc);
}
function destroy() {
_clip.removeMovieClip();
}
static var SYMBOL = "platform";
static var DEFAULT_SCALE = 43.5;
var _scale = 0;
}
Symbol 579 MovieClip [__Packages.Powerup] Frame 0
class Powerup extends ContainedObject
{
var _clip, x, y;
function Powerup (parent, bounds, x, y, type, depthOffset) {
super(bounds);
AsBroadcaster.initialize(this);
this.type = type;
var _local4 = Depths.POWERUPS + depthOffset;
var _local3 = "powerup_" + SYMBOLS[type];
var _local5 = (_local3 + _local4.toString()) + "_mc";
_clip = parent.attachMovie(_local3, _local5, _local4, {_xscale:SCALE, _yscale:SCALE});
_t0 = getTimer();
this.x = x;
this.y = y;
update();
}
static function getRandomPowerupType(allowOxygen, allowGrapple, allowDouble, allowBomb) {
var _local1 = [FREEZE, POWER];
if (allowBomb) {
_local1.push(BOMB);
}
if (allowDouble) {
_local1.push(DOUBLE);
}
if (allowGrapple) {
_local1.push(GRAPPLE);
}
if (allowOxygen) {
_local1.push(OXYGEN);
}
return(_local1[Math.floor(Math.random() * _local1.length)]);
}
function pickup() {
pickedUp = true;
_t0 = getTimer();
}
function update() {
var _local3 = getTimer() - _t0;
if (pickedUp) {
if (_local3 > PICKUP_PERIOD) {
_dispose();
} else {
_clip._alpha = com.robertpenner.easing.Quart.easeOut(_local3, 100, -100, PICKUP_PERIOD);
_clip._xscale = (_clip._yscale = com.robertpenner.easing.Quart.easeOut(_local3, SCALE, 3 * SCALE, PICKUP_PERIOD));
}
} else if ((!disappearing) && (_local3 > DISAPPEAR_AFTER)) {
disappear();
} else if (disappearing) {
if (_local3 > DISAPPEAR_PERIOD) {
_dispose();
} else {
_clip._xscale = (_clip._yscale = com.robertpenner.easing.Back.easeIn(_local3, SCALE, -SCALE, DISAPPEAR_PERIOD));
}
}
super.update();
}
function get height() {
return(_clip._height / 2);
}
function disappear() {
disappearing = true;
_t0 = getTimer();
}
function _dispose() {
finished = true;
broadcastMessage(ON_REMOVE_POWERUP);
_clip.removeMovieClip();
}
static function getTypeString(type) {
return(SYMBOLS[type]);
}
function destroy() {
_clip.removeMovieClip();
}
function broadcastMessage() {
}
function addListener() {
}
function removeListener() {
}
static var ON_REMOVE_POWERUP = "onRemovePowerup";
static var DIFFERENT_POWERUPS = 7;
static var PICKUP_PERIOD = 350;
static var DISAPPEAR_PERIOD = 500;
static var DISAPPEAR_AFTER = 5000;
static var SCALE = 34;
static var BOMB = 0;
static var DOUBLE = 1;
static var FREEZE = 2;
static var GRAPPLE = 3;
static var LAZER = 4;
static var OXYGEN = 5;
static var POWER = 6;
static var SYMBOLS = ["bomb", "double", "freeze", "grapple", "lazer", "oxygen", "power"];
var type = -1;
var _t0 = 0;
var atRest = false;
var pickedUp = false;
var disappearing = false;
var finished = false;
}
Symbol 580 MovieClip [__Packages.com.robertpenner.easing.Back] Frame 0
class com.robertpenner.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
}
Symbol 75 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 25
stop();
Symbol 135 MovieClip Frame 33
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 7
_root.ms.playSound("arcade_fighting_game1", 40);
Symbol 136 MovieClip Frame 19
stop();
Symbol 155 MovieClip Frame 1
_root.ms.playSound("phone", 15, 9999);
Symbol 208 MovieClip [ball] Frame 1
stop();
Symbol 208 MovieClip [ball] Frame 2
stop();
Symbol 208 MovieClip [ball] Frame 3
stop();
Symbol 208 MovieClip [ball] Frame 4
stop();
Symbol 208 MovieClip [ball] Frame 15
removeMe();
stop();
Symbol 208 MovieClip [ball] Frame 26
removeMe();
stop();
Symbol 208 MovieClip [ball] Frame 37
removeMe();
stop();
Symbol 208 MovieClip [ball] Frame 48
removeMe();
stop();
Symbol 234 MovieClip [game_over_message] Frame 59
showGameOverScreen();
stop();
Symbol 247 MovieClip [next_level] Frame 59
showLevelScore();
stop();
Instance of Symbol 249 MovieClip "left_mc" in Symbol 251 MovieClip [platform] Frame 1
/* no clip actions */
Symbol 311 MovieClip Frame 58
stop();
Symbol 318 MovieClip Frame 7
stop();
Symbol 319 MovieClip [player] Frame 1
stop();
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 12
_root.RemoveFromArray(_name);
stop();
Symbol 347 MovieClip [harpoon] Frame 1
stop();
Symbol 347 MovieClip [harpoon] Frame 2
stop();
Symbol 370 MovieClip [next_level_button] Frame 12
assignLevelHandler(nextLevel_mc);
stop();
Symbol 371 MovieClip Frame 200
stop();
Symbol 374 MovieClip [results_move_screen] Frame 100
applyBonus();
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 2
play();
Symbol 380 MovieClip Frame 9
onTransitionClosed();
Symbol 380 MovieClip Frame 16
gotoAndStop (1);
Symbol 386 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 399 MovieClip [audio_mute_toggle] Frame 1
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 456 Button
on (release) {
Main.instance().showInstructionsPage(1);
}
Symbol 457 Button
on (release) {
Main.instance().showInstructionsPage(2);
}
Symbol 458 Button
on (release) {
Main.instance().showInstructionsPage(3);
}
Symbol 463 MovieClip Frame 1
stop();