Frame 1
function onEnterFrame() {
if ((_currentframe > 1) && (getBytesLoaded() == getBytesTotal())) {
initSplash();
delete onEnterFrame;
} else {
var percent = Math.floor((getBytesLoaded() / getBytesTotal()) * 100);
splash_mc.progress_mc.percent_txt.text = percent;
}
}
function initSplash() {
gotoAndStop ("splash");
splash_mc.gotoAndStop(2);
var controller = this;
splash_mc.start_mc.start_btn.onRelease = function () {
controller.choosePlayer();
};
splash_mc.start_mc.help_btn.onRelease = function () {
controller.helpSplash();
};
startLevel = 0;
if (canChooseLevel) {
levelChooser._visible = true;
} else {
levelChooser._visible = false;
}
}
function choosePlayer() {
gotoAndStop ("choosePlayer");
}
function startGame() {
if (canChooseLevel) {
initSplash();
} else {
choosePlayer();
}
}
function helpSplash() {
dialog = attachMovie("DialogHelp", "dialog", 16000);
dialog.addEventListener("closeModal", this);
dialog.backgroundAlpha = 100;
}
function closeModal(eventObj) {
var name = eventObj.name;
if (name == "help") {
startGame();
return(undefined);
}
}
Stage.align = "TL";
Stage.scaleMode = "noscale";
if (!__inited) {
var canChooseLevel = ((_level0.chooseLevel != null) && ((_level0.chooseLevel > 0) || (_level0.chooseLevel.toLowerCase() == "true")));
var startLevel = 0;
fsd = ((_level0.fsd != null) ? (_level0.fsd) : "fsd.swf");
fsdWidth = 400;
fsdHeight = 250;
_level0.eventID = "dc_kpso_9232";
_level0.subject = "Kim Possible - Super Villain Smash Out";
_level0.fsdPlayAgain = function () {
fsdContainer.removeMovieClip();
startGame();
};
var cache = new LoadVars();
cache.onData = (cache.onLoad = function () {
delete cache;
});
cache.load(fsd);
}
Frame 2
stop();
Frame 25
function initChoosePlayer() {
fsdContainer.removeMovieClip();
choosePlayer_mc.addEventListener("onCharacterSelect", this);
choosePlayer_mc.player = player;
choosePlayer_mc.side = side;
choosePlayer_mc.opponent = opponent;
}
function onCharacterSelect(eventObj) {
player = eventObj.player;
side = eventObj.side;
opponent = eventObj.opponent;
choosePlayer_mc.removeEventListener("onCharacterSelect", this);
nextFrame();
}
if (!__inited) {
var player = 0;
var side = 1;
var opponent = 0;
}
initChoosePlayer();
stop();
stop();
Frame 26
play();
Frame 50
function submitScore(score) {
mcGame.stop();
if ((_level0.stunt > 0) || (_level0.stunt.toLowerCase() == "true")) {
_level0.playerScore = (((("" + score) + "_") + Game.PongLevels.FRIENDS_NAMES[player]) + "_") + Game.PongLevels.FOES_NAMES[opponent];
_level0.eventID = "dc_kpso_9232_stunt";
} else {
_level0.playerScore = score;
_level0.eventID = "dc_kpso_9232";
}
gotoAndStop ("submitScore");
fsdContainer.removeMovieClip();
fsdContainer = createEmptyMovieClip("fsdContainer", 30000);
fsdContainer._x = Math.floor((580 - fsdWidth) / 2);
fsdContainer._y = Math.floor((320 - fsdHeight) / 2);
var fsd_mc = fsdContainer.createEmptyMovieClip("fsd_mc", 0);
fsd_mc.loadMovie(fsd);
}
function init() {
fsdContainer._visible = false;
fsdContainer.removeMovieClip();
var setup = {player:player, side:side, opponent:opponent, startLevel:startLevel};
myGame = new Game.PongGame(this, mcGame, scoreboard_mc, setup);
var playerFrame = (Game.PongLevels.FRIENDS[player] + 2);
var opponentFrame = (Game.PongLevels.FOES[opponent] + 2);
if (side == 1) {
arena_mc.nameLeft_mc.gotoAndStop(opponentFrame);
arena_mc.nameRight_mc.gotoAndStop(playerFrame);
} else {
arena_mc.nameLeft_mc.gotoAndStop(playerFrame);
arena_mc.nameRight_mc.gotoAndStop(opponentFrame);
}
}
function onUnloadMovie() {
mcGame.stop();
}
function newGame() {
delete myGame;
startGame();
}
if (!__inited) {
var myGame;
var mcGame;
var arena_mc;
var __inited = true;
}
init();
stop();
Symbol 564 MovieClip [__Packages.Game.PongModal] Frame 0
class Game.PongModal extends MovieClip
{
var bg_mc, keyListener, dispatchEvent, removeMovieClip, close_btn, base_mc, attachMovie;
function PongModal () {
super();
if (!__inited) {
init();
}
createBackground();
initCloseButton();
}
function set backgroundAlpha(newAlpha) {
__backgroundAlpha = newAlpha;
bg_mc._alpha = newAlpha;
//return(backgroundAlpha);
}
function get backgroundAlpha() {
return(__backgroundAlpha);
}
function close() {
Key.removeListener(keyListener);
dispatchEvent({type:"closeModal", name:screenName});
removeMovieClip();
}
function init() {
mx.events.EventDispatcher.initialize(Game.PongModal.prototype);
__inited = true;
}
function initCloseButton(myClose_btn) {
if (!myClose_btn) {
if (!close_btn) {
if (!base_mc.close_btn) {
return(undefined);
}
close_btn = base_mc.close_btn;
}
myClose_btn = close_btn;
}
var controller = this;
myClose_btn.onRelease = function () {
controller.close();
};
}
function createBackground() {
if (!bg_mc) {
bg_mc = attachMovie(backgroundID, "bg_mc", LOWEST_DEPTH);
}
bg_mc._width = Stage.width;
bg_mc._height = Stage.height;
bg_mc._alpha = backgroundAlpha;
bg_mc.useHandCursor = false;
bg_mc.onRelease = function () {
};
}
static var backgroundID = "ModalBackground";
static var LOWEST_DEPTH = -16384;
var screenName = "modal";
var __backgroundAlpha = 60;
static var __inited = false;
}
Symbol 565 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var l = queue.length;
var i;
i = 0;
while (i < l) {
var o = queue[i];
if (o == handler) {
queue.splice(i, 1);
return(undefined);
}
i++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var queueName = ("__q_" + eventObj.type);
var queue = queueObj[queueName];
if (queue != undefined) {
var i;
for (i in queue) {
var o = queue[i];
var oType = typeof(o);
if ((oType == "object") || (oType == "movieclip")) {
if (o.handleEvent == undefined) {
o[eventObj.type](eventObj);
} else {
o.handleEvent(eventObj);
}
} else {
o.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var queueName = ("__q_" + event);
if (this[queueName] == undefined) {
this[queueName] = new Array();
}
_global.ASSetPropFlags(this, queueName, 1);
_removeEventListener(this[queueName], event, handler);
this[queueName].push(handler);
}
function removeEventListener(event, handler) {
var queueName = ("__q_" + event);
_removeEventListener(this[queueName], event, handler);
}
static var _fEventDispatcher = undefined;
}
Symbol 566 MovieClip [__Packages.Game.ModalDialogs.PongQuit] Frame 0
class Game.ModalDialogs.PongQuit extends Game.PongModal
{
var score_txt, base_mc, submit_btn, __score, dispatchEvent;
function PongQuit () {
super();
score_txt = base_mc.score_mc.score_txt;
submit_btn = base_mc.submit_btn;
var controller = this;
submit_btn.onRelease = function () {
controller.submitScore();
};
}
function set score(myScore) {
if (myScore == undefined) {
myScore = 0;
}
__score = myScore;
var scoreDisp = String(__score);
var lead = (__emptyScore.length - scoreDisp.length);
scoreDisp = __emptyScore.substr(0, lead) + score;
score_txt.text = scoreDisp;
//return(score);
}
function get score() {
return(__score);
}
function submitScore() {
dispatchEvent({type:"onSubmitScore", score:score});
}
var screenName = "quit";
var __emptyScore = "";
}
Symbol 567 MovieClip [__Packages.Game.ModalDialogs.PongLevelDone] Frame 0
class Game.ModalDialogs.PongLevelDone extends Game.PongModal
{
var level_txt, base_mc, keyListener, bg_mc, __level;
function PongLevelDone () {
super();
level_txt = base_mc.level_txt;
var controller = this;
keyListener = {onKeyUp:function () {
controller.close();
}};
Key.addListener(keyListener);
bg_mc.onRelease = function () {
controller.close();
};
}
function set level(myLevel) {
if (myLevel == undefined) {
myLevel = 0;
}
__level = myLevel;
var levelDisp = String(myLevel + 1);
if (levelDisp.length < 2) {
levelDisp = "0" + levelDisp;
}
level_txt.text = levelDisp;
setMessage(myLevel);
//return(level);
}
function get level() {
return(__level);
}
function setMessage(myLevel) {
var i = (myLevel + 1);
var cMessages = base_mc._totalframes;
while (i > cMessages) {
i = i - cMessages;
}
base_mc.gotoAndStop(i);
}
var screenName = "leveldone";
}
Symbol 568 MovieClip [__Packages.Game.ModalDialogs.PongGameOver] Frame 0
class Game.ModalDialogs.PongGameOver extends Game.PongModal
{
var score_txt, base_mc, submit_btn, __score, dispatchEvent;
function PongGameOver () {
super();
score_txt = base_mc.score_mc.score_txt;
submit_btn = base_mc.submit_btn;
var controller = this;
submit_btn.onRelease = function () {
controller.submitScore();
};
}
function set score(myScore) {
if (myScore == undefined) {
myScore = 0;
}
__score = myScore;
var scoreDisp = String(__score);
var lead = (__emptyScore.length - scoreDisp.length);
scoreDisp = __emptyScore.substr(0, lead) + score;
score_txt.text = scoreDisp;
//return(score);
}
function get score() {
return(__score);
}
function submitScore() {
dispatchEvent({type:"onSubmitScore", score:score});
}
var screenName = "gameover";
var __emptyScore = "";
}
Symbol 569 MovieClip [__Packages.Game.ModalDialogs.PongPause] Frame 0
class Game.ModalDialogs.PongPause extends Game.PongModal
{
var keyListener, bg_mc;
function PongPause () {
super();
var controller = this;
keyListener = {onKeyUp:function () {
if (Key.getCode() == 80) {
return(undefined);
}
controller.close();
}};
Key.addListener(keyListener);
bg_mc.onRelease = function () {
controller.close();
};
}
var screenName = "pause";
}
Symbol 570 MovieClip [__Packages.Game.PongScoreboard] Frame 0
class Game.PongScoreboard extends MovieClip
{
var quit_btn, pause_btn, help_btn, __score, score_txt, __level, level_txt, goalsLeft_txt, goalsRight_txt, itemLeft_mc, itemRight_mc, playerLeft_mc, playerRight_mc, dispatchEvent;
function PongScoreboard () {
super();
if (!__inited) {
init();
}
resetGoals();
resetItems();
resetPlayers();
resetScore();
resetLevel();
var controller = this;
var quitEvent = "quit";
quit_btn.onPress = function () {
controller.buttonRelease(quitEvent);
};
var pauseEvent = "pause";
pause_btn.onPress = function () {
controller.buttonRelease(pauseEvent);
};
var helpEvent = "help";
help_btn.onPress = function () {
controller.buttonRelease(helpEvent);
};
}
function set score(myScore) {
if (myScore == undefined) {
myScore = 0;
}
__score = myScore;
var scoreDisp = String(__score);
var lead = (__emptyScore.length - scoreDisp.length);
scoreDisp = __emptyScore.substr(0, lead) + score;
score_txt.text = scoreDisp;
//return(score);
}
function get score() {
return(__score);
}
function resetScore() {
score = (0);
}
function set level(myLevel) {
if (myLevel == undefined) {
myLevel = 0;
}
__level = myLevel;
var levelDisp = String(myLevel + 1);
if (levelDisp.length < 2) {
levelDisp = "0" + levelDisp;
}
level_txt.text = levelDisp;
//return(level);
}
function get level() {
return(__level);
}
function resetLevel() {
level = (0);
}
function set goalsLeft(newGoals) {
if ((newGoals == undefined) || (newGoals < 0)) {
newGoals = 0;
} else if (newGoals > 9) {
newGoals = 9;
}
goalsLeft_txt.text = String(newGoals);
//return(goalsLeft);
}
function get goalsLeft() {
return(Number(goalsLeft_txt.text));
}
function set goalsRight(newGoals) {
if ((newGoals == undefined) || (newGoals < 0)) {
newGoals = 0;
} else if (newGoals > 9) {
newGoals = 9;
}
goalsRight_txt.text = String(newGoals);
//return(goalsRight);
}
function get goalsRight() {
return(Number(goalsRight_txt.text));
}
function resetGoals() {
goalsLeft = (0);
goalsRight = (0);
}
function set itemLeft(newItem) {
if ((newItem == undefined) || (newItem < 0)) {
newItem = 0;
} else if (newItem > (itemLeft_mc._totalframes - 1)) {
newItem = itemLeft_mc._totalframes - 1;
}
itemLeft_mc.gotoAndStop(newItem + 1);
//return(itemLeft);
}
function get itemLeft() {
return(itemLeft_mc._currentframe - 1);
}
function set itemRight(newItem) {
if ((newItem == undefined) || (newItem < 0)) {
newItem = 0;
} else if (newItem > (itemRight_mc._totalframes - 1)) {
newItem = itemRight_mc._totalframes - 1;
}
itemRight_mc.gotoAndStop(newItem + 1);
//return(itemRight);
}
function get itemRight() {
return(itemRight_mc._currentframe - 1);
}
function resetItems() {
itemLeft = (0);
itemRight = (0);
}
function set playerLeft(newItem) {
if ((newItem == undefined) || (newItem < 0)) {
newItem = 0;
} else if (newItem > (playerLeft_mc._totalframes - 1)) {
newItem = playerLeft_mc._totalframes - 1;
}
playerLeft_mc.gotoAndStop(newItem + 1);
//return(playerLeft);
}
function get playerLeft() {
return(playerLeft_mc._currentframe - 1);
}
function set playerRight(newItem) {
if ((newItem == undefined) || (newItem < 0)) {
newItem = 0;
} else if (newItem > (playerRight_mc._totalframes - 1)) {
newItem = playerRight_mc._totalframes - 1;
}
playerRight_mc.gotoAndStop(newItem + 1);
//return(playerRight);
}
function get playerRight() {
return(playerRight_mc._currentframe - 1);
}
function resetPlayers() {
playerLeft = (0);
playerRight = (5);
}
function buttonRelease(event) {
dispatchEvent({type:"click", data:event});
}
function init() {
mx.events.EventDispatcher.initialize(Game.PongScoreboard.prototype);
__inited = true;
}
var __emptyScore = "";
static var __inited = false;
}
Symbol 571 MovieClip [__Packages.Game.ModalDialogs.PongHelp] Frame 0
class Game.ModalDialogs.PongHelp extends Game.PongModal
{
function PongHelp () {
super();
}
var screenName = "help";
}
Symbol 572 MovieClip [__Packages.Game.PongLevelChooser] Frame 0
class Game.PongLevelChooser extends MovieClip
{
var _visible, controller, _parent, __enabled, level_btn, __currentBtn;
function PongLevelChooser () {
super();
setEnabled(_visible);
if (controller == undefined) {
controller = _parent;
}
}
function setEnabled(flag) {
__enabled = flag;
_visible = flag;
if (flag) {
initButton();
}
}
function initChooseLevel() {
var level = 1;
while (level_btn[("level" + String(level)) + "_mc"] != null) {
initLevelButton(level_btn[("level" + String(level)) + "_mc"], level - 1);
level++;
}
selectLevel(level_btn.level1_mc, 0);
}
function initButton() {
var btnController = this;
level_btn.onRollOver = (level_btn.onDragOver = function () {
(this.gotoAndStop("over"));// not popped
});
level_btn.onRollOut = (level_btn.onDragOut = function () {
(this.gotoAndStop("up"));// not popped
});
level_btn.onRelease = function () {
(this.gotoAndStop("level"));// not popped
delete this.onRollOut;
delete this.onRollOver;
delete this.onDragOut;
delete this.onDragOver;
delete this.onRelease;
btnController.initChooseLevel();
};
}
function selectLevel(btn, index) {
__currentBtn.setSelected(false);
__currentBtn = btn;
btn.setSelected(true);
__level = index;
controller.startLevel = index;
}
function initLevelButton(btn, index) {
var btnController = this;
btn.onRollOver = (btn.onDragOver = function () {
if (!this.selected) {
(this.gotoAndStop("over"));// not popped
}
});
btn.onRollOut = (btn.onDragOut = function () {
if (!this.selected) {
(this.gotoAndStop("up"));// not popped
}
});
btn.onRelease = function () {
btnController.selectLevel(this, index);
};
btn.setSelected = function (flag) {
this.selected = flag;
if (flag) {
(this.gotoAndStop("on"));// not popped
} else {
(this.gotoAndStop("up"));// not popped
}
};
}
var __level = 0;
}
Symbol 573 MovieClip [__Packages.Game.PongSelectorItem] Frame 0
class Game.PongSelectorItem extends MovieClip
{
var hitArea, dispatchEvent, group, value, gotoAndStop;
function PongSelectorItem () {
super();
if (!__inited) {
init();
}
hitArea._visible = false;
}
function set selected(flag) {
__selected = flag;
onRollOut();
//return(selected);
}
function get selected() {
return(__selected);
}
function init() {
mx.events.EventDispatcher.initialize(Game.PongSelectorItem.prototype);
__inited = true;
}
function onRelease() {
dispatchEvent({type:"click", value:value, group:group});
}
function onRollOver() {
dispatchEvent({type:"rollOver", value:value, group:group});
if (!__selected) {
(gotoAndStop("over"));// not popped
}
}
function onDragOver() {
onRollOver();
}
function onRollOut() {
dispatchEvent({type:"rollOut", value:value, group:group});
if (__selected) {
(gotoAndStop("down"));// not popped
} else {
(gotoAndStop("up"));// not popped
}
}
function onDragOut() {
onRollOut();
}
var __selected = false;
static var __inited = false;
}
Symbol 574 MovieClip [__Packages.Game.PongCharacterSelect] Frame 0
class Game.PongCharacterSelect extends MovieClip
{
var player_mc, opponent_mc, side_mc, start_btn, dispatchEvent;
function PongCharacterSelect () {
super();
if (!__inited) {
init();
}
player_mc.title_txt.text = playerTitle;
opponent_mc.title_txt.text = opponentTitle;
}
function set player(newPlayer) {
player_mc.selectedItem.selected = false;
player_mc.selectedItem = player_mc["choice" + newPlayer];
player_mc.selectedItem.selected = true;
__player = newPlayer;
//return(player);
}
function get player() {
return(__player);
}
function set side(newSide) {
side_mc.selectedItem.selected = false;
side_mc.selectedItem = side_mc["choice" + newSide];
side_mc.selectedItem.selected = true;
__side = newSide;
//return(side);
}
function get side() {
return(__side);
}
function set opponent(newOpponent) {
opponent_mc.selectedItem.selected = false;
opponent_mc.selectedItem = opponent_mc["choice" + newOpponent];
opponent_mc.selectedItem.selected = true;
__opponent = newOpponent;
//return(opponent);
}
function get opponent() {
return(__opponent);
}
function click(eventObj) {
var value = eventObj.value;
var group = eventObj.group;
if (group == "player") {
playerTitle = Game.PongLevels.FRIENDS_NAMES[value].toUpperCase();
player_mc.title_txt.text = playerTitle;
player = (value);
} else if (group == "side") {
side = (value);
} else if (group == "opponent") {
opponentTitle = Game.PongLevels.FOES_NAMES[value].toUpperCase();
opponent_mc.title_txt.text = opponentTitle;
opponent = (value);
}
}
function rollOver(eventObj) {
var value = eventObj.value;
var group = eventObj.group;
if (group == "player") {
player_mc.title_txt.text = Game.PongLevels.FRIENDS_NAMES[value].toUpperCase();
} else if (group == "opponent") {
opponent_mc.title_txt.text = Game.PongLevels.FOES_NAMES[value].toUpperCase();
}
}
function rollOut(eventObj) {
var value = eventObj.value;
var group = eventObj.group;
if (group == "player") {
player_mc.title_txt.text = playerTitle;
} else if (group == "opponent") {
opponent_mc.title_txt.text = opponentTitle;
}
}
function init() {
mx.events.EventDispatcher.initialize(Game.PongCharacterSelect.prototype);
__inited = true;
}
function initUI() {
initSelectorGroup(player_mc, "player", __player);
initSelectorGroup(side_mc, "side", __side);
initSelectorGroup(opponent_mc, "opponent", __opponent);
player_mc.title_txt.text = playerTitle;
opponent_mc.title_txt.text = opponentTitle;
}
function initSelectorGroup(timeline, name, selectedIndex) {
var i = 0;
var item;
while (timeline["choice" + i]) {
item = timeline["choice" + i];
item.group = name;
item.value = i;
item.addEventListener("click", this);
item.addEventListener("rollOver", this);
item.addEventListener("rollOut", this);
if (i == selectedIndex) {
item.selected = true;
timeline.selectedItem = item;
}
i++;
}
}
function initStartButton() {
var controller = this;
start_btn.onRelease = function () {
controller.startGame();
};
initUI();
}
function startGame() {
dispatchEvent({type:"onCharacterSelect", player:__player, side:__side, opponent:__opponent});
}
var __player = 0;
var __side = 0;
var __opponent = 0;
var playerTitle = "PICK A FRIEND";
var opponentTitle = "PICK A FOE";
static var __inited = false;
}
Symbol 575 MovieClip [__Packages.Game.PongLevels] Frame 0
class Game.PongLevels
{
function PongLevels () {
if (!__inited) {
init();
}
}
static function getLevels() {
if (!__inited) {
init();
}
return(levels);
}
static function addLevel(level) {
if (level.speed == undefined) {
level.speed = DEFAULT_SPEED;
}
if (level.angle == undefined) {
level.angle = DEFAULT_ANGLE;
}
if (level.brickPointValue == undefined) {
level.brickPointValue = DEFAULT_BRICK_POINT_VALUE;
}
if (level.items == undefined) {
level.items = DEFAULT_ITEMS;
}
if (level.recurrence == undefined) {
level.recurrence = DEFAULT_RECURRENCE;
}
levels.push(level);
}
static function isGoodItem(itemID) {
var i = PENALTIES.length;
while ((--i) > -1) {
if (PENALTIES[i] == itemID) {
return(false);
}
}
return(true);
}
static function init() {
Game.PongLevels01To05.init();
Game.PongLevels06To10.init();
__inited = true;
}
static var FRAME_TIME = 0.0666666666666667;
static var D = 1;
static var S = 16;
static var FRIENDS = [0, 1, 2, 3, 4];
static var FOES = [5, 6, 7];
static var FRIENDS_NAMES = ["Kim", "Ron", "Rufus", "Bonnie", "Monique"];
static var FOES_NAMES = ["Drakken", "Shego", "DNAmy"];
static var GOAL_SMALL = 1;
static var GOAL_WIDE = 6;
static var PADDLE_SMALL = 7;
static var PADDLE_WIDE = 2;
static var PADDLE_STICKY = 9;
static var MISSILE = 4;
static var FREEZE_YOU = 5;
static var FREEZE_OPPONENT = 0;
static var BALL_FAST = 8;
static var BALL_SLOW = 3;
static var BONUS_POINTS = 10;
static var BONUSES = [FREEZE_OPPONENT, GOAL_SMALL, PADDLE_WIDE, MISSILE, PADDLE_STICKY, BALL_SLOW];
static var PENALTIES = [FREEZE_YOU, GOAL_WIDE, PADDLE_SMALL, BALL_FAST];
static var ITEM_DESC = ["freeze_opponent", "goal_small", "paddle_wide", "ball_fast", "missile", "freeze_you", "goal_wide", "paddle_small", "ball_slow", "paddle_sticky"];
static var DEFAULT_ITEM_TIME = 20;
static var FREEZE_ITEM_TIME = 5;
static var DEFAULT_BLINK_TIME = 4;
static var FREEZE_BLINK_TIME = 2;
static var DEFAULT_SPEED = 300;
static var LEVEL_SPEED_INCREMENT = 2;
static var MAX_SPEED = 500;
static var MAX_SPEED_INCREASE = 100;
static var DEFAULT_ANGLE = 290;
static var MIN_BALL_ANGLE = 25;
static var PADDLE_SPEED = 350;
static var DEFAULT_COMPUTER_HANDICAP = 250;
static var LEVEL_HANDICAP_DECREASE = 2;
static var MIN_HANDICAP = 150;
static var BALL_SPEED_OFFSET = 75;
static var BALL_MISSILE_FACTOR = 1.9;
static var DEFAULT_ITEMS = [MISSILE, MISSILE, PADDLE_STICKY, PADDLE_STICKY, FREEZE_YOU, FREEZE_OPPONENT, BALL_FAST, BALL_SLOW, GOAL_SMALL, GOAL_WIDE, PADDLE_WIDE, PADDLE_SMALL, BONUS_POINTS, BONUS_POINTS, BONUS_POINTS, BONUS_POINTS, BONUS_POINTS];
static var DEFAULT_RECURRENCE = 7;
static var DEFAULT_BRICK_POINT_VALUE = 25;
static var DEFAULT_BONUS_POINTS_VALUES = [200, 250];
static var DEFAULT_GOOD_ITEM_VALUE = 100;
static var DEFAULT_GOAL_VALUE = 500;
static var DEFAULT_CLEAR_ALL_VALUE = 1000;
static var levels = [];
static var __inited = false;
}
Symbol 576 MovieClip [__Packages.Game.PongLevels01To05] Frame 0
class Game.PongLevels01To05
{
function PongLevels01To05 () {
}
static function init() {
if (__inited) {
return(undefined);
}
var D = Game.PongLevels.D;
var S = Game.PongLevels.S;
var e = Game.PongLevels.e;
var GOAL_SMALL = Game.PongLevels.GOAL_SMALL;
var GOAL_WIDE = Game.PongLevels.GOAL_WIDE;
var PADDLE_SMALL = Game.PongLevels.PADDLE_SMALL;
var PADDLE_WIDE = Game.PongLevels.PADDLE_WIDE;
var PADDLE_STICKY = Game.PongLevels.PADDLE_STICKY;
var MISSILE = Game.PongLevels.MISSILE;
var FREEZE_YOU = Game.PongLevels.FREEZE_YOU;
var FREEZE_OPPONENT = Game.PongLevels.FREEZE_OPPONENT;
var BALL_FAST = Game.PongLevels.BALL_FAST;
var BALL_SLOW = Game.PongLevels.BALL_SLOW;
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, e, e, D, D, D, D, e, e, e], [e, e, e, D, D, D, D, e, e, e], [e, e, e, D, D, D, D, e, e, e], [e, e, e, e, S, S, e, e, e, e], [e, e, e, e, e, D, e, e, e, e], [e, e, e, e, D, e, e, e, e, e], [e, e, e, e, e, D, e, e, e, e], [e, e, e, e, D, e, e, e, e, e], [e, e, e, e, e, D, e, e, e, e], [e, e, e, e, D, e, e, e, e, e], [e, e, e, e, S, S, e, e, e, e], [e, e, e, D, D, D, D, e, e, e], [e, e, e, D, D, D, D, e, e, e], [e, e, e, D, D, D, D, e, e, e]], items:null, recurrence:null});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, e, e, e, e, D, D, e, e, e, e, e], [e, e, e, D, D, S, S, D, D, e, e, e], [e, e, e, D, D, S, S, D, D, e, e, e], [e, e, D, D, D, D, D, D, D, D, e, e], [e, e, D, D, D, D, D, D, D, D, e, e], [e, e, D, D, D, D, D, D, D, D, e, e], [e, e, D, D, D, D, D, D, D, D, e, e], [e, e, e, D, D, S, S, D, D, e, e, e], [e, e, e, D, D, S, S, D, D, e, e, e], [e, e, e, e, e, D, D, e, e, e, e, e]]});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, e, e, e, e, D, D, D, D, e, e, e, e, e], [e, S, S, D, D, D, e, e, D, D, D, S, S, e], [e, D, D, D, D, D, e, e, D, D, D, D, D, e], [e, e, D, D, D, D, e, e, D, D, D, D, e, e], [e, e, e, e, D, D, S, S, D, D, e, e, e, e], [e, e, e, e, D, D, S, S, D, D, e, e, e, e], [e, e, D, D, D, D, e, e, D, D, D, D, e, e], [e, D, D, D, D, D, e, e, D, D, D, D, D, e], [e, S, S, D, D, D, e, e, D, D, D, S, S, e], [e, e, e, e, e, D, D, D, D, e, e, e, e, e]]});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, e, e, D, D, e, e, D, D, e, e, e], [e, e, e, D, D, e, e, D, D, e, e, e], [e, e, e, D, D, e, e, D, D, e, e, e], [e, D, D, S, S, S, S, S, S, D, D, e], [e, D, D, e, e, D, D, e, e, D, D, e], [e, D, D, D, D, D, D, D, D, D, D, e], [e, D, D, e, e, D, S, S, S, S, S, e], [e, S, S, S, S, S, D, e, e, D, D, e], [e, D, D, D, D, D, D, D, D, D, D, e], [e, D, D, e, e, D, D, e, e, D, D, e], [e, D, D, S, S, S, S, S, S, D, D, e], [e, e, e, D, D, e, e, D, D, e, e, e], [e, e, e, D, D, e, e, D, D, e, e, e], [e, e, e, D, D, e, e, D, D, e, e, e]]});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[D, e, e, e, e, D, D, e, e, e, e, D], [e, e, e, e, e, D, D, e, e, e, e, e], [D, D, D, D, D, D, D, D, D, D, D, D], [S, D, D, D, D, D, D, D, D, D, D, S], [D, D, D, D, D, D, D, D, D, D, D, D], [e, e, e, e, S, S, S, S, e, e, e, e], [e, e, e, e, e, D, D, e, e, e, e, e], [e, e, e, e, e, D, D, e, e, e, e, e], [e, e, e, e, S, S, S, S, e, e, e, e], [D, D, D, D, D, D, D, D, D, D, D, D], [S, D, D, D, D, D, D, D, D, D, D, S], [D, D, D, D, D, D, D, D, D, D, D, D], [e, e, e, e, e, D, D, e, e, e, e, e], [D, e, e, e, e, D, D, e, e, e, e, D]]});
__inited = true;
}
static var __inited = false;
}
Symbol 577 MovieClip [__Packages.Game.PongLevels06To10] Frame 0
class Game.PongLevels06To10
{
function PongLevels06To10 () {
}
static function init() {
if (__inited) {
return(undefined);
}
var D = Game.PongLevels.D;
var S = Game.PongLevels.S;
var e = Game.PongLevels.e;
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, e, e, e, e, e, S, e, e, e, e, e, e, e, e], [e, e, e, e, e, e, e, e, e, e, e, e, e, e, e], [S, D, D, e, e, D, D, e, e, D, D, D, D, D, e], [S, D, D, e, e, D, D, e, e, D, S, S, S, D, D], [e, D, D, e, D, D, e, e, e, D, S, e, e, S, D], [e, D, D, D, D, e, e, e, e, D, S, e, e, S, D], [e, D, D, D, D, e, e, e, e, D, S, S, S, D, D], [e, D, S, S, D, D, e, e, e, D, D, D, D, D, e], [e, D, S, e, D, D, e, e, e, D, D, e, e, e, e], [e, D, S, e, e, D, D, e, e, D, D, e, e, e, e], [e, D, S, e, e, D, D, e, e, D, D, e, e, e, S], [e, D, S, e, e, D, D, e, e, D, D, e, e, e, S], [e, e, e, e, e, e, e, e, e, e, e, e, e, e, e], [e, e, e, e, e, e, e, e, e, S, e, e, e, e, e]]});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, e, e, e, e, e, D, S, S, D, e, e, e, e, e, e], [D, D, D, e, e, e, D, S, S, D, e, e, D, D, D, D], [D, S, D, e, e, e, D, D, D, D, e, e, D, S, S, D], [D, D, D, e, e, e, e, e, e, e, e, e, D, S, S, D], [e, e, e, e, e, e, e, e, e, e, e, e, D, D, D, D], [e, e, e, e, e, D, D, D, D, e, e, e, e, e, e, e], [e, e, e, e, e, D, D, S, S, D, e, e, e, e, e, e], [e, e, e, e, e, e, D, S, S, D, D, e, e, e, e, e], [e, e, e, e, e, e, e, D, D, D, D, e, e, e, e, e], [D, D, D, D, e, e, e, e, e, e, e, e, e, e, e, e], [D, S, S, D, e, e, e, e, e, e, e, e, e, D, D, D], [D, S, S, D, e, e, D, D, D, D, e, e, e, D, S, D], [D, D, D, D, e, e, D, S, S, D, e, e, e, D, D, D], [e, e, e, e, e, e, D, S, S, D, e, e, e, e, e, e]]});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, e, e, e, e, D, D, D, D, D, D, e, e, e, e, e], [D, S, D, e, e, D, D, D, D, D, D, e, e, e, e, e], [S, S, S, e, e, D, D, D, D, D, D, e, e, e, e, e], [D, S, D, e, e, D, D, D, D, D, S, S, e, e, e, e], [e, e, e, e, e, D, D, D, S, S, D, D, e, e, e, e], [e, e, e, e, e, D, S, S, D, D, D, D, e, e, e, e], [e, e, e, e, S, S, D, D, D, D, D, D, e, e, e, e], [e, e, e, e, D, D, D, D, D, D, S, S, e, e, e, e], [e, e, e, e, D, D, D, D, S, S, D, e, e, e, e, e], [e, e, e, e, D, D, S, S, D, D, D, e, e, e, e, e], [e, e, e, e, S, S, D, D, D, D, D, e, e, D, S, D], [e, e, e, e, e, D, D, D, D, D, D, e, e, S, S, S], [e, e, e, e, e, D, D, D, D, D, D, e, e, D, S, D], [e, e, e, e, e, D, D, D, D, D, D, e, e, e, e, e]]});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, S, S, D, D, D, S, S, S, S, D, D, D, S, S, e], [e, e, S, e, e, e, e, S, S, e, e, e, e, S, e, e], [e, e, e, e, e, e, e, e, e, e, e, e, e, e, e, e], [e, e, e, e, D, D, D, D, D, D, D, D, e, e, e, e], [e, D, D, D, D, D, D, D, D, D, D, D, D, D, D, e], [e, e, e, D, D, D, S, D, D, S, D, D, D, e, e, e], [D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D], [D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D], [e, e, e, D, D, D, S, D, D, S, D, D, D, e, e, e], [e, D, D, D, D, D, D, D, D, D, D, D, D, D, D, e], [e, e, e, e, D, D, D, D, D, D, D, D, D, e, e, e], [e, e, e, e, e, e, e, e, e, e, e, e, e, e, e, e], [e, e, S, e, e, e, e, S, S, e, e, e, e, S, e, e], [e, S, S, D, D, D, S, S, S, S, D, D, D, S, S, e]]});
Game.PongLevels.addLevel({speed:null, brickPointValue:null, grid:[[e, D, D, D, D, D, D, D, S, S, D, D, D, D, D, D, D, e], [e, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, e], [S, D, D, D, e, e, e, e, e, e, e, e, e, D, D, D, D, S], [e, D, D, e, e, e, e, e, e, e, e, e, e, e, D, D, D, e], [e, D, D, e, D, e, e, e, e, e, e, D, e, e, e, D, D, e], [e, D, e, e, e, e, S, e, e, S, e, e, e, e, e, D, D, e], [e, D, e, e, e, e, e, S, S, e, e, e, e, e, e, D, D, e], [e, D, e, e, e, e, e, e, e, e, e, e, e, S, e, D, D, e], [e, D, D, D, D, D, D, D, D, D, D, D, D, S, e, D, D, e], [e, D, D, e, e, e, D, e, e, D, e, e, e, e, e, D, D, e], [e, D, D, D, e, e, D, e, e, D, e, e, e, e, e, D, D, e], [S, D, D, D, D, D, D, e, e, D, D, D, e, e, e, D, D, S], [e, D, D, D, D, e, D, e, e, D, e, e, e, e, e, D, D, e], [e, D, D, D, D, e, e, S, S, e, e, e, e, e, e, D, D, e]]});
__inited = true;
}
static var __inited = false;
}
Symbol 578 MovieClip [__Packages.GDK.Base] Frame 0
class GDK.Base extends MovieClip
{
var worlds, useMask, setMask, attachMovie, _xscale, _yscale, onResize, mcMask, engineIntervalID, lastUpdate, onStart, onPause, onResume, onStop, activeWorld, onUpdate;
function Base () {
super();
worlds = new GDK.Collection();
if (useMask) {
setMask(attachMovie("Square", "mcMask", 13421568));
}
setSize(Math.round(_xscale), Math.round(_yscale));
_yscale = (_xscale = 100);
for (var i in this) {
if (i.indexOf("mcDead") != -1) {
this[i].swapDepths(1048575);
this[i].removeMovieClip();
}
}
}
function setSize(w, h, noEvent) {
if ((w == width) && (h == height)) {
return(undefined);
}
if (noEvent) {
width = w;
height = h;
} else {
onResize((width = w), (height = h), width, height);
}
if (useMask) {
mcMask._xscale = w;
mcMask._yscale = h;
}
}
function start() {
if (engineIntervalID) {
return(undefined);
}
lastUpdate = getTimer();
engineIntervalID = setInterval(this, "update", 0);
onStart();
update();
}
function pause() {
paused = true;
onPause();
update();
}
function resume() {
paused = false;
onResume();
update();
}
function stop() {
onStop();
clearInterval(engineIntervalID);
delete engineIntervalID;
}
function update() {
var elapsed;
if (paused) {
lastUpdate = getTimer();
return(undefined);
}
activeWorld.update((elapsed = (lastUpdate - ((lastUpdate = getTimer()))) * -0.001));
onUpdate(elapsed);
}
function addWorld(worldObj) {
if (!worlds.addMember(worldObj)) {
return(undefined);
}
worldObj.displayNode = this;
worldObj.engine = this;
}
function removeWorld(worldObj) {
if (!worlds[worldObj]) {
return(undefined);
}
var i = worlds.length;
while ((--i) > -1) {
if (worlds[i] == worldObj) {
worlds.splice(i, 1);
}
}
delete worlds[worldObj];
worldObj.removeFromScene();
}
function setActiveWorld(worldObj) {
if (activeWorld == worldObj) {
return(undefined);
}
activeWorld.removeFromScene();
activeWorld = worldObj;
worldObj.addToScene();
}
function onUnload() {
stop();
setActiveWorld(null);
}
var paused = false;
var width = 100;
var height = 100;
var version = "GDK 1,1,10,0";
}
Symbol 579 MovieClip [__Packages.GDK.Collection] Frame 0
class GDK.Collection extends Array
{
var id, push, length, splice;
function Collection () {
super();
Collections[(id = ++created)] = this;
}
static function removeFromAll(obj) {
var o;
if (!((o = obj.__col))) {
return(undefined);
}
for (var i in o) {
Collections[i].removeMember(obj);
}
}
static function removeAll() {
}
function addMember(obj) {
if (obj.__col[id]) {
return(false);
}
push(obj);
if (!obj.__col) {
obj.__col = {count:0};
}
obj.__col[id] = true;
obj.__col.count++;
return(true);
}
function removeMember(obj) {
if (!obj.__col[id]) {
return(false);
}
var i = length;
while ((--i) > -1) {
if (this[i] == obj) {
splice(i, 1);
break;
}
}
if (!(--obj.__col.count)) {
delete obj.__col;
} else {
delete obj.__col[id];
}
delete this[length];
return(true);
}
function update(elapsed) {
var i = length;
while ((--i) > -1) {
this[i].update(elapsed);
}
}
function send(sID) {
var args = arguments.splice(1);
var i = length;
while ((--i) > -1) {
this[i][sID].apply(this[i], args);
}
}
static var Collections = [];
static var created = 0;
}
Symbol 580 MovieClip [__Packages.GDK.Generic] Frame 0
class GDK.Generic
{
var world, onAddToScene, children, onRemoveFromScene, onBeginParent, onEndParent, onAddChild, displayNode, parent, assetID, onDisplay, target, onAddDisplay, onRemoveDisplay, name;
function Generic () {
uniqueID = ++created;
setRenderable(renderable);
setAffectChildren(affectChildren);
}
function addToScene() {
if (inScene) {
return(undefined);
}
world.addActiveObject(this);
inScene = true;
addDisplay();
onAddToScene();
if (children) {
var i = children.length;
while ((--i) > -1) {
children[i].addToScene();
}
}
}
function removeFromScene() {
if (!inScene) {
return(undefined);
}
removeDisplay();
inScene = false;
world.removeActiveObject(this);
onRemoveFromScene();
if (children) {
var i = children.length;
while ((--i) > -1) {
children[i].removeFromScene();
}
}
}
function setAffectChildren(b) {
if (affectChildren == b) {
return(undefined);
}
if ((affectChildren = b)) {
if (children) {
onBeginParent();
}
} else if (children) {
onEndParent();
}
}
function addChild(child, isolated) {
if ((!allowChildren) || (child.parent == this)) {
return(false);
}
child.parent.removeChild(child);
child.parent = this;
if (world && (world != child.world)) {
world.addObject(child, true);
}
if (children == undefined) {
onBeginParent();
hasChildren = true;
children = [child];
} else {
children.push(child);
}
if (inScene && (!isolated)) {
child.addToScene();
}
onAddChild(child);
return(true);
}
function removeChild(child) {
if ((!children) || (child.parent != this)) {
return(undefined);
}
var i = children.length;
while ((--i) > -1) {
if (children[i] == child) {
children.splice(i, 1);
break;
}
}
child.parent = undefined;
if (!children.length) {
onEndParent();
hasChildren = false;
delete children;
}
}
function addToWorld(newWorld) {
newWorld.addObject(this);
}
function removeFromWorld() {
world.removeObject(this);
}
function detachFromParent(parent) {
parent.removeChild(this);
}
function becomeChildTo(parent) {
parent.addChild(this);
}
function requestDisplaySpace() {
if (!displayNode) {
var t = parent;
while (t) {
if (t.isDisplayNode) {
break;
}
t = t.parent;
}
displayNode = (t ? (t.target) : (world.target));
}
if (assetID != null) {
return(displayNode.attachMovie(assetID, "mc" + uniqueID, 2130690045 - uniqueID));
}
return(displayNode.createEmptyMovieClip("mc" + uniqueID, 2130690045 - uniqueID));
}
function setDisplay() {
onDisplay.apply(this, arguments);
}
function addDisplay() {
if ((!renderable) || (target)) {
return(undefined);
}
queueForDisplay();
target = requestDisplaySpace();
onAddDisplay();
}
function removeDisplay() {
target.swapDepths(1048575);
target.removeMovieClip();
delete target;
onRemoveDisplay();
}
function setAssetID(newAssetID) {
if (assetID == newAssetID) {
return(undefined);
}
if (inScene) {
removeDisplay();
}
assetID = newAssetID;
if (inScene) {
addDisplay();
}
}
function queueForDisplay() {
if (renderable) {
world.queueForDisplay(this);
}
}
function setRenderable(b) {
if (b) {
delete queueForDisplay;
if (inScene) {
addDisplay();
}
} else if (inScene) {
removeDisplay();
}
}
function toString() {
return(((className + " #") + uniqueID) + (name ? (("(" + name) + ")") : ""));
}
static var created = -1;
var className = "Generic";
var uniqueID = -1;
var renderable = false;
var inScene = false;
var affectChildren = true;
var allowChildren = true;
var hasChildren = false;
var isDisplayNode = false;
}
Symbol 581 MovieClip [__Packages.GDK.World] Frame 0
class GDK.World extends GDK.Generic
{
var uniqueID, children, objects, updateList, displayQueue, activeObjects, name, viewport, world, engine, target, onUpdate, removeChild;
function World (name, viewPort) {
super();
uniqueID = ++worldsCreated;
children = null;
objects = [];
updateList = new GDK.Collection();
displayQueue = [];
activeObjects = new GDK.Collection();
this.name = ((name != null) ? (name) : ("World " + uniqueID));
if (viewport) {
addObject(viewport);
} else if (useDefaultCamera) {
addObject((viewport = new GDK.Camera()));
}
world = this;
}
function addActiveObject(obj) {
return(activeObjects.addMember(obj));
}
function removeActiveObject(obj) {
if (!obj.__a) {
return(undefined);
}
delete obj.__a;
var i = activeObjects.length;
while ((--i) > -1) {
if (activeObjects[i] == obj) {
activeObjects.splice(i, 1);
return(undefined);
}
}
}
function addToUpdateList(obj) {
return(updateList.addMember(obj));
}
function removeFromUpdateList(obj) {
return(updateList.removeMember(obj));
}
function sendUpdates(elapsed) {
updateList.update(elapsed);
}
function render(elapsed) {
var i;
if (!((i = displayQueue.length))) {
return(undefined);
}
while ((--i) > -1) {
displayQueue[i].setDisplay(elapsed);
delete displayQueue[i].queueForDisplay;
}
displayQueue = [];
updateAfterEvent();
}
function centerViewport(vertical, horizontal) {
viewport.halfWidth = (target._x = ((viewport.screenWidth = engine.width)) * 0.5);
viewport.halfHeight = (target._y = ((viewport.screenHeight = engine.height)) * 0.5);
}
function queueForDisplay(obj) {
if (!obj.queueForDisplay) {
return(undefined);
}
obj.queueForDisplay = null;
displayQueue.push(obj);
}
function update(elapsed) {
sendUpdates(elapsed);
onUpdate(elapsed);
render(elapsed);
}
function addObject(obj, isolated) {
if (obj.world == this) {
return(false);
}
if (obj.world) {
obj.world.removeObject(obj);
}
objects.push(obj);
obj.world = this;
obj.uniqueID = objectsAdded++;
if (obj.children.length) {
var i = obj.children.length;
while ((--i) > -1) {
addObject(obj.children[i], true);
}
}
if (!isolated) {
addChild(obj, true);
}
obj.positionChanged(0, 0, 0);
obj.onAddToWorld();
return(true);
}
function removeObject(obj) {
obj.removeFromScene();
removeChild(obj);
var i = objects.length;
while ((--i) > -1) {
if (objects[i] == obj) {
objects.splice(i, 1);
break;
}
}
GDK.Collection.removeFromAll(obj);
removeFromUpdateList(obj);
obj.onRemoveFromWorld();
}
function addChild(obj, isolated) {
super.addChild(obj, true);
}
function timelineUpdate(elapsed) {
render(elapsed);
}
static var worldsCreated = -1;
var useDefaultCamera = true;
var className = "World";
var isDisplayNode = true;
var renderable = true;
var affectChildren = false;
var objectsAdded = 0;
}
Symbol 582 MovieClip [__Packages.GDK.Node] Frame 0
class GDK.Node extends GDK.Generic
{
var onCollision, world, onMove, queueForDisplay, children, target, affectChildren;
function Node () {
super();
}
function checkCollisionList(objects, flag, options, maxCol) {
if (maxCol == null) {
maxCol = Number.MAX_VALUE;
}
if (flag == null) {
flag = collisionMask;
}
var count = 0;
var hr;
var i = objects.length;
while ((--i) > -1) {
if (objects[i] == this) {
continue;
}
if ((flag & objects[i].collisionMask) > 0) {
if ((hr = checkCollision(objects[i]))) {
count++;
if (((!(hr & COLLISION_SKIP_EVENT)) && (onCollision(objects[i], options) == COLLISION_CANCEL)) || (count >= maxCol)) {
break;
}
}
}
}
return(count);
}
function checkCollision(obj) {
return(false);
}
function moveTo(x, y, z) {
moveBy(x - this.x, y - this.y, z - this.z);
}
function moveBy(x, y, z) {
if ((x || (y)) || (z)) {
this.x = this.x + x;
this.y = this.y + y;
this.z = this.z + z;
positionChanged(x, y, z);
}
}
function moveToGlobally(x, y, z) {
}
function positionChanged(xShift, yShift, zShift) {
world.onObjectMoved(this);
onMove();
queueForDisplay();
}
function pv_positionChanged(xShift, yShift, zShift) {
var i = children.length;
while ((--i) > -1) {
children[i].moveBy(xShift, yShift, zShift);
}
queueForDisplay();
}
function display() {
setDisplay.apply(this, arguments);
delete queueForDisplay;
}
function setDisplay() {
target._x = x;
target._y = y;
}
function getUpdates() {
world.updateList.addMember(this);
}
function cancelUpdates() {
world.updateList.removeMember(this);
}
function onBeginParent() {
if (!affectChildren) {
return(undefined);
}
positionChanged = pv_positionChanged;
}
function onEndParent() {
delete positionChanged;
}
function timelineUpdate() {
queueForDisplay();
}
static var COLLISION_OK = 1;
static var COLLISION_CANCEL = 2;
static var COLLISION_SKIP_EVENT = 4;
var className = "Node";
var renderable = true;
var x = 0;
var y = 0;
var z = 0;
var collisionMask = 0;
}
Symbol 583 MovieClip [__Packages.GDK.Group] Frame 0
class GDK.Group extends GDK.Node
{
function Group () {
super();
}
var className = "Group";
var renderable = false;
var setDisplay = null;
}
Symbol 584 MovieClip [__Packages.GDK.Camera] Frame 0
class GDK.Camera extends GDK.Group
{
var world, xChange, yChange, zChange;
function Camera () {
super();
}
function positionChanged(xShift, yShift, zShift) {
changed = true;
world.onViewportChanged(this, (xChange = xShift), (yChange = yShift), (zChange = zShift));
}
function setFieldOfView(angle) {
if (FOV - angle) {
tanFOV = Math.tan(((FOV = angle)) * 0.008726646);
}
}
var FOV = 60;
var tanFOV = 0.577350269189626;
var screenWidth = 0;
var screenHeight = 0;
var halfWidth = 0;
var halfHeight = 0;
var changed = false;
var viewDistance = 100;
var className = "Camera";
var renderable = false;
}
Symbol 585 MovieClip [__Packages.Game.PongGame] Frame 0
class Game.PongGame
{
static var LEVELS;
var player, opponent, side, humanSide, computerSide, timeline, world, __scoreboard, __engine, __levelData, __goalUpdate, __itemLeft, __itemRight, dialog, __blinkSide, __blinkTimer, __frameElapsedTime, __blinkGoalDisp;
function PongGame (myTimeline, myEngine, myScoreboard, setup) {
if (!__inited) {
init();
}
player = setup.player;
opponent = setup.opponent;
side = setup.side;
if (side == 1) {
humanSide = RIGHT_PLAYER;
computerSide = LEFT_PLAYER;
} else {
humanSide = LEFT_PLAYER;
computerSide = RIGHT_PLAYER;
}
level = (((setup.startLevel != undefined) ? (setup.startLevel) : 0));
timeline = myTimeline;
scoreboard = (myScoreboard);
engine = (myEngine);
}
function reset() {
level = (0);
score = (0);
scoreboard.resetGoals();
world.clearLevel();
}
function set scoreboard(myScoreboard) {
__scoreboard = myScoreboard;
__scoreboard.__set__score(score);
__scoreboard.__set__level(level);
if (side == 1) {
__scoreboard.__set__playerLeft(FOES[opponent]);
__scoreboard.__set__playerRight(FRIENDS[player]);
} else {
__scoreboard.__set__playerLeft(FRIENDS[player]);
__scoreboard.__set__playerRight(FOES[opponent]);
}
__scoreboard.addEventListener("click", this);
//return(scoreboard);
}
function get scoreboard() {
return(__scoreboard);
}
function set engine(myEngine) {
__engine = myEngine;
world = new Engine.PongWorld();
world.humanSide = humanSide;
world.addEventListener("onGameUpdate", this);
world.addEventListener("onGoal", this);
world.addEventListener("onPoints", this);
world.addEventListener("onWorldDisplay", this);
world.addEventListener("onActivateItem", this);
world.addEventListener("onBlinkItem", this);
world.addEventListener("onBallInPlay", this);
__engine.addWorld(world);
__engine.setActiveWorld(world);
__engine.start();
//return(engine);
}
function get engine() {
return(__engine);
}
function set score(newScore) {
if (newScore < 0) {
newScore = 0;
}
__score = newScore;
__scoreboard.__set__score(__score);
//return(score);
}
function get score() {
return(__score);
}
function set level(newLevel) {
__level = newLevel;
__scoreboard.__set__level(newLevel);
while (newLevel > (LEVELS.length - 1)) {
newLevel = newLevel - LEVELS.length;
}
__levelData = LEVELS[newLevel];
//return(level);
}
function get level() {
return(__level);
}
function startLevel() {
scoreboard.resetGoals();
engine.resume();
world.clearLevel();
world.createLevel(level, __levelData);
}
function onWorldDisplay(eventObj) {
startLevel();
}
function onGameUpdate(eventObj) {
var elapsed = eventObj.elapsed;
checkBlinkLights(elapsed);
if (Key.isDown(80)) {
click({data:"pause"});
return(undefined);
}
if (Key.isDown(17) && (Key.isDown(16))) {
if (Key.isDown(48)) {
if (level != 9) {
level = (9);
stopAllSounds();
startLevel();
}
}
var i;
var i = 49;
while (i <= 57) {
if (Key.isDown(i)) {
if (level != (i - 49)) {
level = (i - 49);
stopAllSounds();
startLevel();
}
break;
}
i++;
}
if (Key.isDown(77)) {
var snd = new Sound(timeline);
snd.setVolume(0);
return(undefined);
}
if (Key.isDown(78)) {
var snd = new Sound(timeline);
snd.setVolume(100);
return(undefined);
}
}
}
function onGoal(eventObj) {
var who = eventObj.who;
var goals;
if (who == LEFT_PLAYER) {
goals = __scoreboard.__set__goalsLeft((__scoreboard.__get__goalsLeft()+1));
} else if (who == RIGHT_PLAYER) {
goals = __scoreboard.__set__goalsRight((__scoreboard.__get__goalsRight()+1));
}
__goalUpdate = {who:who, goals:goals};
startBlinkLights(who);
}
function reactToGoal() {
if (__goalUpdate == undefined) {
return(undefined);
}
if (__goalUpdate.goals < GOALS_PER_LEVEL) {
delete __goalUpdate;
world.getReady();
return(undefined);
}
if (__goalUpdate.who == humanSide) {
delete __goalUpdate;
levelDone();
return(undefined);
}
delete __goalUpdate;
gameOver();
}
function onPoints(eventObj) {
var points = eventObj.points;
var who = eventObj.who;
var source = eventObj.source;
if (who == humanSide) {
if ((((source == "brick") || (source == "bonuspoints")) || (source == "goal")) || (source == "gooditem")) {
score = score + points;
}
return(undefined);
}
if (source == "bonuspoints") {
score = score - points;
return(undefined);
}
if (source == "brick") {
score = score + points;
}
}
function onActivateItem(eventObj) {
var itemID = eventObj.itemID;
var who = eventObj.who;
if (itemID > -1) {
toggleLight(who, true);
} else {
toggleLight(who, false);
}
if (who == LEFT_PLAYER) {
__scoreboard.__set__itemLeft((__itemLeft = itemID + 1));
} else {
__scoreboard.__set__itemRight((__itemRight = itemID + 1));
}
}
function onBlinkItem(eventObj) {
var who = eventObj.who;
if (who == LEFT_PLAYER) {
if (__scoreboard.__get__itemLeft() == __itemLeft) {
__scoreboard.__set__itemLeft(0);
} else {
__scoreboard.__set__itemLeft(__itemLeft);
}
} else if (__scoreboard.__get__itemRight() == __itemRight) {
__scoreboard.__set__itemRight(0);
} else {
__scoreboard.__set__itemRight(__itemRight);
}
}
function click(eventObj) {
__engine.pause();
var mute = new Sound(world.target);
mute.setVolume(0);
if (eventObj.data == "pause") {
dialog = createDialog(dialogPauseID);
return(undefined);
}
if (eventObj.data == "help") {
dialog = createDialog(dialogHelpID);
return(undefined);
}
if (eventObj.data == "quit") {
dialog = createDialog(dialogQuitID);
dialog.score = score;
dialog.addEventListener("onSubmitScore", this);
return(undefined);
}
}
function onSubmitScore(eventObj) {
eventObj.target.removeMovieClip();
stopAllSounds();
engine.stop();
timeline.submitScore(score);
}
function closeModal(eventObj) {
var name = eventObj.name;
if (((name == "help") || (name == "quit")) || (name == "pause")) {
__engine.resume();
var unmute = new Sound(world.target);
unmute.setVolume(100);
return(undefined);
}
if (name == "leveldone") {
level = ((level+1));
startLevel();
return(undefined);
}
if (name == "gameover") {
stopAllSounds();
engine.stop();
timeline.newGame();
return(undefined);
}
}
function toString() {
return("PongGame");
}
function createDialog(id) {
if (dialog) {
dialog.close();
}
_root._quality = "BEST";
dialog = timeline.attachMovie(id, "dialog", DIALOG_LEVEL);
dialog.addEventListener("closeModal", this);
return(dialog);
}
function levelDone() {
world.__set__active(false);
world.clearLevel();
engine.pause();
dialog = createDialog(dialogLevelDoneID);
dialog.level = level + 1;
}
function gameOver() {
world.__set__active(false);
engine.pause();
dialog = createDialog(dialogGameOverID);
dialog.score = score;
dialog.addEventListener("onSubmitScore", this);
}
function checkBlinkLights(elapsed) {
if (__blinkSide == null) {
return(undefined);
}
__blinkTimer = __blinkTimer + elapsed;
var timeLeft = (__blinkTime - __blinkTimer);
if (timeLeft > 0) {
__frameElapsedTime = __frameElapsedTime + elapsed;
if (__frameElapsedTime >= (FRAME_TIME * 2)) {
__frameElapsedTime = __frameElapsedTime - (FRAME_TIME * 2);
toggleLight(__blinkSide);
toggleGoalDisp(__blinkGoalDisp);
}
} else {
stopBlinkLights();
}
}
function startBlinkLights(who) {
__blinkTimer = 0;
__frameElapsedTime = 0;
__blinkSide = ((who == LEFT_PLAYER) ? (RIGHT_PLAYER) : (LEFT_PLAYER));
__blinkGoalDisp = who;
}
function onBallInPlay() {
stopBlinkLights();
}
function stopBlinkLights() {
toggleLight(__blinkSide, false);
__blinkSide = null;
toggleGoalDisp(__blinkGoalDisp, true);
__blinkGoalDisp = null;
reactToGoal();
}
function toggleGoalDisp(side, force) {
var goalDisp_txt;
if (side == LEFT_PLAYER) {
goalDisp_txt = __scoreboard.goalsLeft_txt;
} else {
goalDisp_txt = __scoreboard.goalsRight_txt;
}
if (force == undefined) {
goalDisp_txt._visible = (goalDisp_txt._visible ? false : true);
} else {
goalDisp_txt._visible = force;
}
}
function toggleLight(side, force) {
var light_mc;
if (side == LEFT_PLAYER) {
light_mc = timeline.arena_mc.activeLeft_mc;
} else {
light_mc = timeline.arena_mc.activeRight_mc;
}
if (force == undefined) {
light_mc.gotoAndStop(((light_mc._currentframe == 1) ? 3 : 1));
} else {
light_mc.gotoAndStop((force ? 3 : 1));
}
}
function init() {
LEVELS = Game.PongLevels.getLevels();
__inited = true;
}
static var LEFT_PLAYER = "left";
static var RIGHT_PLAYER = "right";
static var GOALS_PER_LEVEL = 3;
static var FRIENDS = Game.PongLevels.FRIENDS;
static var FOES = Game.PongLevels.FOES;
static var DIALOG_LEVEL = 16000;
var dialogHelpID = "DialogHelp";
var dialogPauseID = "DialogPause";
var dialogQuitID = "DialogQuit";
var dialogLevelDoneID = "DialogLevelDone";
var dialogGameOverID = "DialogGameOver";
var __score = 0;
var __level = 0;
static var FRAME_TIME = Game.PongLevels.FRAME_TIME;
var __blinkTime = 1;
static var __inited = false;
}
Symbol 586 MovieClip [__Packages.Engine.PongWorld] Frame 0
class Engine.PongWorld extends GDK.World
{
var __items, __waitedTime, __displayDelay, __brickGrid, __ball, __maxLevelSpeed, sendUpdates, render, dispatchEvent, target, bounds, corners, __leftGoal, __rightGoal, __leftPaddle, __paddleLastTouched, __rightPaddle, __brickPointValue, humanSide, __levelItems, __levelItemRecurrence, __currentLevelItemRecurrence, __freezeItemTime, __itemTime, __defaultItemTime, __freezeBlinkTime, __itemBlinkTime, __defaultBlinkTime, __bonusPointValues, __goodItemValue, __goalValue, __computerPlayer, __getReady, engine, addObject, __humanPaddle, __computerPaddle, __humanGoal, __computerGoal, __humanPlayer, __ballInGoal, __currentLevelItems, __itemActiveTime, __currentActiveItemID, __currentActiveObject, removeObject;
function PongWorld () {
super();
if (!__inited) {
init();
}
__items = new GDK.Collection();
}
function set active(flag) {
__active = flag;
//return(active);
}
function get active() {
return(__active);
}
function update(elapsed) {
if (!canUpdate) {
return(undefined);
}
canUpdate = false;
if (elapsed > MAX_ELAPSED) {
elapsed = MAX_ELAPSED;
_root._quality = "LOW";
}
if ((!active) && (__waitedTime != null)) {
__waitedTime = __waitedTime + elapsed;
if (__waitedTime >= __displayDelay) {
startLevel();
}
}
if (__brickGrid.destructibleCount <= 0) {
var speed = (__ball.__get__defaultSpeed() + (elapsed * 5));
if (speed > __maxLevelSpeed) {
speed = __maxLevelSpeed;
}
__ball.__set__defaultSpeed(speed);
}
if (active) {
checkActiveItem(elapsed);
updatePlayers(elapsed);
}
sendUpdates(elapsed);
onUpdate(elapsed);
render(elapsed);
canUpdate = true;
}
function onUpdate(elapsed) {
dispatchEvent({type:"onGameUpdate", elapsed:elapsed});
}
function onAddDisplay() {
Engine.PongSFX.setTarget(target);
determineBounds();
createBoard();
dispatchEvent({type:"onWorldDisplay"});
}
function startLevel() {
delete __waitedTime;
delete __displayDelay;
active = (true);
getReady();
}
function checkBounds(o, elapsed) {
if (o != __ball) {
return(checkItemBounds(o));
}
var myBall = o;
var crossV;
var currentPos = myBall.currentPos;
if (currentPos.y < bounds.yMin) {
crossV = findIntersection4p(corners.tl, corners.tr, myBall.currentPos, myBall.lastPos);
if (crossV) {
myBall.deflectH(crossV);
Engine.PongSFX.playBounce();
return(true);
}
} else if (bounds.yMax < currentPos.y) {
crossV = findIntersection4p(corners.bl, corners.br, myBall.currentPos, myBall.lastPos);
if (crossV) {
myBall.deflectH(crossV);
Engine.PongSFX.playBounce();
return(true);
}
}
if (currentPos.x < bounds.xMin) {
if (checkGoal(__leftGoal, myBall)) {
scoreGoal(RIGHT_PLAYER, __leftGoal);
return(true);
}
crossV = findIntersection4p(corners.tl, corners.bl, myBall.currentPos, myBall.lastPos);
if (crossV) {
myBall.deflectV(crossV);
Engine.PongSFX.playBounce();
return(true);
}
} else if (bounds.xMax < currentPos.x) {
if (checkGoal(__rightGoal, myBall)) {
scoreGoal(LEFT_PLAYER, __rightGoal);
return(true);
}
crossV = findIntersection4p(corners.tr, corners.br, myBall.currentPos, myBall.lastPos);
if (crossV) {
myBall.deflectV(crossV);
Engine.PongSFX.playBounce();
return(true);
}
}
return(false);
}
function checkPaddles(o) {
if (o == __ball) {
if (o.x < bounds.hCenter) {
if (__leftPaddle.checkCollision(o)) {
__paddleLastTouched = LEFT_PLAYER;
return(true);
}
return(false);
}
if (__rightPaddle.checkCollision(o)) {
__paddleLastTouched = RIGHT_PLAYER;
return(true);
}
return(false);
}
return(checkItemPaddles(o));
}
function scorePointsForBrick(collBrick) {
var who = __paddleLastTouched;
var points = __brickPointValue;
if ((__brickGrid.destructibleCount <= 0) && (collBrick.__get__type() == DESTRUCTIBLE)) {
var where = new Vector(bounds.hCenter, bounds.vCenter);
releaseBonusPoints(Game.PongLevels.BONUS_POINTS, where, humanSide, Game.PongLevels.DEFAULT_CLEAR_ALL_VALUE);
}
scorePoints(points, who, "brick");
var where = new Vector(collBrick.x, collBrick.y, 0);
triggerItem(who, where);
}
function checkBricks(ball) {
var collBrick = __brickGrid.checkCollision(ball);
if (!collBrick) {
return(false);
}
if ((collBrick.__get__type() == DESTRUCTIBLE) || (ball.__get__blast())) {
scorePointsForBrick(collBrick);
}
return(true);
}
function createLevel(levelNum, levelData) {
Engine.PongSFX.setMusic(levelNum);
active = (false);
__levelItems = levelData.items;
__levelItemRecurrence = (__currentLevelItemRecurrence = levelData.recurrence);
resetItems();
__ballSpeed = (levelData.speed ? (levelData.speed) : (Game.PongLevels.DEFAULT_SPEED));
__ballSpeed = __ballSpeed + (levelNum * Game.PongLevels.LEVEL_SPEED_INCREMENT);
if (__ballSpeed > Game.PongLevels.MAX_SPEED) {
__ballSpeed = Game.PongLevels.MAX_SPEED;
}
__maxLevelSpeed = __ballSpeed + Game.PongLevels.MAX_SPEED_INCREASE;
if (__maxLevelSpeed > Game.PongLevels.MAX_SPEED) {
__maxLevelSpeed = Game.PongLevels.MAX_SPEED;
}
__ballAngle = (levelData.angle ? (levelData.angle) : (Game.PongLevels.DEFAULT_ANGLE));
__freezeItemTime = (levelData.freezeItemTime ? (levelData.freezeItemTime) : (Game.PongLevels.FREEZE_ITEM_TIME));
__itemTime = (__defaultItemTime = (levelData.itemTime ? (levelData.itemTime) : (Game.PongLevels.DEFAULT_ITEM_TIME)));
__freezeBlinkTime = (levelData.freezeBlinkTime ? (levelData.freezeBlinkTime) : (Game.PongLevels.FREEZE_BLINK_TIME));
__itemBlinkTime = (__defaultBlinkTime = (levelData.itemTime ? (levelData.blinkTime) : (Game.PongLevels.DEFAULT_BLINK_TIME)));
__brickPointValue = (levelData.brickPointValue ? (levelData.brickPointValue) : (Game.PongLevels.DEFAULT_BRICK_POINT_VALUE));
__bonusPointValues = (levelData._bonusPointValues ? (levelData._bonusPointValues) : (Game.PongLevels.DEFAULT_BONUS_POINTS_VALUES));
__goodItemValue = (levelData.goodItemValue ? (levelData.goodItemValue) : (Game.PongLevels.DEFAULT_GOOD_ITEM_VALUE));
__goalValue = (levelData.goalValue ? (levelData.goalValue) : (Game.PongLevels.DEFAULT_GOAL_VALUE));
var handicap = (levelData.computerHandicap ? (levelData.computerHandicap) : (Game.PongLevels.DEFAULT_COMPUTER_HANDICAP));
handicap = handicap - (levelNum * Game.PongLevels.LEVEL_HANDICAP_DECREASE);
if (handicap < Game.PongLevels.MIN_HANDICAP) {
handicap = Game.PongLevels.MIN_HANDICAP;
}
__computerPlayer.__set__handicap(handicap);
resetPaddles();
resetBall();
var grid = levelData.grid;
var gridHeight = grid.length;
var gridWidth = grid[0].length;
__brickGrid = new Engine.PongGrid(gridWidth, gridHeight);
__brickGrid.__set__world(this);
__brickGrid.gridSize = GRID_SIZE;
var gridX = (GRID_X + (Math.floor((GRID_WIDTH - gridWidth) / 2) * GRID_SIZE));
var gridY = (GRID_Y + (Math.floor((GRID_HEIGHT - gridHeight) / 2) * GRID_SIZE));
__brickGrid.moveTo(gridX, gridY);
var xPos;
var yPos;
var item;
var index = 0;
var displayDelay = 0;
yPos = 0;
while (yPos < gridHeight) {
xPos = 0;
while (xPos < gridWidth) {
item = grid[yPos][xPos];
if (!item) {
} else {
__brickGrid.addItemAt(xPos, yPos, item, {gridIndex:index, displayDelay:displayDelay});
displayDelay = displayDelay + DELAY_INCREMENT;
index++;
}
xPos++;
}
yPos++;
}
__displayDelay = displayDelay;
__waitedTime = 0;
}
function clearLevel() {
if (!__brickGrid) {
return(undefined);
}
__brickGrid.removeAll();
delete __brickGrid;
clearBonusItems();
}
function getReady() {
__ball.__set__active(true);
resetPaddles();
resetBall();
__getReady.show();
}
function clearGetReady() {
Engine.PongSFX.startMusic();
if (!__getReady.active) {
return(undefined);
}
__getReady.hide();
dispatchEvent({type:"onBallInPlay"});
}
function init() {
mx.events.EventDispatcher.initialize(Engine.PongWorld.prototype);
__inited = true;
}
function scoreGoal(who, myGoal) {
clearBonusItems();
__ball.__set__active(false);
Engine.PongSFX.stopMusic();
Engine.PongSFX.playGoal();
if (who == humanSide) {
Engine.PongSFX.playGoalCheer();
} else {
Engine.PongSFX.playGoalOhh();
}
scorePoints(__goalValue, who, "goal");
dispatchEvent({type:"onGoal", who:who});
}
function scorePoints(points, who, source) {
dispatchEvent({type:"onPoints", who:who, points:points, source:source});
}
function determineBounds() {
bounds = {xMin:x, yMin:y, xMax:engine.width, yMax:engine.height, hCenter:Math.floor((engine.width - x) / 2), vCenter:Math.floor((engine.height - y) / 2)};
corners = {tl:new Vector(bounds.xMin, bounds.yMin, 0), tr:new Vector(bounds.xMax, bounds.yMin, 0), br:new Vector(bounds.xMax, bounds.yMax, 0), bl:new Vector(bounds.xMin, bounds.yMax, 0)};
}
function createBoard() {
__getReady = new Game.Objects.GetReady(GET_READY_TIME);
addObject(__getReady);
var vCenter = bounds.vCenter;
__rightPaddle = new Game.Objects.Paddle(RIGHT_PLAYER, DEFAULT_PADDLE_SIZE);
__rightPaddle.setBounds(bounds);
addObject(__rightPaddle);
__rightPaddle.addEventListener("onHoldBall", this);
__rightPaddle.addEventListener("onReleaseBall", this);
__leftPaddle = new Game.Objects.Paddle(LEFT_PLAYER, DEFAULT_PADDLE_SIZE);
__leftPaddle.setBounds(bounds);
addObject(__leftPaddle);
__leftPaddle.addEventListener("onHoldBall", this);
__leftPaddle.addEventListener("onReleaseBall", this);
var stuck = true;
__ball = new Game.Objects.Ball(__ballSpeed, __ballAngle, stuck);
addObject(__ball);
__rightGoal = new Game.Objects.Goal(RIGHT_PLAYER, DEFAULT_GOAL_SIZE);
__rightGoal.moveTo(bounds.xMax, vCenter, 0);
addObject(__rightGoal);
__leftGoal = new Game.Objects.Goal(LEFT_PLAYER, DEFAULT_GOAL_SIZE);
__leftGoal.moveTo(bounds.xMin, vCenter, 0);
addObject(__leftGoal);
resetPaddles();
if (humanSide == LEFT_PLAYER) {
__humanPaddle = __leftPaddle;
__computerPaddle = __rightPaddle;
__humanGoal = __leftGoal;
__computerGoal = __rightGoal;
var computerSide = RIGHT_PLAYER;
} else {
__humanPaddle = __rightPaddle;
__computerPaddle = __leftPaddle;
__humanGoal = __rightGoal;
__computerGoal = __leftGoal;
var computerSide = LEFT_PLAYER;
}
__computerPlayer = new Game.Players.ComputerPlayer(this, __computerPaddle, __ball, __computerGoal, computerSide);
__humanPlayer = new Game.Players.HumanPlayer(this, __humanPaddle, __ball, __humanGoal, humanSide);
resetBall();
}
function resetPaddles() {
var vCenter = bounds.vCenter;
__rightPaddle.moveTo(bounds.xMax - (2 * GRID_SIZE), vCenter, 0);
__rightPaddle.__set__width(DEFAULT_PADDLE_SIZE);
__leftPaddle.moveTo(2 * GRID_SIZE, vCenter, 0);
__leftPaddle.__set__width(DEFAULT_PADDLE_SIZE);
__humanPlayer.deactivateItem();
__computerPlayer.deactivateItem();
}
function resetBall() {
__ballInGoal = false;
__ball.__set__defaultSpeed(__ballSpeed);
__ball.__set__angle(__ballAngle);
__ball.__set__blast(false);
__humanPaddle.holdBall(__ball);
__paddleLastTouched = humanSide;
deactivateCurrentItem();
}
function checkGoal(goal, ball) {
if (ball.y < goal.top) {
return(false);
}
if (ball.y > goal.bottom) {
return(false);
}
return(true);
}
function findIntersection4p(l0p0, l0p1, l1p0, l1p1) {
var uA = ((((l1p1.x - l1p0.x) * (l0p0.y - l1p0.y)) - ((l1p1.y - l1p0.y) * (l0p0.x - l1p0.x))) / (((l1p1.y - l1p0.y) * (l0p1.x - l0p0.x)) - ((l1p1.x - l1p0.x) * (l0p1.y - l0p0.y))));
if ((0 <= uA) && (uA <= 1)) {
return(new Vector(l0p0.x + (uA * (l0p1.x - l0p0.x)), l0p0.y + (uA * (l0p1.y - l0p0.y)), 0));
}
return(null);
}
function updatePlayers(elapsed) {
if (!__active) {
return(undefined);
}
__humanPlayer.update(elapsed);
__computerPlayer.update(elapsed);
}
function resetItems() {
__currentLevelItems = [];
var i = __levelItems.length;
while ((--i) > -1) {
__currentLevelItems[i] = __levelItems[i];
}
}
function pickItem() {
if (__currentLevelItems.length < 1) {
resetItems();
}
var index = Math.floor(Math.random() * __currentLevelItems.length);
var item = __currentLevelItems[index];
__currentLevelItems.splice(index, 1);
return(item);
}
function getMissileTarget(from) {
if (from == LEFT_PLAYER) {
return(__rightGoal);
}
return(__leftGoal);
}
function triggerItem(who, where) {
if (__levelItems.length < 1) {
return(undefined);
}
__currentLevelItemRecurrence--;
var pickAnItem = Math.floor(Math.random() * __currentLevelItemRecurrence);
if (pickAnItem > 0) {
return(undefined);
}
var itemID = pickItem();
__currentLevelItemRecurrence = __levelItemRecurrence;
releaseItem(itemID, where, __paddleLastTouched);
}
function releaseItem(itemID, where, who) {
if (itemID == Game.PongLevels.BONUS_POINTS) {
releaseBonusPoints.apply(this, arguments);
return(undefined);
}
var dir;
if (who == LEFT_PLAYER) {
dir = new Vector(-1, 0, 0);
} else {
dir = new Vector(1, 0, 0);
}
var speed = (__ballSpeed / 4.5);
var o = (new Game.Objects.BonusItem(itemID, dir, speed));
o.moveTo(where.x, where.y, where.z);
addObject(o);
__items.addMember(o);
Engine.PongSFX.playReleaseItem();
}
function getItems() {
return(__items);
}
function releaseBonusPoints(itemID, where, who, value) {
var dir;
if (who == humanSide) {
dir = new Vector(0, -1, 0);
Engine.PongSFX.playCatchGoodItem();
} else {
dir = new Vector(0, 1, 0);
Engine.PongSFX.playCatchBadItem();
}
if (value == null) {
var values = __bonusPointValues;
var index = Math.floor(Math.random() * values.length);
value = values[index];
}
scorePoints(value, who, "bonuspoints");
if (who != humanSide) {
value = -value;
}
var o = (new Game.Objects.BonusPointsItem(itemID, dir, value));
o.moveTo(where.x, where.y, where.z);
addObject(o);
__items.addMember(o);
}
function onCatchItem(itemID, who) {
if (isGoodItem(itemID)) {
scorePoints(__goodItemValue, who, "gooditem");
Engine.PongSFX.playCatchGoodItem();
} else {
Engine.PongSFX.playCatchBadItem();
}
if ((itemID == Game.PongLevels.BALL_FAST) || (itemID == Game.PongLevels.BALL_SLOW)) {
__itemActiveTime = 0;
__itemTime = __defaultItemTime;
__currentActiveItemID = itemID;
__currentActiveObject = __ball;
__ball.activateItem(itemID);
return(undefined);
}
var myPaddle;
var myGoal;
var myPlayer;
var newObject;
if (((who == humanSide) && (itemID != Game.PongLevels.FREEZE_OPPONENT)) || ((who != humanSide) && (itemID == Game.PongLevels.FREEZE_OPPONENT))) {
myPaddle = __humanPaddle;
myGoal = __humanGoal;
myPlayer = __humanPlayer;
} else {
myPaddle = __computerPaddle;
myGoal = __computerGoal;
myPlayer = __computerPlayer;
}
if (itemID == Game.PongLevels.FREEZE_OPPONENT) {
itemID = Game.PongLevels.FREEZE_YOU;
}
if ((itemID == Game.PongLevels.GOAL_WIDE) || (itemID == Game.PongLevels.GOAL_SMALL)) {
newObject = myGoal;
} else if (((((itemID == Game.PongLevels.PADDLE_WIDE) || (itemID == Game.PongLevels.PADDLE_SMALL)) || (itemID == Game.PongLevels.FREEZE_YOU)) || (itemID == Game.PongLevels.PADDLE_STICKY)) || (itemID == Game.PongLevels.MISSILE)) {
newObject = myPaddle;
if (itemID == Game.PongLevels.FREEZE_YOU) {
Engine.PongSFX.playPaddleFreeze();
} else {
Engine.PongSFX.playPaddleChange();
}
} else {
return(undefined);
}
if (itemID == Game.PongLevels.FREEZE_YOU) {
var itemTime = __freezeItemTime;
var itemBlinkTime = __freezeBlinkTime;
} else {
var itemTime = __defaultItemTime;
var itemBlinkTime = __defaultBlinkTime;
}
myPlayer.activateItem(newObject, itemID, itemTime, itemBlinkTime);
}
function isGoodItem(itemID) {
return(Game.PongLevels.isGoodItem(itemID));
}
function onHoldBall(eventObj) {
__ball.__set__angle(__ballAngle);
}
function onReleaseBall(eventObj) {
var paddle = eventObj.target;
clearGetReady();
if (__ball.__get__blast()) {
Engine.PongSFX.playMissileTakeOff();
} else {
Engine.PongSFX.playPuckRelease();
}
}
function deactivateCurrentItem() {
if (__currentActiveObject == null) {
return(undefined);
}
__currentActiveObject.deactivateItem();
delete __currentActiveObject;
delete __itemActiveTime;
delete __itemTime;
}
function checkActiveItem(elapsed) {
if (!__currentActiveObject) {
return(undefined);
}
__itemActiveTime = __itemActiveTime + elapsed;
if (__itemActiveTime >= __itemTime) {
deactivateCurrentItem();
return(undefined);
}
}
function checkItemBounds(o) {
if ((o.motionLeft < bounds.xMin) || (bounds.xMax < o.motionRight)) {
return(true);
}
if ((o.motionTop < bounds.yMin) || (bounds.yMax < o.motionBottom)) {
return(true);
}
return(false);
}
function checkItemPaddles(o) {
if (o.x < bounds.hCenter) {
if (__leftPaddle.checkItemCollision(o)) {
onCatchItem(o.itemIndex, LEFT_PLAYER);
return(true);
}
return(false);
}
if (__rightPaddle.checkItemCollision(o)) {
onCatchItem(o.itemIndex, RIGHT_PLAYER);
return(true);
}
return(false);
}
function clearBonusItems() {
deactivateCurrentItem();
while (__items.length > 0) {
var o = __items[0];
removeObject(o);
}
dispatchEvent({type:"onActivateItem", itemID:-1, who:LEFT_PLAYER});
dispatchEvent({type:"onActivateItem", itemID:-1, who:RIGHT_PLAYER});
}
var useDefaultCamera = true;
var updateID = 0;
static var MAX_ELAPSED = 0.0666666666666667;
static var FRAME_TIME = Game.PongLevels.FRAME_TIME;
static var DELAY_INCREMENT = FRAME_TIME / 5;
var GRID_SIZE = 15;
var GRID_WIDTH = 300 / Engine.PongWorld.prototype.GRID_SIZE;
var GRID_HEIGHT = 210 / Engine.PongWorld.prototype.GRID_SIZE;
var GRID_X = 90;
var GRID_Y = 0;
var BALL_SIZE = 12;
static var SOLID = Game.PongLevels.S;
static var DESTRUCTIBLE = Game.PongLevels.D;
var LEFT_PLAYER = "left";
var RIGHT_PLAYER = "right";
var DEFAULT_GOAL_SIZE = 1;
var DEFAULT_PADDLE_SIZE = 0;
static var GET_READY_TIME = 2;
var x = 0;
var y = 0;
var __ballSpeed = Game.PongLevels.DEFAULT_SPEED;
var __ballAngle = Game.PongLevels.DEFAULT_ANGLE;
var __active = false;
var canUpdate = true;
static var __inited = false;
}
Symbol 587 MovieClip [__Packages.Engine.PongObject] Frame 0
class Engine.PongObject extends GDK.Node
{
var addToScene, x, target, y, onDisplay;
function PongObject () {
super();
if (!__inited) {
init();
}
}
function onAddToWorld() {
if (autoAddToScene) {
addToScene();
}
}
function setDisplay() {
target._x = x;
target._y = y;
onDisplay.apply(this, arguments);
}
function init() {
mx.events.EventDispatcher.initialize(Engine.PongObject.prototype);
__inited = true;
}
function findIntersection4p(l0p0, l0p1, l1p0, l1p1) {
var uA = ((((l1p1.x - l1p0.x) * (l0p0.y - l1p0.y)) - ((l1p1.y - l1p0.y) * (l0p0.x - l1p0.x))) / (((l1p1.y - l1p0.y) * (l0p1.x - l0p0.x)) - ((l1p1.x - l1p0.x) * (l0p1.y - l0p0.y))));
if ((0 <= uA) && (uA <= 1)) {
return(new Vector(l0p0.x + (uA * (l0p1.x - l0p0.x)), l0p0.y + (uA * (l0p1.y - l0p0.y)), 0));
}
return(null);
}
var assetID = "square";
static var FRAME_TIME = Game.PongLevels.FRAME_TIME;
var className = "PongObject";
var autoAddToScene = true;
var width = 0;
var height = 0;
var left = 0;
var right = 0;
var top = 0;
var bottom = 0;
static var RIGHT_DIR = "right";
static var LEFT_DIR = "left";
static var __inited = false;
}
Symbol 588 MovieClip [__Packages.Vector] Frame 0
class Vector
{
function Vector (x, y, z) {
if ((x || (y)) || (z)) {
this.x = (x ? (x) : 0);
this.y = (y ? (y) : 0);
this.z = (z ? (z) : 0);
}
}
function loc(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
function copy() {
return(new Vector(x, y, z));
}
function copyTo(a) {
a.x = x;
a.y = y;
a.z = z;
}
function copyFrom(a) {
x = a.x;
y = a.y;
z = a.z;
}
function distanceToVector(a) {
var sx = (a.x - x);
var sy = (a.y - y);
var sz = (a.z - z);
return(Math.sqrt(((sx * sx) + (sy * sy)) + (sz * sz)));
}
function distanceToCoordinates(x, y, z) {
var sx = (this.x - x);
var sy = (this.y - y);
var sz = (this.z - z);
return(Math.sqrt(((sx * sx) + (sy * sy)) + (sz * sz)));
}
function get magnitude() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function get length() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function set length(newLength) {
var l = (newLength / Math.sqrt(((x * x) + (y * y)) + (z * z)));
x = x * l;
y = y * l;
z = z * l;
//return(length);
}
function dot(v) {
return(((x * v.x) + (y * v.y)) + (z * v.z));
}
function cross(v) {
if (!v) {
v = VECPZ;
}
return(new Vector((y * v.z) - (z * v.y), (z * v.x) - (x * v.z), (x * v.y) - (y * v.x)));
}
function normalize() {
var l = Math.sqrt(((x * x) + (y * y)) + (z * z));
x = x / l;
y = y / l;
z = z / l;
return(this);
}
function getNormalized() {
var l = Math.sqrt(((x * x) + (y * y)) + (z * z));
return(new Vector(x / l, y / l, z / l));
}
function multiply(scalar) {
x = x * scalar;
y = y * scalar;
z = z * scalar;
}
function divide(scalar) {
if (!scalar) {
x = 0;
y = 0;
z = 0;
return(undefined);
}
x = x / scalar;
y = y / scalar;
z = z / scalar;
}
function reverse() {
x = x * -1;
y = y * -1;
z = z * -1;
}
function getReversed() {
return(new Vector(-x, -y, -z));
}
function toString() {
return(((((("Vector(" + x) + ",") + y) + ",") + z) + ")");
}
static var ZERO = new Vector(0, 0, 0);
static var VECPX = new Vector(1, 0, 0);
static var VECNX = new Vector(-1, 0, 0);
static var VECPY = new Vector(0, 1, 0);
static var VECNY = new Vector(0, -1, 0);
static var VECPZ = new Vector(0, 0, 1);
static var VECNZ = new Vector(0, 0, -1);
var x = 0;
var y = 0;
var z = 0;
}
Symbol 589 MovieClip [__Packages.Game.Objects.GetReady] Frame 0
class Game.Objects.GetReady extends Engine.PongObject
{
var target, __currentTime, getUpdates, moveTo, cancelUpdates;
function GetReady (myTime) {
super();
if (myTime) {
__stageTime = myTime;
}
}
function show() {
if (target._currentframe < 2) {
__currentTime = 0;
getUpdates();
target._visible = true;
target._xscale = (target._yscale = 100);
target.gotoAndPlay(2);
moveTo(0, 0, 0);
}
active = true;
}
function hide() {
if (target._currentframe > 1) {
cancelUpdates();
target._visible = false;
target._xscale = (target._yscale = 1);
target.gotoAndPlay(1);
moveTo(-100, -100, 0);
}
active = false;
}
function onDisplay() {
}
function onAddToScene() {
if (active) {
show();
} else {
hide();
}
}
function update(elapsed) {
__currentTime = __currentTime + elapsed;
if (__currentTime < __stageTime) {
return(undefined);
}
hide();
}
var assetID = "GetReady";
var __stageTime = 2;
var active = false;
}
Symbol 590 MovieClip [__Packages.Game.Objects.Ball] Frame 0
class Game.Objects.Ball extends Engine.PongObject
{
var direction, __defaultSpeed, __slowSpeed, __fastSpeed, target, getUpdates, cancelUpdates, queueForDisplay, lastPos, currentPos, world, __stuckToObj, moveBy, motionVec, x, y, width, height, left, right, top, bottom, moveTo, motionDist, motionDir, motionLeft, motionRight, motionTop, motionBottom, guide;
function Ball (mySpeed, myAngle, myStuck) {
super();
direction = new Vector(200, 0, 0);
if (myStuck != undefined) {
__stuck = myStuck;
}
if (mySpeed != undefined) {
__speed = mySpeed;
}
__defaultSpeed = __speed;
__slowSpeed = __defaultSpeed - __speedOffset;
__fastSpeed = __defaultSpeed + __speedOffset;
angle = (myAngle);
}
function set defaultSpeed(mySpeed) {
__defaultSpeed = mySpeed;
__slowSpeed = __defaultSpeed - __speedOffset;
__fastSpeed = __defaultSpeed + __speedOffset;
speed = (__defaultSpeed);
//return(defaultSpeed);
}
function get defaultSpeed() {
return(__defaultSpeed);
}
function set active(flag) {
__active = flag;
target._visible = flag;
if (flag) {
getUpdates();
} else {
cancelUpdates();
}
//return(active);
}
function get active() {
return(__active);
}
function set angle(newAngle) {
__angle = newAngle;
calcDirection();
//return(angle);
}
function get angle() {
return(__angle);
}
function set speed(newSpeed) {
__speed = newSpeed;
calcDirection();
//return(speed);
}
function get speed() {
return(__speed);
}
function set blast(newBlast) {
__blast = newBlast;
if (!__blast) {
__assetFrame = 1;
speed = (__defaultSpeed);
} else {
__assetFrame = 3;
speed = (__fastSpeed * __missile_factor);
}
__blastChanged = true;
queueForDisplay();
//return(blast);
}
function get blast() {
return(__blast);
}
function set stuck(newStuck) {
__stuck = newStuck;
lastPos = currentPos;
calcNewMotionProps();
if (!blast) {
calcDirection();
} else {
var target = world.getMissileTarget(__stuckToObj.orientation);
var spot = (target.top + (Math.random() * target.width));
direction = new Vector(target.x - lastPos.x, spot - lastPos.y, 0);
direction.__set__length(speed);
__angle = vectorToAngle(direction);
}
if (!__stuck) {
__stuckToObj = null;
}
//return(stuck);
}
function get stuck() {
return(__stuck);
}
function stickTo(gameObj) {
__stuckToObj = gameObj;
if (__stuckToObj == null) {
stuck = (false);
return(undefined);
}
stuck = (true);
stickToObj();
}
function deflect(newPos, normal, deflectToLeft) {
var oldAngle = __angle;
var dp = normal.dot(direction);
direction = new Vector(direction.x - ((normal.x * dp) * 2), direction.y - ((normal.y * dp) * 2), 0);
var newDirAngle = vectorToAngle(direction);
while (newDirAngle < 0) {
newDirAngle = newDirAngle + 360;
}
if (deflectToLeft == undefined) {
if (newDirAngle < MIN_ANGLE) {
angle = (MIN_ANGLE);
} else if (((180 - MIN_ANGLE) < newDirAngle) && (newDirAngle < 180)) {
angle = (180 - MIN_ANGLE);
} else if ((180 < newDirAngle) && (newDirAngle < (180 + MIN_ANGLE))) {
angle = (180 + MIN_ANGLE);
} else if ((360 - MIN_ANGLE) < newDirAngle) {
angle = (360 - MIN_ANGLE);
} else {
__angle = newDirAngle;
}
} else if (((180 - MIN_ANGLE) < newDirAngle) && (newDirAngle < (180 + MIN_ANGLE))) {
if (deflectToLeft) {
angle = (180 + MIN_ANGLE);
} else {
angle = (180 - MIN_ANGLE);
}
} else if ((MIN_ANGLE > newDirAngle) || (newDirAngle > (360 - MIN_ANGLE))) {
if (deflectToLeft) {
angle = (360 - MIN_ANGLE);
} else {
angle = (MIN_ANGLE);
}
} else {
__angle = newDirAngle;
}
calcNewPosTo(newPos.x, newPos.y, true);
}
function deflectH(newPos, normalAngle) {
if (normalAngle == undefined) {
if (direction.y > 0) {
normalAngle = 0;
} else {
normalAngle = 180;
}
}
var normal = angleToVector(normalAngle);
deflect(newPos, normal);
}
function deflectV(newPos, normalAngle) {
var deflectToLeft = (direction.x > 0);
if (normalAngle == undefined) {
if (deflectToLeft) {
normalAngle = 270;
} else {
normalAngle = 90;
}
}
if (blast) {
blast = (false);
}
var normal = angleToVector(normalAngle);
deflect(newPos, normal, deflectToLeft);
}
function update(elapsed) {
if (blast) {
if (__stuck) {
if (__stuckToObj.orientation == Engine.PongObject.RIGHT_DIR) {
target._xscale = 100;
} else {
target._xscale = -100;
}
} else {
target.gotoAndStop(3);
if (direction.x >= 0) {
target._xscale = -100;
} else {
target._xscale = 100;
}
}
} else {
target._xscale = 100;
}
if (__stuck) {
stickToObj();
return(undefined);
}
calcNewPosBy(direction.x * elapsed, direction.y * elapsed);
if ((!checkBricks()) && (!checkPaddles())) {
checkBounds(elapsed);
}
moveBy(motionVec.x, motionVec.y, 0);
updateBorders();
}
function onAddToScene() {
currentPos = new Vector(x, y, 0);
width = target._width - 2;
height = target._height - 2;
radius = height / 2;
getUpdates();
}
function updateBorders() {
left = x - radius;
right = x + radius;
top = y - radius;
bottom = y + radius;
}
function onDisplay() {
updateBorders();
if (__blastChanged) {
if (__stuck && (blast)) {
target.gotoAndStop(2);
} else {
target.gotoAndStop(__assetFrame);
}
__blastChanged = false;
}
}
function activateItem(item) {
if (item == Game.PongLevels.BALL_SLOW) {
speed = (__slowSpeed);
} else if (item == Game.PongLevels.BALL_FAST) {
speed = (__fastSpeed);
}
}
function deactivateItem() {
speed = (__defaultSpeed);
}
function calcNewPosTo(newX, newY, keepLastPos) {
if (!keepLastPos) {
lastPos = currentPos;
}
currentPos = new Vector(newX, newY, 0);
calcNewMotionProps();
}
function calcNewPosBy(dx, dy, keepLastPos) {
if (!keepLastPos) {
lastPos = currentPos;
}
currentPos = new Vector(lastPos.x + dx, lastPos.y + dy, 0);
calcNewMotionProps();
}
function stickToObj() {
var newX;
if (__stuckToObj.orientation == Engine.PongObject.RIGHT_DIR) {
newX = __stuckToObj.left - radius;
} else {
newX = __stuckToObj.right + radius;
}
moveTo(newX, __stuckToObj.y, 0);
currentPos = new Vector(x, y, 0);
}
function inReach(point) {
var travelV = new Vector(point.x - lastPos.x, point.y - lastPos.y, 0);
return(travelV.__get__length() <= motionDist);
}
function checkBounds(elapsed) {
world.checkBounds(this, elapsed);
}
function checkPaddles() {
return(world.checkPaddles(this));
}
function checkBricks() {
return(world.checkBricks(this));
}
function calcDirection() {
direction = angleToVector(angle);
direction.__set__length(__speed);
}
function angleToVector(angle) {
var rad = ((angle / 180) * Math.PI);
return(new Vector(Math.sin(rad), -Math.cos(rad), 0));
}
function vectorToAngle(v) {
return(((Math.atan2(v.y, v.x) / Math.PI) * 180) + 90);
}
function calcNewMotionProps() {
motionVec = new Vector(currentPos.x - lastPos.x, currentPos.y - lastPos.y, 0);
motionDist = motionVec.length;
motionDir = motionVec.getNormalized();
motionLeft = Math.min(currentPos.x, lastPos.x) - radius;
motionRight = Math.max(currentPos.x, lastPos.x) + radius;
motionTop = Math.min(currentPos.y, lastPos.y) - radius;
motionBottom = Math.max(currentPos.y, lastPos.y) + radius;
}
function showAngles(newPos, normal) {
if (!guide) {
guide = target.createEmptyMovieClip("guide", 0);
}
guide.clear();
if (newPos) {
var travelV = new Vector(lastPos.x - newPos.x, lastPos.y - newPos.y, 0);
travelV.length = 25;
guide.lineStyle(0, 65280);
guide.moveTo(0, 0);
guide.lineTo(travelV.x, travelV.y);
}
if (normal) {
var normalCopy = normal.copy();
normalCopy.__set__length(20);
guide.lineStyle(0, 16711680);
guide.moveTo(0, 0);
guide.lineTo(normalCopy.x, normalCopy.y);
}
var dirCopy = direction.copy();
dirCopy.__set__length(30);
guide.lineStyle(0, 255);
guide.moveTo(0, 0);
guide.lineTo(dirCopy.x, dirCopy.y);
}
static var depthShift = 5000;
var assetID = "Ball";
var className = "Ball";
var radius = 0;
var __speed = Game.PongLevels.DEFAULT_SPEED;
var __speedOffset = Game.PongLevels.BALL_SPEED_OFFSET;
var __angle = Game.PongLevels.DEFAULT_ANGLE;
var __missile_factor = Game.PongLevels.BALL_MISSILE_FACTOR;
static var MIN_ANGLE = Game.PongLevels.MIN_BALL_ANGLE;
var __stuck = false;
var __blast = false;
static var __inited = false;
var __assetFrame = 1;
var __active = true;
var __blastChanged = false;
}
Symbol 591 MovieClip [__Packages.Game.Objects.Goal] Frame 0
class Game.Objects.Goal extends Engine.PongObject
{
var __assetFrame, __width, __halfWidth, queueForDisplay, setAssetID, target, top, y, bottom;
function Goal (myOrientation, myWidth, myClr) {
super();
if (myWidth != undefined) {
width = (myWidth);
}
orientation = (myOrientation);
}
function set width(newWidth) {
newWidth = Math.max(0, newWidth);
newWidth = Math.min(sizes.length - 1, newWidth);
__assetFrame = newWidth + 1;
__width = sizes[newWidth];
__halfWidth = Math.floor(__width / 2);
__widthChanged = true;
queueForDisplay();
//return(width);
}
function get width() {
return(__width);
}
function set orientation(newDir) {
if (newDir == undefined) {
return;
}
newDir = newDir.toLowerCase();
if (newDir == __orientation) {
return;
}
if ((newDir != Engine.PongObject.LEFT_DIR) && (newDir != Engine.PongObject.RIGHT_DIR)) {
return;
}
if (newDir == Engine.PongObject.LEFT_DIR) {
setAssetID(assetLeftID);
} else {
setAssetID(assetRightID);
}
__orientation = newDir;
__orientationChanged = true;
queueForDisplay();
//return(orientation);
}
function get orientation() {
return(__orientation);
}
function activateItem(item) {
if (item == Game.PongLevels.GOAL_WIDE) {
width = (GOAL_SIZE_WIDE);
} else if (item == Game.PongLevels.GOAL_SMALL) {
width = (GOAL_SIZE_SMALL);
}
}
function deactivateItem() {
width = (GOAL_SIZE_DEFAULT);
}
function onDisplay() {
if (__widthChanged) {
target.gotoAndStop(__assetFrame);
__widthChanged = false;
}
top = y - __halfWidth;
bottom = y + __halfWidth;
if (__orientationChanged) {
__orientationChanged = false;
}
}
function onAddToScene() {
target.gotoAndStop(__assetFrame);
__widthChanged = false;
top = y - __halfWidth;
bottom = y + __halfWidth;
__orientationChanged = false;
}
static var sizes = [50, 100, 200];
static var GOAL_SIZE_DEFAULT = 1;
static var GOAL_SIZE_WIDE = 2;
static var GOAL_SIZE_SMALL = 0;
static var assetLeftID = "GoalLeft";
static var assetRightID = "GoalRight";
var assetID = assetRightID;
var className = "Goal";
var __orientation = "right";
var __orientationChanged = false;
var __widthChanged = false;
}
Symbol 592 MovieClip [__Packages.Game.Objects.CollisionObject] Frame 0
class Game.Objects.CollisionObject extends Engine.PongObject
{
var edges;
function CollisionObject () {
super();
}
function createEdges(TL, TR, BR, BL) {
edges = [new _types_.ShapeEdge(TL, TR), new _types_.ShapeEdge(TR, BR), new _types_.ShapeEdge(BR, BL), new _types_.ShapeEdge(BL, TL)];
var a;
var b;
var l;
var i = edges.length;
while ((--i) > -1) {
a = ((l = edges[i])).a;
b = l.b;
l.center = new Vector(a.x + ((b.x - a.x) * 0.5), a.y + ((b.y - a.y) * 0.5));
l.radius = 0.5 * ((l.length = ((l.span = new Vector(b.x - a.x, b.y - a.y))).length));
l.direction = l.span.getNormalized();
l.normal = l.direction.cross();
l.angle = Math.atan2(l.direction.y, l.direction.x);
l.props = b.props;
}
}
function angleToVector(angle) {
var rad = ((angle / 180) * Math.PI);
return(new Vector(Math.sin(rad), -Math.cos(rad), 0));
}
function vectorToAngle(v) {
return(((Math.atan2(v.y, v.x) / Math.PI) * 180) + 90);
}
static var EDGE_DEFAULT = 0;
static var EDGE_COLLISION = 1;
}
Symbol 593 MovieClip [__Packages._types_.ShapeVertex] Frame 0
class _types_.ShapeVertex extends Vector
{
var x, y, z;
function ShapeVertex (x, y, props) {
super();
this.x = x;
this.y = y;
this.props = props;
}
function toString() {
return(((((("ShapeVert (" + x) + ",") + y) + ",") + z) + ")");
}
var props = 1;
var scale = 0;
}
Symbol 594 MovieClip [__Packages._types_.ShapeEdge] Frame 0
class _types_.ShapeEdge
{
var a, b;
function ShapeEdge (a, b) {
this.a = a;
this.b = b;
}
function toString() {
return((("ShapeEdge: " + a) + " -> ") + b);
}
var radius = 0;
var props = 1;
var length = 0;
var angle = 0;
}
Symbol 595 MovieClip [__Packages.Game.Objects.Paddle] Frame 0
class Game.Objects.Paddle extends Game.Objects.CollisionObject
{
var __width, __halfWidth, bounds, y, moveTo, x, queueForDisplay, setAssetID, __myBall, dispatchEvent, moveBy, left, right, top, bottom, __frontEdge, angleToVector, edges, guide, world, target, __thickness, createEdges;
function Paddle (myOrientation, myWidth) {
super();
if (myWidth != undefined) {
width = (myWidth);
}
orientation = (myOrientation);
}
function activateItem(item) {
if (item == Game.PongLevels.PADDLE_WIDE) {
width = (PADDLE_SIZE_WIDE);
} else if (item == Game.PongLevels.PADDLE_SMALL) {
width = (PADDLE_SIZE_SMALL);
} else if ((item == Game.PongLevels.FREEZE_YOU) || (item == Game.PongLevels.FREEZE_OPPONENT)) {
if (!frozen) {
frozen = (true);
}
} else if (item == Game.PongLevels.PADDLE_STICKY) {
if (!sticky) {
width = (PADDLE_SIZE_STICKY);
sticky = (true);
}
} else if (item == Game.PongLevels.MISSILE) {
if (!blast) {
blast = (true);
}
}
}
function deactivateItem() {
if (sticky) {
sticky = (false);
} else if (blast) {
blast = (false);
} else if (frozen) {
frozen = (false);
} else {
width = (PADDLE_SIZE_DEFAULT);
}
}
function set width(newWidth) {
newWidth = Math.max(0, newWidth);
newWidth = Math.min(sizes.length - 1, newWidth);
__assetFrame = newWidth + 1;
__width = sizes[newWidth];
__halfWidth = Math.floor(__width / 2);
__widthChanged = true;
if ((y - __halfWidth) < bounds.yMin) {
moveTo(x, bounds.yMin + __halfWidth);
} else if (bounds.yMax < (y + __halfWidth)) {
moveTo(x, bounds.yMax - __halfWidth);
} else {
queueForDisplay();
}
updateBorders();
calcEdges();
//return(width);
}
function get width() {
return(__width);
}
function set orientation(newDir) {
if (newDir == undefined) {
return;
}
newDir = newDir.toLowerCase();
if (newDir == __orientation) {
return;
}
if ((newDir != Engine.PongObject.LEFT_DIR) && (newDir != Engine.PongObject.RIGHT_DIR)) {
return;
}
if (newDir == Engine.PongObject.LEFT_DIR) {
setAssetID(assetLeftID);
} else {
setAssetID(assetRightID);
}
__orientation = newDir;
__orientationChanged = true;
queueForDisplay();
//return(orientation);
}
function get orientation() {
return(__orientation);
}
function set frozen(newFrozen) {
__frozen = newFrozen;
if (__frozen) {
width = (PADDLE_SIZE_FROZEN);
} else {
width = (PADDLE_SIZE_DEFAULT);
}
//return(frozen);
}
function get frozen() {
return(__frozen);
}
function set blast(newBlast) {
__blast = newBlast;
if (__blast) {
width = (PADDLE_SIZE_MISSILE);
} else {
width = (PADDLE_SIZE_DEFAULT);
}
//return(blast);
}
function get blast() {
return(__blast);
}
function set sticky(newSticky) {
__sticky = newSticky;
if (!__sticky) {
if (__myBall != undefined) {
releaseBall();
}
width = (PADDLE_SIZE_DEFAULT);
}
//return(sticky);
}
function get sticky() {
return(__sticky);
}
function holdBall(myBall) {
if (__myBall == myBall) {
return(undefined);
}
__myBall = myBall;
__myBall.stickTo(this);
if (__myBall != undefined) {
__sticky = true;
}
if (blast) {
myBall.__set__blast(true);
}
dispatchEvent({type:"onHoldBall"});
}
function releaseBall() {
if (!__myBall) {
return(undefined);
}
__myBall.__set__stuck(false);
__myBall = null;
sticky = (false);
dispatchEvent({type:"onReleaseBall"});
}
function moveByPlayer(dy, myBall) {
if (frozen || (dy == 0)) {
return(undefined);
}
var space = getSpaceAvailable(myBall);
if (space == null) {
return(undefined);
}
if (dy < 0) {
dy = Math.max(dy, space.top);
} else {
dy = Math.min(dy, space.bottom);
}
moveBy(0, dy, 0);
updateBorders();
}
function ballInHitArea(myBall) {
return((left < myBall.right) && (myBall.left < right));
}
function ballAbovePaddle(myBall) {
return(top >= myBall.bottom);
}
function ballBelowPaddle(myBall) {
return(myBall.top >= bottom);
}
function getSpaceAvailable(myBall) {
var gapTop = ((bounds.yMin - top) - __topBottomOffset);
var gapBottom = ((bounds.yMax - bottom) + __topBottomOffset);
if (ballInHitArea(myBall)) {
if (myBall.y < y) {
gapTop = myBall.bottom - top;
} else {
gapBottom = myBall.top - bottom;
}
}
if (gapTop > 0) {
gapTop = 0;
}
if (gapBottom < 0) {
gapBottom = 0;
}
return({top:gapTop, bottom:gapBottom});
}
function setBounds(newBounds) {
bounds = newBounds;
}
function checkCollision(myBall) {
var coll = Engine.Collision.sweepSphereToStaticShape(myBall, this);
if (coll == null) {
return(false);
}
var deflectToLeft;
var point = coll.point;
if (coll.edge == __frontEdge) {
var normalAngle = calcReflectionNormal(point.y);
if (myBall.direction.x > 0) {
deflectToLeft = true;
normalAngle = 270 - normalAngle;
point.x = point.x - 3;
} else {
deflectToLeft = false;
normalAngle = normalAngle + 90;
point.x = point.x + 3;
}
var myNormal = angleToVector(normalAngle);
} else {
var myNormal = coll.normal;
if ((coll.edge = edges[0])) {
point.y = point.y - 3;
point.y = Math.max(bounds.yMin, point.y);
} else if ((coll.edge = edges[2])) {
point.y = point.y + 3;
point.y = Math.min(bounds.yMax, point.y);
}
}
if (ballInHitArea(myBall)) {
if (ballAbovePaddle(myBall)) {
if (myBall.y < (bounds.yMin + (myBall.radius * 2.5))) {
if (__orientation == Engine.PongObject.LEFT_DIR) {
point.x = (right + myBall.radius) + 3;
myNormal = new Vector(1, 0, 0);
} else {
point.x = (left - myBall.radius) - 3;
myNormal = new Vector(-1, 0, 0);
}
}
} else if (ballBelowPaddle(myBall)) {
if (myBall.y > (bounds.yMax - (myBall.radius * 2.5))) {
if (__orientation == Engine.PongObject.LEFT_DIR) {
point.x = (right + myBall.radius) + 3;
myNormal = new Vector(1, 0, 0);
} else {
point.x = (left - myBall.radius) - 3;
myNormal = new Vector(-1, 0, 0);
}
}
}
}
myBall.deflect(point, myNormal, deflectToLeft);
collide(myBall);
return(true);
}
function drawCollision(point, normal, edge) {
var myPoint = point.copy();
myPoint.x = myPoint.x - x;
myPoint.y = myPoint.y - y;
var myNormal = normal.copy();
myNormal.length = 30;
guide.clear();
guide.lineStyle(1, 16711680);
guide.moveTo(myPoint.x, myPoint.y);
guide.lineTo(myPoint.x + myNormal.x, myPoint.y + myNormal.y);
guide.lineStyle(1, 65280);
guide.moveTo(edge.a.x, edge.a.y);
guide.lineTo(edge.b.x, edge.b.y);
}
function collide(myBall) {
(!blast) && (myBall.__get__blast());
world.deactivate;
myBall.__set__blast(false);
if (sticky || (blast)) {
holdBall(myBall);
} else {
Engine.PongSFX.playPuckPaddle();
}
}
function checkItemCollision(o) {
if ((o.motionLeft <= right) && (left <= o.motionRight)) {
if ((o.motionTop <= bottom) && (top <= o.motionBottom)) {
return(true);
}
}
return(false);
}
function onDisplay() {
if (__widthChanged) {
target.gotoAndStop(__assetFrame);
__widthChanged = false;
updateBorders();
}
}
function updateBorders() {
top = (y - __halfWidth) - __topBottomOffset;
bottom = (y + __halfWidth) + __topBottomOffset;
if (__orientation == Engine.PongObject.LEFT_DIR) {
left = x - __thickness;
right = x - 1;
} else {
left = x + 1;
right = x + __thickness;
}
}
function onAddToScene() {
target.gotoAndStop(__assetFrame);
__widthChanged = false;
__thickness = target._width - 3;
updateBorders();
calcEdges();
__orientationChanged = false;
}
function calcReflectionNormal(collY) {
var dy = (collY - y);
var ratio = (dy / __halfWidth);
var angle = (ratio * MAX_TILT);
return(angle);
}
function calcEdges() {
if (__orientation == Engine.PongObject.LEFT_DIR) {
var TL = (new _types_.ShapeVertex(-__thickness, (-__halfWidth) - __topBottomOffset));
var TR = (new _types_.ShapeVertex(-1, (-__halfWidth) - __topBottomOffset));
var BR = (new _types_.ShapeVertex(-1, __halfWidth + __topBottomOffset));
var BL = (new _types_.ShapeVertex(-__thickness, __halfWidth + __topBottomOffset));
} else {
var TL = (new _types_.ShapeVertex(1, (-__halfWidth) - __topBottomOffset));
var TR = (new _types_.ShapeVertex(__thickness, (-__halfWidth) - __topBottomOffset));
var BR = (new _types_.ShapeVertex(__thickness, __halfWidth + __topBottomOffset));
var BL = (new _types_.ShapeVertex(1, __halfWidth + __topBottomOffset));
}
createEdges(TL, TR, BR, BL);
if (__orientation == Engine.PongObject.LEFT_DIR) {
__frontEdge = edges[1];
} else {
__frontEdge = edges[3];
}
var i = edges.length;
while ((--i) > -1) {
edges[i].props = Game.Objects.CollisionObject.EDGE_COLLISION;
}
}
static var assetLeftID = "PaddleLeft";
static var assetRightID = "PaddleRight";
var assetID = assetRightID;
var className = "Paddle";
static var sizes = [42, 72, 26, 42, 42, 42];
static var PADDLE_SIZE_DEFAULT = 0;
static var PADDLE_SIZE_WIDE = 1;
static var PADDLE_SIZE_SMALL = 2;
static var PADDLE_SIZE_FROZEN = 3;
static var PADDLE_SIZE_STICKY = 4;
static var PADDLE_SIZE_MISSILE = 5;
var __orientation = "right";
var __orientationChanged = false;
var __widthChanged = false;
var __sticky = false;
var __frozen = false;
var __blast = false;
var __assetFrame = 1;
static var MAX_TILT = 20;
var __topBottomOffset = 5;
}
Symbol 596 MovieClip [__Packages.Engine.Collision] Frame 0
class Engine.Collision
{
var point, normal, edge, time, offCorner;
function Collision (point, normal, time, edge, offCorner) {
this.point = point;
this.normal = normal;
this.edge = edge;
this.time = time;
this.offCorner = offCorner;
}
function toString() {
return((("Collision: point: " + point) + " normal: ") + normal);
}
static function sweepSphereToStaticShape(sphere, shape, noData) {
if ((((sphere.motionLeft > shape.right) || (sphere.motionRight < shape.left)) || (sphere.motionTop > shape.bottom)) || (sphere.motionBottom < shape.top)) {
return(undefined);
}
var edges = shape.edges;
var i = edges.length;
var motionVec = sphere.motionVec;
var motionDir = sphere.motionDir;
var motionDist = sphere.motionDist;
var radius = sphere.radius;
var collisionNormal;
var collisionPoint;
var collisionEdge;
var collisionTime = Number.MAX_VALUE;
var sOrigin = new Vector(sphere.x - shape.x, sphere.y - shape.y);
var edge;
var c;
var q;
while ((--i) > -1) {
if (!(((edge = edges[i])).props & 1)) {
continue;
}
if (motionDir.dot(edge.normal) >= 0) {
continue;
}
var a = edge.a;
var c = new Vector(edge.center.x - sOrigin.x, edge.center.y - sOrigin.y, 0);
if (((c.length - radius) - motionDist) > edge.radius) {
continue;
}
var localOrigin = new Vector(sOrigin.x - a.x, sOrigin.y - a.y);
var fsc = localOrigin.dot(edge.normal);
if ((fsc < 0) || ((fsc - motionDist) > radius)) {
continue;
}
var radOrigin = new Vector(localOrigin.x - (edge.normal.x * radius), localOrigin.y - (edge.normal.y * radius));
var edgeDirection = edge.span;
var u = (((motionVec.x * (-radOrigin.y)) - (motionVec.y * (-radOrigin.x))) / ((motionVec.y * edgeDirection.x) - (motionVec.x * edgeDirection.y)));
var d;
if ((u >= 0) && (u <= 1)) {
var p = new Vector((edgeDirection.x * u) + (edge.normal.x * radius), (edgeDirection.y * u) + (edge.normal.y * radius));
var displacement = new Vector(p.x - localOrigin.x, p.y - localOrigin.y);
if (((d = displacement.length)) <= motionDist) {
if (collisionTime < (d / motionDist)) {
continue;
}
collisionPoint = p;
collisionTime = d / motionDist;
if (collisionTime < 0.001) {
collisionTime = 0;
p.x = localOrigin.x;
p.y = localOrigin.y;
}
collisionNormal = edge.normal;
collisionEdge = edge;
}
} else {
var p = ((u > 1) ? (edge.span) : (Vector.ZERO));
c = ((q = new Vector(p.x - localOrigin.x, p.y - localOrigin.y))).length;
var v = q.dot(motionDir);
d = (radius * radius) - ((c * c) - (v * v));
if (((v > 0) && (d > 0)) && (((d = v - Math.sqrt(d))) < motionDist)) {
if ((collisionTime < (d / motionDist)) || ((d / motionDist) < 0)) {
continue;
}
collisionTime = d / motionDist;
collisionEdge = edge;
var collisionPoint = new Vector(localOrigin.x + (d * motionDir.x), localOrigin.y + (d * motionDir.y), 0);
((collisionNormal = new Vector(collisionPoint.x - p.x, collisionPoint.y - p.y, 0))).normalize();
}
}
}
if (collisionEdge) {
collisionPoint.x = collisionPoint.x + (shape.x + collisionEdge.a.x);
collisionPoint.y = collisionPoint.y + (shape.y + collisionEdge.a.y);
return(new Engine.Collision(collisionPoint, collisionNormal, collisionTime, collisionEdge));
}
return(null);
}
static function sweepSphereToSphere(movingObj, obj, noData) {
var q;
var c;
var radius = (movingObj.radius + obj.radius);
c = ((q = new Vector(obj.x - movingObj.x, obj.y - movingObj.y, 0))).length;
var v = q.dot(movingObj.motionDir);
var d = ((radius * radius) - ((c * c) - (v * v)));
if ((d > 0) && (((d = v - Math.sqrt(d))) < movingObj.motionDist)) {
if (d < 0) {
return(false);
}
if (noData) {
return(true);
}
}
return(false);
}
}
Symbol 597 MovieClip [__Packages.Engine.PongSFX] Frame 0
class Engine.PongSFX
{
static var target, __music, __musicID, __bounceSnd;
function PongSFX () {
}
static function setTarget(newTarget) {
target = newTarget;
__music = new Sound(target);
__music.setVolume(120);
}
static function stopMusic() {
__music.stop(__musicID);
}
static function startMusic() {
stopMusic();
if (__musicID == undefined) {
return(undefined);
}
__music.attachSound(__musicID);
__music.start(null, 20000);
}
static function setMusic(levelNum) {
var max = MUSIC_LOOPS.length;
var index = levelNum;
while (index >= max) {
index = index - max;
}
__musicID = MUSIC_LOOPS[index];
}
static function playBounce() {
if (__bounceSnd == undefined) {
__bounceSnd = new Sound(target);
__bounceSnd.attachSound(SND_PUCK_BOUNCE);
}
__bounceSnd.start();
}
static function playSound(soundID, delay) {
if (delay == undefined) {
delay = 0;
}
var mySound = new Sound(target);
mySound.attachSound(soundID);
mySound.start(delay);
}
static function playCatchGoodItem(itemID) {
playSound(SND_ITEM_PICKUP_GOOD);
}
static function playCatchBadItem(itemID) {
playSound(SND_ITEM_PICKUP_BAD);
}
static function playBreakBrick() {
playSound(SND_BRICK_EXPLODE);
}
static function playPuckPaddle() {
playSound(SND_PUCK_PADDLE);
}
static function playReleaseItem() {
playSound(SND_ICON_REVEAL);
}
static function playMissileTakeOff() {
playSound(SND_MISSILE_TAKEOFF);
}
static function playPuckRelease() {
playSound(SND_PUCK_RELEASE);
}
static function playPaddleChange() {
playSound(SND_PADDLE_TRANSFORM);
}
static function playPaddleFreeze() {
playSound(SND_PADDLE_ICE);
}
static function playGoal() {
playSound(SND_GOAL);
}
static function playGoalCheer() {
playSound(SND_GOAL_CHEER);
}
static function playGoalOhh() {
playSound(SND_GOAL_OHH);
}
static var SND_BRICK_EXPLODE = "brick_explode";
static var SND_GOAL_CHEER = "goal_cheer";
static var SND_GOAL_OHH = "goal_ohh";
static var SND_GOAL = "goal_sound";
static var SND_ICON_REVEAL = "icon_reveal";
static var SND_ITEM_PICKUP_BAD = "item_pickup_bad";
static var SND_ITEM_PICKUP_GOOD = "item_pickup_good";
static var SND_PADDLE_ICE = "paddle_ice";
static var SND_PADDLE_TRANSFORM = "paddle_transform";
static var SND_PUCK_BOUNCE = "puck_bounce";
static var SND_PUCK_PADDLE = "puck_paddle_contact";
static var SND_PUCK_RELEASE = "puck_release";
static var SND_MISSILE_TAKEOFF = "missile_takeoff";
static var MUSIC_LOOPS = ["music1", "music2", "music3"];
}
Symbol 598 MovieClip [__Packages.Game.Objects.BonusItem] Frame 0
class Game.Objects.BonusItem extends Engine.PongObject
{
var itemIndex, __assetFrame, __direction, __speed, currentPos, x, y, width, target, height, getUpdates, left, right, top, bottom, __viewTimer, cancelUpdates, removeFromWorld, moveTo, lastPos, motionVec, motionDist, motionDir, motionLeft, motionRight, motionTop, motionBottom, world;
function BonusItem (myIndex, myDirection, mySpeed) {
super();
itemID++;
if (itemID > 256) {
itemID = 0;
}
itemIndex = myIndex;
__assetFrame = myIndex + 1;
__direction = myDirection;
__speed = mySpeed;
}
function onAddToScene() {
currentPos = new Vector(x, y, 0);
width = target._width;
height = target._height;
target.gotoAndStop(__assetFrame);
target.swapDepths((depthShift * 61440) + itemID);
getUpdates();
}
function onDisplay() {
left = x;
right = x + width;
top = y;
bottom = y + height;
}
function update(elapsed) {
calcNewPosBy((__direction.x * __speed) * elapsed, (__direction.y * __speed) * elapsed);
if (__fading) {
__viewTimer = __viewTimer + elapsed;
if (__viewTimer < Engine.PongObject.FRAME_TIME) {
return(undefined);
}
__viewTimer = 0;
target._alpha = target._alpha - 30;
if (target._alpha < 20) {
target._visible = false;
cancelUpdates();
removeFromWorld();
return(undefined);
}
} else if (checkPaddles() || (checkBounds())) {
__fading = true;
__viewTimer = 0;
target._alpha = target._alpha - 30;
}
moveTo(currentPos.x, currentPos.y, 0);
}
function calcNewPosTo(newX, newY, keepLastPos) {
if (!keepLastPos) {
lastPos = currentPos;
}
currentPos = new Vector(newX, newY, 0);
calcNewMotionProps();
}
function calcNewPosBy(dx, dy, keepLastPos) {
if (!keepLastPos) {
lastPos = currentPos;
}
currentPos = new Vector(lastPos.x + dx, lastPos.y + dy, 0);
calcNewMotionProps();
}
function calcNewMotionProps() {
motionVec = new Vector(currentPos.x - lastPos.x, currentPos.y - lastPos.y, 0);
motionDist = motionVec.length;
motionDir = motionVec.getNormalized();
motionLeft = Math.min(currentPos.x, lastPos.x);
motionRight = Math.max(currentPos.x, lastPos.x) + width;
motionTop = Math.min(currentPos.y, lastPos.y);
motionBottom = Math.max(currentPos.y, lastPos.y) + height;
}
function checkPaddles() {
return(world.checkPaddles(this));
}
function checkBounds() {
return(world.checkBounds(this));
}
var className = "BonusItem";
var assetID = "Item";
var depthShift = 3000;
static var itemID = 0;
var __fading = false;
}
Symbol 599 MovieClip [__Packages.GDK.Grid] Frame 0
class GDK.Grid extends Array
{
var length;
function Grid (w, h, defaultValue) {
super();
setSize(((w == null) ? 0 : (w)), ((h == null) ? 0 : (h)), true);
if (defaultValue != null) {
this.defaultValue = defaultValue;
}
}
function get width() {
return(_width);
}
function set width(x) {
setSize(x, _height);
//return(width);
}
function get height() {
return(_height);
}
function set height(x) {
setSize(_width, x);
//return(height);
}
function setSize(w, h, noRebuild) {
if ((w == _width) && (h == _height)) {
return(false);
}
if ((h != null) && (h > 0)) {
_overflow = false;
setCell = setCell2D_Fixed;
getCell = getCell2D_Fixed;
_area = w * h;
if ((!noRebuild) && (_mode == 0)) {
}
_mode = 3;
} else {
_overflow = true;
if (x <= 0) {
setCell = setCell2D;
getCell = getCell2D;
if ((!noRebuild) && (_mode == 0)) {
}
_mode = 1;
} else {
delete setCell;
delete getCell;
if ((!noRebuild) && (_mode != 0)) {
}
_mode = 0;
}
}
_width = ((w <= 0) ? 0 : (w));
_height = ((h <= 0) ? 0 : (h));
return(true);
}
function setCell(w, v) {
this[w] = v;
}
function __resolve(v) {
return(defaultValue);
}
function getCell(w) {
return(((((value = this[w])) != null) ? (value) : (defaultValue)));
}
function setCell2D(w, h, val) {
if ((h != null) && (h < 0)) {
h = Math.floor(w / _width);
} else {
w = w + (h * _width);
}
if (h >= _height) {
_height = h + 1;
}
this[w] = val;
}
function getCell2D(w, h) {
if (h != null) {
return(this[w + (((h < 0) ? (_height + (h % _height)) : (h)) * _width)]);
}
return(this[w] % _width);
}
function setCell2D_Fixed(w, h, val) {
var u;
var v;
this[((((u = w % _width)) < 0) ? (_width + u) : (u)) + (((((v = h % _height)) < 0) ? (_height + v) : (v)) * _width)] = val;
}
function getCell2D_Fixed(x, y) {
if (((!repeatX) && (!((x > -1) && (x < _width)))) || ((!repeatY) && (!((y > -1) && (y < _height))))) {
return(defaultValue);
}
var u;
var v;
return(this[((((u = x % _width)) < 0) ? (_width + u) : (u)) + (((((v = y % _height)) < 0) ? (_height + v) : (v)) * _width)]);
}
function toString() {
var s = "";
var i = length;
var i = length;
while ((--i) > 0) {
s = this[i] + s;
s = (((i % width) == 0) ? ",\n" : ",") + s;
}
if (length > 0) {
s = this[0] + s;
}
return(s);
}
var _overflow = true;
var defaultValue = null;
var _width = 0;
var _height = 0;
var _area = 0;
var repeatX = true;
var repeatY = true;
var _mode = 0;
}
Symbol 600 MovieClip [__Packages.Engine.PongGrid] Frame 0
class Engine.PongGrid extends GDK.Grid
{
var setSize, defaultValue, left, right, _width, top, bottom, _height, getCell, __world, setCell, length;
function PongGrid (w, h, defaultValue) {
super();
setSize(((w == null) ? 0 : (w)), ((h == null) ? 0 : (h)), true);
if (defaultValue != null) {
this.defaultValue = defaultValue;
}
}
function moveTo(newX, newY) {
x = ((newX != undefined) ? (newX) : 0);
y = ((newY != undefined) ? (newY) : 0);
left = x;
right = x + (_width * gridSize);
top = y;
bottom = y + (_height * gridSize);
}
function checkCollision(myBall) {
if ((myBall.motionRight < left) || (right < myBall.motionLeft)) {
return(null);
}
var xMinPos = Math.max(0, Math.floor((myBall.motionLeft - left) / gridSize));
var xMaxPos = Math.min(Math.ceil((myBall.motionRight - left) / gridSize), _width);
var yMinPos = Math.max(0, Math.floor((myBall.motionTop - top) / gridSize));
var yMaxPos = Math.min(Math.ceil((myBall.motionBottom - top) / gridSize), _height);
var items = [];
var xPos;
var yPos;
var item;
var edges;
xPos = xMinPos;
while (xPos < xMaxPos) {
yPos = yMinPos;
while (yPos < yMaxPos) {
item = getCell(xPos, yPos);
if (!item) {
} else {
edges = item.edges;
if (!myBall.__get__blast()) {
edges[0].props = (((yPos == 0) || (!getCell(xPos, yPos - 1))) ? (EDGE_COLLISION) : (EDGE_DEFAULT));
edges[1].props = (((xPos == (_width - 1)) || (!getCell(xPos + 1, yPos))) ? (EDGE_COLLISION) : (EDGE_DEFAULT));
edges[2].props = (((yPos == (_height - 1)) || (!getCell(xPos, yPos + 1))) ? (EDGE_COLLISION) : (EDGE_DEFAULT));
edges[3].props = (((xPos == 0) || (!getCell(xPos - 1, yPos))) ? (EDGE_COLLISION) : (EDGE_DEFAULT));
} else {
edges[0].props = EDGE_COLLISION;
edges[1].props = EDGE_COLLISION;
edges[2].props = EDGE_COLLISION;
edges[3].props = EDGE_COLLISION;
}
items.push(item);
}
yPos++;
}
xPos++;
}
var i = items.length;
if (i <= 0) {
return(null);
}
var shortestDist = Number.MAX_VALUE;
var dist;
var closest;
var coll;
var curColl;
while ((--i) > -1) {
item = items[i];
curColl = Engine.Collision.sweepSphereToStaticShape(myBall, item);
if (!curColl) {
continue;
}
if (myBall.__get__blast()) {
removeItemAt(item.xPos, item.yPos, true);
__world.scorePointsForBrick(item);
continue;
}
dist = new Vector(myBall.lastPos.x - curColl.point.x, myBall.lastPos.y - curColl.point.y, 0).length;
if (dist < shortestDist) {
shortestDist = dist;
coll = curColl;
closest = item;
}
}
if (shortestDist == Number.MAX_VALUE) {
return(null);
}
if (myBall.__get__blast()) {
myBall.calcNewPosTo(coll.point.x, coll.point.y, true);
} else {
var angle = vectorToAngle(coll.normal);
var variance = ((Math.random() * BOUNCE_VARIANCE) - (BOUNCE_VARIANCE / 2));
angle = angle + variance;
var bounceNormal = angleToVector(angle);
myBall.deflect(coll.point, bounceNormal);
}
if ((closest.type == DESTRUCTIBLE) || (myBall.__get__blast())) {
removeItemAt(closest.xPos, closest.yPos);
} else {
Engine.PongSFX.playBounce();
}
return(closest);
}
function set world(myWorld) {
__world = myWorld;
//return(world);
}
function get world() {
return(__world);
}
function addItemAt(itemX, itemY, type, data) {
var o = (new Game.Objects.Brick(type, data));
o.xPos = itemX;
o.yPos = itemY;
setCell(itemX, itemY, o);
o.moveTo(x + (itemX * gridSize), y + (itemY * gridSize), 0);
world.addObject(o);
if (type == DESTRUCTIBLE) {
destructibleCount++;
}
}
function removeItemAt(itemX, itemY, instantly) {
var o = getCell(itemX, itemY);
if (o.__get__type() == DESTRUCTIBLE) {
destructibleCount--;
}
o.destroySelf(instantly);
setCell(itemX, itemY, null);
}
function removeAll() {
var item;
var i = length;
while ((--i) > -1) {
item = this[i];
if (!item) {
continue;
}
item.destroySelf(true);
this[i] = null;
}
destructibleCount = 0;
}
function vectorToAngle(v) {
return(((Math.atan2(v.y, v.x) / Math.PI) * 180) + 90);
}
function angleToVector(angle) {
var rad = ((angle / 180) * Math.PI);
return(new Vector(Math.sin(rad), -Math.cos(rad), 0));
}
function toString() {
var str = (((((className + ": w: ") + _width) + " h: ") + _height) + newline);
var i;
var k = 0;
var item;
str = str + "[ \r";
i = 0;
while (i < _height) {
str = str + "\t[";
k = 0;
while (k < _width) {
item = getCell(k, i);
if (!item) {
str = str + "e";
} else {
str = str + ((item == SOLID) ? "S" : "D");
}
if (k < (_width - 1)) {
str = str + ",";
}
k++;
}
if (i < (_height - 1)) {
str = str + "],\r";
} else {
str = str + "]\r";
}
i++;
}
str = str + " ]; ";
return(str);
}
var x = 0;
var y = 0;
var gridSize = 15;
var className = "PongGrid";
var destructibleCount = 0;
static var SOLID = Game.PongLevels.S;
static var DESTRUCTIBLE = Game.PongLevels.D;
static var EDGE_DEFAULT = Game.Objects.CollisionObject.EDGE_DEFAULT;
static var EDGE_COLLISION = Game.Objects.CollisionObject.EDGE_COLLISION;
static var BOUNCE_VARIANCE = 6;
}
Symbol 601 MovieClip [__Packages.Game.Objects.Brick] Frame 0
class Game.Objects.Brick extends Game.Objects.CollisionObject
{
var gridIndex, __type, setAssetID, cancelUpdates, removeFromWorld, __destroyTimer, target, getUpdates, queueForDisplay, left, x, right, top, y, bottom, createEdges;
function Brick (myType, myData) {
super();
if (myType == undefined) {
type = (DESTRUCTIBLE);
}
if ((myType != SOLID) && (myType != DESTRUCTIBLE)) {
type = (DESTRUCTIBLE);
}
type = (myType);
if (myData.gridIndex != undefined) {
gridIndex = myData.gridIndex;
}
if (myData.displayDelay != undefined) {
__displayDelay = myData.displayDelay;
if (__displayDelay > 0) {
__visible = false;
}
}
}
function set type(newType) {
if (newType == undefined) {
return;
}
if (newType == __type) {
return;
}
if ((newType != SOLID) && (newType != DESTRUCTIBLE)) {
return;
}
__type = newType;
if (newType == SOLID) {
setAssetID(solidId);
} else {
setAssetID(destructibleId);
}
//return(type);
}
function get type() {
return(__type);
}
function destroySelf(instant) {
if (instant) {
cancelUpdates();
removeFromWorld();
return(undefined);
}
__destroyTimer = 0;
Engine.PongSFX.playBreakBrick();
target.nextFrame();
getUpdates();
queueForDisplay();
}
function onAddToScene() {
target._visible = __visible;
if (!__visible) {
getUpdates();
}
left = x;
right = x + target._width;
top = y;
bottom = y + target._height;
if (gridIndex != undefined) {
target.swapDepths((depthShift * 61440) + gridIndex);
}
var TL = (new _types_.ShapeVertex(0, 0));
var TR = (new _types_.ShapeVertex(target._width, 0));
var BR = (new _types_.ShapeVertex(target._width, target._height));
var BL = (new _types_.ShapeVertex(0, target._height));
createEdges(TL, TR, BR, BL);
}
function onDisplay() {
left = x;
right = x + target._width;
top = y;
bottom = y + target._height;
target._visible = __visible;
}
function update(elapsed) {
if (__destroyTimer != undefined) {
__destroyTimer = __destroyTimer + elapsed;
if (__destroyTimer < Engine.PongObject.FRAME_TIME) {
return(undefined);
}
target.nextFrame();
if (target._currentframe < target._totalframes) {
queueForDisplay();
__destroyTimer = __destroyTimer - Engine.PongObject.FRAME_TIME;
} else {
cancelUpdates();
removeFromWorld();
}
return(undefined);
}
__waitedTime = __waitedTime + elapsed;
if (__waitedTime >= __displayDelay) {
__visible = true;
target._visible = true;
delete __waitedTime;
delete __displayDelay;
cancelUpdates();
}
}
var depthShift = 1000;
var className = "Brick";
static var SOLID = Game.PongLevels.S;
static var DESTRUCTIBLE = Game.PongLevels.D;
var pointValue = 10;
var solidId = "BrickSolid";
var destructibleId = "BrickDestructible";
var __displayDelay = 0;
var __waitedTime = 0;
var __visible = true;
}
Symbol 602 MovieClip [__Packages.Engine.PongPlayer] Frame 0
class Engine.PongPlayer
{
var world, __paddle, __ball, __goal, side, onUpdate, __activeItem, __activeItemID, __itemActiveTime, __frameElapsedTime, __itemTime, __itemBlinkTime;
function PongPlayer (myWorld, myPaddle, myBall, myGoal, mySide) {
world = myWorld;
__paddle = myPaddle;
__paddle.addEventListener("onHoldBall", this);
__paddle.addEventListener("onReleaseBall", this);
__ball = myBall;
__goal = myGoal;
side = mySide;
}
function update(elapsed) {
checkActiveItem(elapsed);
onUpdate(elapsed);
}
function activateItem(itemObj, itemID, time, blinkTime) {
var newIsCurrent = ((__activeItem == itemObj) && (__activeItemID == itemID));
if (newIsCurrent) {
__itemActiveTime = 0;
__frameElapsedTime = 0;
return(undefined);
}
deactivateItem();
__itemActiveTime = 0;
__frameElapsedTime = 0;
__activeItem = itemObj;
__activeItemID = itemID;
__itemTime = time;
__itemBlinkTime = blinkTime;
itemObj.activateItem(itemID);
world.dispatchEvent({type:"onActivateItem", itemID:__activeItemID, who:side});
}
function deactivateItem() {
world.dispatchEvent({type:"onActivateItem", itemID:-1, who:side});
if (__activeItem == undefined) {
return(undefined);
}
__activeItem.deactivateItem();
delete __activeItem;
delete __activeItemID;
delete __itemTime;
delete __itemBlinkTime;
delete __itemActiveTime;
delete __frameElapsedTime;
}
function onHoldBall(eventObj) {
__holdingBall = true;
}
function onReleaseBall(eventObj) {
__holdingBall = false;
deactivateItem();
}
function toString() {
return(className);
}
function set handicap(newValue) {
__handicap = newValue;
__speed = SPEED - __handicap;
//return(handicap);
}
function get handicap() {
return(__handicap);
}
function checkActiveItem(elapsed) {
if (__activeItem == null) {
return(undefined);
}
__itemActiveTime = __itemActiveTime + elapsed;
if (__itemActiveTime >= __itemTime) {
deactivateItem();
return(undefined);
}
var timeLeft = (__itemTime - __itemActiveTime);
if (timeLeft <= __itemBlinkTime) {
__frameElapsedTime = __frameElapsedTime + elapsed;
if (__frameElapsedTime >= (FRAME_TIME * 2)) {
__frameElapsedTime = 0;
world.dispatchEvent({type:"onBlinkItem", who:side});
}
}
}
var className = "PongPlayer";
static var SPEED = Game.PongLevels.PADDLE_SPEED;
var __handicap = 0;
var __speed = Game.PongLevels.PADDLE_SPEED;
static var FRAME_TIME = Game.PongLevels.FRAME_TIME;
var __holdingBall = false;
}
Symbol 603 MovieClip [__Packages.Game.Players.ComputerPlayer] Frame 0
class Game.Players.ComputerPlayer extends Engine.PongPlayer
{
var __speed, __paddle, __holdingBall, __ball, __goal, side;
function ComputerPlayer (myWorld, myPaddle, myBall, myGoal, mySide) {
super(myWorld, myPaddle, myBall, myGoal, mySide);
__speed = Engine.PongPlayer.SPEED - __handicap;
}
function onUpdate(elapsed) {
var maxMoveY = (elapsed * __speed);
var bounds = __paddle.bounds;
var myY = __paddle.y;
var targetY;
if (!__holdingBall) {
targetY = __ball.y;
if (ballOnOtherSide()) {
targetY = __ball.y;
if (targetY < __goal.top) {
targetY = __goal.top;
} else if (targetY > __goal.bottom) {
targetY = __goal.bottom;
}
} else if (ballBehindPaddle()) {
targetY = bounds.vCenter;
} else if (ballAbovePaddle()) {
if (ballInHitArea()) {
targetY = (bounds.yMin + (__paddle.__get__width() / 2)) + (__ball.radius * 3);
} else if (__ball.direction.y > 0) {
}
} else if (ballBelowPaddle()) {
if (ballInHitArea()) {
targetY = (bounds.yMax - (__paddle.__get__width() / 2)) - (__ball.radius * 3);
} else if (__ball.direction.y < 0) {
}
}
} else {
targetY = bounds.vCenter;
}
var dy = (targetY - myY);
if (__holdingBall) {
__waitTime = __waitTime + elapsed;
if ((Math.abs(dy) <= 10) && (__waitTime >= (Engine.PongPlayer.FRAME_TIME * 5))) {
__paddle.releaseBall();
delete __waitTime;
}
}
if (dy < 0) {
dy = -Math.min(-dy, maxMoveY);
} else {
dy = Math.min(dy, maxMoveY);
}
__paddle.moveByPlayer(dy, __ball);
}
function onHoldBall(eventObj) {
__waitTime = 0;
__holdingBall = true;
}
function ballInHitArea() {
return(__paddle.ballInHitArea(__ball));
}
function ballAbovePaddle() {
return(__paddle.ballAbovePaddle(__ball));
}
function ballBelowPaddle() {
return(__paddle.ballBelowPaddle(__ball));
}
function ballBehindPaddle() {
if (side == Engine.PongObject.RIGHT_DIR) {
if (__paddle.right < __ball.left) {
return(true);
}
} else if (__ball.right < __paddle.left) {
return(true);
}
return(false);
}
function ballOnOtherSide() {
if (side == Engine.PongObject.RIGHT_DIR) {
if (__ball.right < __paddle.bounds.hCenter) {
return(true);
}
} else if (__paddle.bounds.hCenter < __ball.left) {
return(true);
}
return(false);
}
var __handicap = Game.PongLevels.DEFAULT_COMPUTER_HANDICAP;
var __waitTime = 0;
var className = "ComputerPlayer";
}
Symbol 604 MovieClip [__Packages.Game.Players.HumanPlayer] Frame 0
class Game.Players.HumanPlayer extends Engine.PongPlayer
{
var mouseListener, world, __paddle, __speed, __ball, lastMouseY, curMouseY;
function HumanPlayer (myWorld, myPaddle, myBall, myGoal, mySide) {
super(myWorld, myPaddle, myBall, myGoal, mySide);
var controller = this;
mouseListener = {onMouseUp:function () {
controller.releaseBall();
}};
Mouse.addListener(mouseListener);
}
function releaseBall() {
if (world.engine.paused || (!world.__get__active())) {
return(undefined);
}
__paddle.releaseBall();
}
function onUpdate(elapsed) {
if (__paddle.__get__sticky() && (Key.isDown(RELEASE_KEY))) {
releaseBall();
}
var moveY = ((((Key.isDown(DOWN_KEY) - Key.isDown(UP_KEY)) * elapsed) * __speed) * keyboardFactor);
if (moveY != 0) {
__paddle.moveByPlayer(moveY, __ball);
__keyboardUsed = true;
return(undefined);
}
var targetY = world.target._ymouse;
lastMouseY = curMouseY;
curMouseY = targetY;
if (__keyboardUsed && (lastMouseY == curMouseY)) {
return(undefined);
}
__keyboardUsed = false;
var dy = (targetY - __paddle.y);
var maxMoveY = (elapsed * __speed);
if (dy < 0) {
dy = Math.max(dy, -maxMoveY);
} else if (dy > 0) {
dy = Math.min(dy, maxMoveY);
}
if (dy != 0) {
__paddle.moveByPlayer(dy, __ball);
}
}
static var RELEASE_KEY = 32;
static var DOWN_KEY = 40;
static var UP_KEY = 38;
var className = "HumanPlayer";
var keyboardFactor = 0.75;
var __keyboardUsed = false;
}
Symbol 605 MovieClip [__Packages.Game.Objects.BonusPointsItem] Frame 0
class Game.Objects.BonusPointsItem extends Engine.PongObject
{
var itemIndex, __assetFrame, __direction, __points, currentPos, width, target, height, getUpdates, left, x, right, top, y, bottom, __viewTimer, cancelUpdates, removeFromWorld, lastPos;
function BonusPointsItem (myIndex, myDirection, myPoints) {
super();
itemID++;
if (itemID > 256) {
itemID = 0;
}
itemIndex = myIndex;
__assetFrame = myIndex + 1;
__direction = myDirection;
__points = myPoints;
}
function onAddToScene() {
currentPos = new Vector(0, 0, 0);
width = target._width;
height = target._height;
target.gotoAndStop(__assetFrame);
target.swapDepths((depthShift * 61440) + itemID);
var pointFrame;
var points_mc = target.points_mc;
if (__points < 0) {
points_mc.gotoAndStop(1);
points_mc.points_txt.text = -__points;
} else {
points_mc.gotoAndStop(3);
points_mc.points_txt.text = __points;
}
var points_txt = points_mc.points_txt;
points_txt.autoSize = "left";
var w = Math.ceil(points_txt._width);
var tw = Math.ceil(points_txt.textWidth);
points_mc.fill_mc._width = tw;
points_mc.frame_mc._width = tw + 2;
getUpdates();
}
function onDisplay() {
left = x;
right = x + width;
top = y;
bottom = y + height;
}
function update(elapsed) {
calcNewPosBy((__direction.x * __speed) * elapsed, (__direction.y * __speed) * elapsed);
target.points_mc._y = currentPos.y;
__viewTimer = __viewTimer + elapsed;
if (__viewTimer < Engine.PongObject.FRAME_TIME) {
return(undefined);
}
__viewTimer = 0;
__waitFrame++;
if (__fading) {
target._alpha = target._alpha - 20;
if (target._alpha < 10) {
target._visible = false;
target._xscale = (target._yscale = 1);
target._alpha = 10;
cancelUpdates();
removeFromWorld();
return(undefined);
}
} else if (__waitFrame > 4) {
__fading = true;
target._alpha = target._alpha - 30;
}
}
function calcNewPosBy(dx, dy, keepLastPos) {
if (!keepLastPos) {
lastPos = currentPos;
}
currentPos = new Vector(lastPos.x + dx, lastPos.y + dy, 0);
}
var className = "BonusPointItem";
var assetID = "Item";
var __speed = 30;
var depthShift = 4000;
static var itemID = 0;
var __fading = false;
var __waitFrame = 0;
}
Symbol 60 MovieClip Frame 5
stop();
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 2
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 88 MovieClip [GoalLeft] Frame 1
stop();
Symbol 95 MovieClip [GoalRight] Frame 1
stop();
Symbol 109 MovieClip [PaddleLeft] Frame 1
stop();
Symbol 116 MovieClip [PaddleRight] Frame 1
stop();
Symbol 128 MovieClip [Ball] Frame 1
stop();
Symbol 128 MovieClip [Ball] Frame 2
stop();
Symbol 132 MovieClip [BrickSolid] Frame 1
stop();
Symbol 145 MovieClip [BrickDestructible] Frame 1
stop();
Symbol 173 MovieClip Frame 1
stop();
Symbol 174 MovieClip [Item] Frame 1
stop();
Symbol 185 Button
on (release) {
nextFrame();
}
Symbol 191 Button
on (release) {
nextFrame();
}
Symbol 212 Button
on (release) {
prevFrame();
}
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 2
stop();
Symbol 236 MovieClip [DialogHelp] Frame 1
#initclip 48
Object.registerClass("DialogHelp", Game.ModalDialogs.PongHelp);
#endinitclip
Symbol 236 MovieClip [DialogHelp] Frame 3
stop();
Symbol 252 Button
on (release) {
controller.submitScore();
}
Symbol 257 MovieClip [DialogQuit] Frame 1
#initclip 43
Object.registerClass("DialogQuit", Game.ModalDialogs.PongQuit);
#endinitclip
Symbol 257 MovieClip [DialogQuit] Frame 3
stop();
Symbol 264 Button
on (release) {
controller.nextLevelRelease();
}
Symbol 271 MovieClip Frame 1
stop();
Symbol 272 MovieClip [DialogLevelDone] Frame 1
#initclip 44
Object.registerClass("DialogLevelDone", Game.ModalDialogs.PongLevelDone);
#endinitclip
Symbol 272 MovieClip [DialogLevelDone] Frame 3
stop();
Symbol 288 MovieClip [DialogGameOver] Frame 1
#initclip 45
Object.registerClass("DialogGameOver", Game.ModalDialogs.PongGameOver);
#endinitclip
Symbol 288 MovieClip [DialogGameOver] Frame 3
stop();
Symbol 294 MovieClip [DialogPause] Frame 1
#initclip 46
Object.registerClass("DialogPause", Game.ModalDialogs.PongPause);
#endinitclip
Symbol 294 MovieClip [DialogPause] Frame 3
stop();
Symbol 306 MovieClip Frame 7
stop();
Symbol 309 MovieClip Frame 7
stop();
Symbol 312 MovieClip Frame 7
stop();
Symbol 315 MovieClip Frame 7
stop();
Symbol 318 MovieClip Frame 7
stop();
Symbol 321 MovieClip Frame 7
stop();
Symbol 324 MovieClip Frame 7
stop();
Symbol 327 MovieClip Frame 7
stop();
Symbol 328 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 2
stop();
Symbol 328 MovieClip Frame 3
stop();
Symbol 328 MovieClip Frame 4
stop();
Symbol 328 MovieClip Frame 5
stop();
Symbol 328 MovieClip Frame 6
stop();
Symbol 328 MovieClip Frame 7
stop();
Symbol 328 MovieClip Frame 8
stop();
Symbol 355 MovieClip Frame 1
stop();
Symbol 372 MovieClip [PongScoreboard] Frame 1
#initclip 47
Object.registerClass("PongScoreboard", Game.PongScoreboard);
#endinitclip
Symbol 377 MovieClip [GetReady] Frame 1
stop();
Symbol 377 MovieClip [GetReady] Frame 2
play();
Symbol 377 MovieClip [GetReady] Frame 17
hide();
Symbol 378 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 399 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 1
stop();
Symbol 407 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 1
stop();
Symbol 423 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 1
stop();
Symbol 431 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 1
stop();
Symbol 434 MovieClip [PongLevelChooser] Frame 1
#initclip 49
Object.registerClass("PongLevelChooser", Game.PongLevelChooser);
#endinitclip
Symbol 434 MovieClip [PongLevelChooser] Frame 3
stop();
Symbol 449 MovieClip [b_right_side] Frame 1
#initclip 54
Object.registerClass("b_right_side", Game.PongSelectorItem);
#endinitclip
stop();
Symbol 449 MovieClip [b_right_side] Frame 5
stop();
Symbol 449 MovieClip [b_right_side] Frame 10
stop();
Symbol 452 MovieClip [b_left] Frame 1
#initclip 50
Object.registerClass("b_left", Game.PongSelectorItem);
#endinitclip
stop();
Symbol 452 MovieClip [b_left] Frame 5
stop();
Symbol 452 MovieClip [b_left] Frame 10
stop();
Symbol 468 MovieClip [b_villian_select] Frame 1
#initclip 51
Object.registerClass("b_villian_select", Game.PongSelectorItem);
#endinitclip
stop();
Symbol 468 MovieClip [b_villian_select] Frame 5
stop();
Symbol 468 MovieClip [b_villian_select] Frame 10
stop();
Symbol 483 MovieClip Frame 1
stop();
Symbol 483 MovieClip Frame 2
stop();
Symbol 483 MovieClip Frame 3
stop();
Symbol 483 MovieClip Frame 4
stop();
Symbol 483 MovieClip Frame 5
stop();
Symbol 484 MovieClip [b_character_select] Frame 1
#initclip 52
Object.registerClass("b_character_select", Game.PongSelectorItem);
#endinitclip
stop();
Symbol 484 MovieClip [b_character_select] Frame 5
stop();
Symbol 484 MovieClip [b_character_select] Frame 10
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 2
stop();
Symbol 493 MovieClip [CharacterSelect] Frame 1
#initclip 53
Object.registerClass("CharacterSelect", Game.PongCharacterSelect);
#endinitclip
Symbol 493 MovieClip [CharacterSelect] Frame 10
stop();
initStartButton();
Symbol 528 MovieClip Frame 1
stop();
Symbol 545 MovieClip Frame 1
stop();
Symbol 551 MovieClip Frame 1
stop();
Symbol 557 MovieClip Frame 1
stop();
Symbol 562 MovieClip [GDK] Frame 1
#initclip 55
Object.registerClass("GDK", GDK.Base);
#endinitclip