Frame 1
function showMochiAd() {
trace("showing mochi ad");
MochiAd.showPreGameAd({id:"820cfde916c3c244", res:"500x500"});
}
var localConnection = new LocalConnection();
var hostURL = localConnection.domain();
com.doof.DoofBot.init(hostURL, "DoofBall");
stop();
Instance of Symbol 65 MovieClip "background" in Frame 1
on (release) {
getURL ("http://www.doof.com/?ref=doofball", "_blank");
}
Instance of Symbol 87 MovieClip in Frame 1
on (release) {
getURL ("http://www.doof.com/?ref=doofball", "_blank");
}
Frame 2
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
play();
MovieClip.prototype.bounceIn = function (delay, callback) {
this._visible = false;
xFinish = this._x;
yFinish = this._y;
rotFinish = this._rotation;
this._xscale = 0;
this._yscale = 0;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
this.gotoAndPlay(2);
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
xtween.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.bounceFinal = function (delay, callback) {
this._visible = false;
xFinish = this._x;
yFinish = this._y;
rotFinish = this._rotation;
this._xscale = 0;
this._yscale = 0;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
xtween.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.bounceBtnIn = function (amount) {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, this._xscale, amount, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, this._yscale, amount, 1, true);
};
MovieClip.prototype.bounceBtnOut = function () {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, this._xscale, 90, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, this._yscale, 90, 1, true);
};
MovieClip.prototype.bounceOut = function (delay, callback) {
this._visible = false;
var _local3 = this._x;
var _local2 = this._y;
var _local6 = this._rotation;
this._xscale = 100;
this._yscale = 100;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, 100, 0, 1.5, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, 100, 0, 1.5, true);
xtween.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.fadeOut = function (delay, callback) {
this._alpha = 100;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local2 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.Regular.easeOut, 100, 0, 1.5, true);
_local2.onMotionFinished = function () {
this._visible = false;
this._alpha = 100;
};
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.slide = function (delay, callback) {
this._visible = false;
var xFinish = this._x;
this._x = Stage.width + this._width;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local2 = new mx.transitions.Tween(this, "_x", mx.transitions.easing.Elastic.easeOut, this._x, xFinish, 1, true);
_local2.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
ScaleRange = 350;
ScaleMin = 150;
Rotation = Math.random() * 4;
angle = 0;
angleRate = 0.1;
max = 12;
vx = randRange(-max, max);
vy = randRange(-max, max);
rot = randRange(-2, 2);
var soundsOn = true;
mouseX = _root._xmouse;
mouseY = _root._ymouse;
oldMouseX = mouseX;
oldMouseY = mouseY;
Frame 10
delete _global.teams;
delete _global.Me;
delete _global.Opponent;
_global.teams = new com.Teams();
_global.Me = new com.Player();
_global.Opponent = new com.Player();
stop();
Frame 19
stop();
Frame 26
stop();
Frame 33
trace("DoofBot posting...");
var localConnection = new LocalConnection();
var hostURL = localConnection.domain();
com.doof.DoofBot.start(hostURL, "DoofBall");
Frame 44
var crowd = new Sound(this);
crowd.attachSound("Football_Crowd_AmbLoop.wav");
crowd.stop();
if (soundsOn) {
trace("soundsOn");
this.attachMovie("audio", this.getNextHighestDepth());
crowd.start(0, 1);
} else {
crowd.stop();
}
function buildDisplay() {
scoreBoard.playerScore.text = 0;
scoreBoard.opponentScore.text = 0;
scoreBoard.opponentTeam.logos.gotoAndStop(_global.Opponent.getId() + 1);
scoreBoard.playerTeam.logos.gotoAndStop(_global.Me.getId() + 1);
scoreBoard.opponentTeam.nameText.text = _global.teams.getTeam(_global.Opponent.getId()).getName().toUpperCase();
scoreBoard.playerTeam.nameText.text = _global.teams.getTeam(_global.Me.getId()).getName().toUpperCase();
com.Fx.zoomIn(rods, 0, 0.5, -2000, rods._y, rods._x, rods._y, 10);
com.Fx.zoomIn(scoreBoard, 1, 0.5, 2000, scoreBoard._y, scoreBoard._x, scoreBoard._y, 10);
displayPlayers(_global.rowsOpponent, 0);
displayPlayers(_global.rowsPlayer, 0);
}
function hideDisplay() {
com.Fx.zoomIn(scoreBoard, 1, 0.5, scoreBoard._x, scoreBoard._y, 2000, scoreBoard._y, 10);
}
function displayPlayers(playerArray, wait) {
var _local5 = 0;
var _local6 = 50;
var _local3 = 0;
while (_local3 < playerArray.length) {
var _local2 = 0;
while (_local2 < playerArray[_local3].length) {
_local5++;
var _local1 = playerArray[_local3][_local2];
com.Fx.zoomIn(_local1, wait + (_local5 * _local6), 1, -2000, _local1._y, _local1._x, _local1._y, 10);
_local2++;
}
_local3++;
}
}
function setLayout(mc, type) {
if (type == 0) {
mc.gotoAndPlay(1);
var _local2 = [[mc.ball0, mc.ball1, mc.ball2], [mc.ball3, mc.ball4, mc.ball5, mc.ball6], [mc.ball7, mc.ball8], [mc.ball9]];
} else {
mc.gotoAndPlay(2);
var _local2 = [[mc.ball0, mc.ball1, mc.ball2, mc.ball3], [mc.ball4, mc.ball5, mc.ball6], [mc.ball7, mc.ball8], [mc.ball9]];
}
return(_local2);
}
function scoring() {
if (!hasScored) {
if (ball.ball.hitTest(goalPlayer.hit1)) {
trace("no GOAL");
ball.reflect();
return(undefined);
}
if (ball.ball.hitTest(goalPlayer.hit2)) {
trace("no GOAL");
ball.reflect();
return(undefined);
}
if (ball.ball.hitTest(goalOpponent.hit1)) {
trace("no GOAL");
ball.reflect();
return(undefined);
}
if (ball.ball.hitTest(goalOpponent.hit2)) {
trace("no GOAL");
ball.reflect();
return(undefined);
}
if (ball.ball.hitTest(goalOpponent.hit)) {
hasScored = true;
if (soundsOn) {
goalDisplay.gotoAndPlay("goal");
} else {
goalDisplay.gotoAndPlay("goal_nosound");
}
ball.centerBall();
scoreOpponent++;
totalScorePlayer = totalScorePlayer - 15;
_global.Me.setTotalScore(totalScorePlayer);
_global.Opponent.setScore(scoreOpponent);
scoreBoard.opponentScore.text = scoreOpponent;
} else if (ball.ball.hitTest(goalPlayer.hit)) {
hasScored = true;
if (soundsOn) {
goalDisplay.gotoAndPlay("goal");
} else {
goalDisplay.gotoAndPlay("goal_nosound");
}
ball.centerBall();
scorePlayer++;
totalScorePlayer = totalScorePlayer + 25;
_global.Me.setTotalScore(totalScorePlayer);
_global.Me.setScore(scorePlayer);
scoreBoard.playerScore.text = scorePlayer;
scoreBoard.playerTotalScore.text = _global.Me.getTotalScore();
}
}
}
function endGame() {
if (timer.getMili() <= 0) {
if (scoreOpponent == 1) {
totalScorePlayer = totalScorePlayer + 100;
}
if (_global.Me.getScore() != _global.Opponent.getScore()) {
delete onEnterFrame;
timer.stop();
scoreBoard.timerText.text = "0:00:00";
_root.gotoAndPlay("game over");
trace("gotoAndPlay 'game over'");
return(undefined);
}
scoreBoard.timerText.text = "0:00:00";
if (!goldenGoal) {
timer.stop();
goldenGoal = true;
if (soundsOn) {
goldenGoalAnim.gotoAndPlay("play");
} else {
goldenGoalAnim.gotoAndPlay("play_nosound");
}
}
}
}
function restart() {
trace("RESTART");
hasScored = false;
ball.init();
}
function controls() {
if (Key.isDown(39)) {
players._x = Math.min(players._x + MOVERATE, playersRightBoundary);
} else if (Key.isDown(37)) {
players._x = Math.max(players._x - MOVERATE, playersLeftBoundary);
}
if (Key.isDown(32) && (TURBO > 0)) {
TURBO = TURBO - TURBODEPLETE;
TURBO = Math.max(0, TURBO);
VMAX = VMAXBASE * TURBOMULTIPLIER;
MOVERATE = MOVERATEBASE * TURBOMULTIPLIER;
} else {
TURBO = TURBO + TURBOREPLENISH;
TURBO = Math.min(TURBOMAX, TURBO);
VMAX = VMAXBASE;
MOVERATE = MOVERATEBASE;
}
}
function display() {
scoreBoard.timerText.text = timer.displayTime();
scoreBoard.turboDisplay.mask._width = (turboBarWidth * TURBO) / TURBOMAX;
}
function moveOpponent() {
ballRelative = ball._y - opponents._y;
if (ball.vy < 0) {
if (ballRelative > _global.rowsOpponent[0][0]._y) {
activeRow = 0;
} else if (ballRelative > _global.rowsOpponent[1][0]._y) {
activeRow = 1;
} else if (ballRelative > _global.rowsOpponent[2][0]._y) {
activeRow = 2;
} else {
activeRow = 3;
}
} else if (ballRelative < _global.rowsOpponent[3][0]._y) {
activeRow = 3;
} else if (ballRelative < _global.rowsOpponent[2][0]._y) {
activeRow = 2;
} else if (ballRelative < _global.rowsOpponent[1][0]._y) {
activeRow = 1;
} else {
activeRow = 0;
}
column = 0;
distance = Stage.width;
i = 0;
while (i < _global.rowsOpponent[activeRow].length) {
testDistance = Math.abs((ball._x - _global.rowsOpponent[activeRow][i]._x) - opponents._x);
if (testDistance < distance) {
column = i;
distance = testDistance;
}
i++;
}
difference = (ball._x - _global.rowsOpponent[activeRow][column]._x) - opponents._x;
if (difference >= OPPONENTMOVERATE) {
opponents._x = Math.min(opponents._x + OPPONENTMOVERATE, opponentsRightBoundary);
} else if (difference <= (-OPPONENTMOVERATE)) {
opponents._x = Math.max(opponents._x - OPPONENTMOVERATE, opponentsLeftBoundary);
}
if (!collisions()) {
collisionsPlayer();
}
}
function aimOpponentGoal() {
var _local1 = 35;
var _local5 = ((Math.random() * _local1) * 2) - _local1;
var _local3 = (goalOpponent._x + _local5) - ball._x;
var _local2 = goalOpponent._y - ball._y;
var _local4 = Math.atan2(_local2, _local3);
return(_local4);
}
function aimOpponent(target) {
var _local2 = (target._x + opponents._x) - ball._x;
var _local1 = (target._y + opponents._y) - ball._y;
var _local3 = Math.atan2(_local1, _local2);
return(_local3);
}
function collisions() {
if (!colliding) {
i = 0;
while (i < _global.rowsOpponent.length) {
j = 0;
while (j < _global.rowsOpponent[i].length) {
if (ball.ball.hitTest(_global.rowsOpponent[i][j].hit)) {
isColliding();
_global.Opponent.setPossessions();
_global.rowsOpponent[i][j].gotoAndPlay(2);
var _local2 = Math.random() > 0.1;
if ((i == 0) || (_local2)) {
ballAngle = aimOpponentGoal();
ballAngle = ballAngle + ((Math.random() * ACCURACY) - ACCURACY);
ball.kickBall(ballAngle, VMAXOPPONENT);
return(true);
}
row = i - 1;
var _local3 = com.Util.rand(_global.rowsOpponent[row].length - 1);
mc = _global.rowsOpponent[row][_local3];
ballAngle = aimOpponent(mc);
ballAngle = ballAngle + ((Math.random() * ACCURACY) - ACCURACY);
ball.kickBall(ballAngle, VMAXOPPONENT);
trace("VMAXOPPONENT " + VMAXOPPONENT);
return(true);
}
j++;
}
i++;
}
}
return(false);
}
function isColliding() {
colliding = true;
collideInterval = setInterval(clearCollision, 100);
}
function clearCollision() {
colliding = false;
clearInterval(collideInterval);
}
function collisionsPlayer() {
if (!colliding) {
i = 0;
while (i < _global.rowsPlayer.length) {
j = 0;
while (j < _global.rowsPlayer[i].length) {
if (ball.ball.hitTest(_global.rowsPlayer[i][j].hit)) {
isColliding();
_global.Me.setPossessions();
_global.rowsPlayer[i][j].gotoAndPlay(2);
mc = _global.rowsPlayer[row][player];
var _local2 = com.Util.getPos(ball);
var _local3 = com.Util.getPos(_global.rowsPlayer[i][j]);
var _local4 = _local2.x - _local3.x;
ballAngle = (-90 + (_local4 * SCALE)) * deg2rad;
ball.kickBall(ballAngle, VMAX);
return(true);
}
j++;
}
i++;
}
}
return(false);
}
var CORRECTION = (_global.Me.getRound() * 0.25);
var SCALE = 2.5;
var VMAXBASE = (6 + CORRECTION);
var VMAX = VMAXBASE;
var VMAXOPPONENT = (5 + (CORRECTION * 1.2));
var ACCURACY = (Math.random() * 0.3);
var MOVERATEBASE = 3;
var MOVERATE = MOVERATEBASE;
var OPPONENTMOVERATE = (2 + CORRECTION);
var PLAYERGOALRANDOM = (10 * deg2rad);
var TURBO = 100;
var TURBOMAX = 100;
var TURBODEPLETE = 0.2;
var TURBOREPLENISH = 0.07;
var TURBOMULTIPLIER = 1.6;
var turboBarWidth = scoreBoard.turboDisplay.mask._width;
var goldenGoal = false;
var layout = Math.round(Math.random());
_global.rowsOpponent = setLayout(opponents, layout);
_global.rowsPlayer = setLayout(players, _global.Me.getLayout());
var timer = (new com.Timer(120000));
timer.start();
var Sound1 = new Sound(this);
trace("soundsOn " + soundsOn);
trace("_root.soundsOn " + _root.soundsOn);
if (soundsOn) {
Sound1.attachSound("soccer_01");
}
Sound1.setVolume(10);
var playersLeftBoundary = 100;
var playersRightBoundary = 250;
var opponentsLeftBoundary = 10;
var opponentsRightBoundary = 140;
var hasScored = false;
var scorePlayer = 0;
var scoreOpponent = 0;
var totalScorePlayer = 500;
var deg2rad = (Math.PI/180);
var colliding = false;
var collideInterval;
var playerCollisions = 0;
var oppenentCollisions = 0;
_global.Opponent.setScore(0);
_global.Me.setScore(0);
buildDisplay();
if (_global.gameStarted != true) {
_root.connector.gameStarted(0);
_global.gameStarted = true;
}
var ball = _ball.attachMovie("Ball", "ball", 1, {startX:168, startY:244, players:_global.rowsPlayer, opponents:_global.rowsOpponent, VMAX:VMAX});
onEnterFrame = function () {
display();
if (!ball.isRestarting()) {
controls();
moveOpponent();
}
scoring();
endGame();
};
stop();
Frame 55
if (_global.Me.getScore() >= _global.Opponent.getScore()) {
if (soundsOn) {
playerWin.gotoAndPlay("play");
} else {
playerWin.gotoAndPlay("play_nosound");
}
} else if (_global.Me.getScore() < _global.Opponent.getScore()) {
if (soundsOn) {
playerLose.play();
} else {
playerLose.gotoAndPlay("play_nosound");
}
}
stop();
Frame 65
function buildDisplay() {
scoreBoard.playerScore.text = 0;
scoreBoard.opponentScore.text = 0;
scoreBoard.opponentTeam.logos.gotoAndStop(_global.Opponent.getId() + 1);
scoreBoard.playerTeam.logos.gotoAndStop(_global.Me.getId() + 1);
scoreBoard.opponentTeam.nameText.text = _global.teams.getTeam(_global.Opponent.getId()).getName().toUpperCase();
scoreBoard.playerTeam.nameText.text = _global.teams.getTeam(_global.Me.getId()).getName().toUpperCase();
com.Fx.zoomIn(rods, 0, 0.5, -2000, rods._y, rods._x, rods._y, 10);
com.Fx.zoomIn(scoreBoard, 1, 0.5, 2000, scoreBoard._y, scoreBoard._x, scoreBoard._y, 10);
displayPlayers(_global.rowsOpponent, 0);
displayPlayers(_global.rowsPlayer, 0);
}
function hideDisplay() {
com.Fx.zoomIn(scoreBoard, 1, 0.5, scoreBoard._x, scoreBoard._y, 2000, scoreBoard._y, 10);
}
function displayPlayers(playerArray, wait) {
var _local5 = 0;
var _local6 = 50;
var _local3 = 0;
while (_local3 < playerArray.length) {
var _local2 = 0;
while (_local2 < playerArray[_local3].length) {
_local5++;
var _local1 = playerArray[_local3][_local2];
com.Fx.zoomIn(_local1, wait + (_local5 * _local6), 1, -2000, _local1._y, _local1._x, _local1._y, 10);
_local2++;
}
_local3++;
}
}
hideDisplay();
stop();
Frame 73
stop();
Frame 74
stop();
btnRestart.onRelease = function () {
gotoAndPlay ("instructions");
};
Frame 84
stop();
btnPlay.onRelease = function () {
getURL ("http://www.markfennell.com/flash/premiere", "_top");
};
Frame 85
trace("GAMEEEEEE OVERRRRRR");
stop();
Symbol 3 MovieClip [GIGYA] Frame 1
System.security.allowDomain("cdn.gigya.com");
System.security.allowInsecureDomain("cdn.gigya.com");
var mcWF = _root.createEmptyMovieClip("Wildfire", _root.getNextHighestDepth());
mcWF._lockroot = true;
mcWF._x = 0;
mcWF._y = 0;
mcWF.ModuleID = "PostModule1";
var cfg = ((_root[mcWF.ModuleID] = {}));
cfg.width = "500";
cfg.height = "500";
cfg.bookmarkURL = "http://www.doof.com/#/games/DoofBall";
cfg.widgetTitle = "Doof Ball";
cfg.advancedTracking = "true";
cfg.partner = "177341";
cfg.UIConfig = "<config><display showDesktop=\"true\" showEmail=\"true\" useTransitions=\"true\" showBookmark=\"true\" codeBoxHeight=\"auto\" showCodeBox=\"true\" showCloseButton=\"true\" bulletinChecked=\"false\" networksWithCodeBox=\"\"></display><body corner-roundness=\"8;8;8;8\"><background frame-color=\"Transparent\" gradient-color-begin=\"#353535\" gradient-color-end=\"#606060\" corner-roundness=\"8;8;8;8\"></background><controls size=\"11\" bold=\"true\"><snbuttons iconsOnly=\"false\" type=\"textUnder\" frame-color=\"#6D0000\" background-color=\"#FFFFFF\" over-background-color=\"#FFFFFF\" color=\"#CACACA\" corner-roundness=\"0;8;8;8\" gradient-color-begin=\"#8A8A8A\" gradient-color-end=\"#000000\" font=\"Arial\" size=\"11\" bold=\"false\" over-gradient-color-begin=\"#AAAAAA\" over-gradient-color-end=\"#000000\" over-color=\"#F4F4F4\" down-color=\"#000000\"><more frame-color=\"Transparent\"></more></snbuttons><textboxes frame-color=\"#000000\" color=\"#AAAAAA\" corner-roundness=\"0;0;0;0\" gradient-color-begin=\"#202020\" gradient-color-end=\"#0B0B0B\" font=\"Arial\" bold=\"false\"><codeboxes color=\"#EAEAEA\" frame-color=\"#8A8A8A\" gradient-color-begin=\"#000000\" font=\"Arial\" bold=\"false\"></codeboxes><inputs frame-color=\"#6D0000\"></inputs><dropdowns frame-color=\"#6D0000\" handle-gradient-color-begin=\"#B50000\" handle-gradient-color-end=\"#6D0000\" handle-over-gradient-color-begin=\"#FF0000\" handle-over-gradient-color-end=\"#DA0000\" handle-down-gradient-color-begin=\"#FF0000\" handle-down-gradient-color-end=\"#6D0000\" background-color=\"#6D0000\" gradient-color-begin=\"#000000\" font=\"Arial\" bold=\"false\"></dropdowns></textboxes><buttons frame-color=\"#FF0000\" gradient-color-begin=\"#FF2424\" gradient-color-end=\"#6D0000\" color=\"#F4F4F4\" corner-roundness=\"0;8;8;8\" font=\"Arial\" size=\"10\" bold=\"false\" down-frame-color=\"#000000\" over-gradient-color-begin=\"#DA0000\" down-gradient-color-begin=\"#910000\" over-gradient-color-end=\"#DA0000\" down-gradient-color-end=\"#FF0000\" over-color=\"#F4F4F4\"><post-buttons gradient-color-begin=\"#FF4949\" gradient-color-end=\"#6D0000\"></post-buttons></buttons><listboxes corner-roundness=\"5;5;5;5\"></listboxes><servicemarker gradient-color-begin=\"#DA0000\" gradient-color-end=\"#DA0000\"></servicemarker></controls><texts color=\"#FFFFFF\" font=\"Arial\" size=\"10\"><privacy color=\"#959595\" size=\"11\"></privacy><headers size=\"11\" bold=\"true\"></headers><labels size=\"11\" bold=\"true\"></labels><messages color=\"#D5D5D5\" frame-thickness=\"0\" corner-roundness=\"0;0;0;0\" gradient-color-begin=\"#B50000\" gradient-color-end=\"#000000\" size=\"11\" bold=\"true\"></messages><links color=\"#DFDFDF\" underline=\"false\" size=\"11\" bold=\"true\" over-color=\"#FFFFFF\"></links></texts></body></config>";
cfg.defaultContent = function () {
return("<object width=\"500\" height=\"500\">\u00A0<param name=\"movie\" value=\"http://static.doof.com/content/static/games/DoofBall/DoofBall.swf\"></param>\u00A0<param name=\"wmode\" value=\"transparent\"></param>\u00A0<embed src=\"http://static.doof.com/content/static/games/DoofBall/DoofBall.swf\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"500\"\u00A0height=\"500\"></embed></object>");
};
cfg.onPostProfile = function (eventObj) {
trace((((("event fired eventObj.type=" + eventObj.type) + " eventObj.network=") + eventObj.network) + " eventObj.partnerData=") + eventObj.partnerData);
};
cfg.onLoad = function (eventObj) {
trace((("event fired eventObj.type=" + eventObj.type) + "eventObj.ModuleID=") + eventObj.ModuleID);
};
cfg.onClose = function (eventObj) {
mcWF._visible = false;
};
mcWF.loadMovie("http://cdn.gigya.com/WildFire/swf/wildfire.swf", "get");
Instance of Symbol 25 MovieClip "doofClick" in Symbol 36 MovieClip [endScreen] Frame 1
on (release) {
getURL ("http://www.doof.com/?ref=doofball", "_blank");
}
Instance of Symbol 33 MovieClip "playAgain" in Symbol 36 MovieClip [endScreen] Frame 1
on (release) {
this._visible = false;
_root.gotoAndStop("splashScreen");
_parent.removeMovieClip(this);
}
Instance of Symbol 35 MovieClip "shareBTN" in Symbol 36 MovieClip [endScreen] Frame 1
on (release) {
this.attachMovie("GIGYA", "GIGYA", this.getNextHighestDepth());
}
Symbol 57 MovieClip Frame 1
stop();
Symbol 58 MovieClip [Ball] Frame 1
#initclip 19
Object.registerClass("Ball", com.Ball);
#endinitclip
Symbol 63 MovieClip [GameConnectorAS2] Frame 1
#initclip 18
Object.registerClass("GameConnectorAS2", com.tmgc.gameconnector.GameConnectorAS2);
#endinitclip
Symbol 87 MovieClip Frame 105
_parent.showMochiAd();
Symbol 87 MovieClip Frame 201
stop();
Symbol 383 MovieClip [__Packages.com.doof.DoofBot] Frame 0
class com.doof.DoofBot
{
function DoofBot () {
trace("DoofBot does not require instantiation! Please use DoofBot's static methods.");
}
static function init(hostURL, gameID) {
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
System.security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
var _local1 = new LoadVars();
_local1.gameID = gameID;
_local1.hostURL = hostURL;
_local1.rnd = Math.floor(Math.random() * 1000);
_local1.onLoad = function (success) {
if (success) {
trace("DoofBot successfully posted");
} else {
trace("DoofBot encountered a problem");
}
};
_local1.sendAndLoad(doofBotInitURL, _local1, "POST");
}
static function start(hostURL, gameID) {
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
System.security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
var _local1 = new LoadVars();
_local1.gameID = gameID;
_local1.hostURL = hostURL;
_local1.rnd = Math.floor(Math.random() * 1000);
_local1.onLoad = function (success) {
if (success) {
trace("DoofBot successfully posted");
} else {
trace("DoofBot encountered a problem");
}
};
_local1.sendAndLoad(doofBotStartURL, _local1, "POST");
}
static function end(hostURL, gameID) {
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
System.security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
var _local1 = new LoadVars();
_local1.gameID = gameID;
_local1.hostURL = hostURL;
_local1.rnd = Math.floor(Math.random() * 1000);
_local1.onLoad = function (success) {
if (success) {
trace("DoofBot successfully posted");
} else {
trace("DoofBot encountered a problem");
}
};
_local1.sendAndLoad(doofBotEndURL, _local1, "POST");
}
static var doofBotInitURL = "http://www.doof.com/spoof/doofbot/ping/init/";
static var doofBotStartURL = "http://www.doof.com/spoof/doofbot/ping/start/";
static var doofBotEndURL = "http://www.doof.com/spoof/doofbot/ping/end/";
}
Symbol 384 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.5");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 385 MovieClip [__Packages.com.Ball] Frame 0
class com.Ball extends MovieClip
{
var TOP, BOTTOM, LEFT, RIGHT, BOUNCE, _visible, isRestart, streaks, _x, startX, _y, startY, _rotation;
function Ball () {
super();
trace("// Ball Created");
TOP = 20;
BOTTOM = 475;
LEFT = 23;
RIGHT = 320;
BOUNCE = -1;
init();
}
function init() {
centerBall();
_visible = true;
isRestart = true;
var mc = this;
mc.ball.stop();
var _local2 = new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Bounce.easeOut, 500, 100, 1.5, true);
var _local3 = new mx.transitions.Tween(mc, "_yscale", mx.transitions.easing.Bounce.easeOut, 500, 100, 1.5, true);
_local2.onMotionFinished = function () {
mc.vx = com.Util.rand(mc.VMAX / 4) + (mc.VMAX / 4);
if (Math.random() > 0.5) {
mc.vy = -mc.VMAX;
mc.vx = mc.vx * -1;
} else {
mc.vy = mc.VMAX;
}
mc.streaks._visible = true;
mc.ball.play();
this.displayBall();
mc.isRestart = false;
};
}
function centerBall() {
streaks._visible = false;
_visible = false;
_x = startX;
_y = startY;
vx = 0;
vy = 0;
}
function isRestarting() {
return(isRestart);
}
function kickBall(angle, VMAX) {
if (!isRestart) {
vx = Math.cos(angle) * VMAX;
vy = Math.sin(angle) * VMAX;
_x = _x + vx;
_y = _y + vy;
displayBall();
}
}
function displayBall() {
Sound1.start(0, 1);
var _local2 = Math.atan2(vy, vx);
_rotation = _local2 * RADTODEG;
streaks.play();
return(_local2);
}
function onEnterFrame() {
if (!isRestart) {
_x = _x + vx;
_y = _y + vy;
}
if (_x > RIGHT) {
_x = RIGHT;
vx = vx * BOUNCE;
displayBall();
} else if (_x < LEFT) {
_x = LEFT;
vx = vx * BOUNCE;
displayBall();
}
if (_y > BOTTOM) {
_y = BOTTOM;
vy = vy * BOUNCE;
displayBall();
} else if (_y < TOP) {
_y = TOP;
vy = vy * BOUNCE;
displayBall();
}
}
function reflect() {
vx = vx * BOUNCE;
displayBall();
}
static var RADTODEG = 57.2957795130823;
var vx = 0;
var vy = 0;
}
Symbol 386 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 387 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 388 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 389 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 390 MovieClip [__Packages.com.Util] Frame 0
class com.Util
{
function Util () {
}
static function rand(num) {
if (arguments.length == 1) {
return(Math.floor(Math.random() * num) + 1);
}
return(Math.floor(Math.random() * (Math.abs(arguments[1] - num) + 1)) + Math.min(num, arguments[1]));
}
static function getPos(clip) {
var _local1 = {x:0, y:0};
clip.localToGlobal(_local1);
return(_local1);
}
static function padScore(i, len) {
var _local2 = "000000000000000000000";
var _local1 = i.toString();
if (_local1.length < len) {
_local1 = _local2.substring(0, len - _local1.length) + _local1;
}
return(_local1);
}
}
Symbol 391 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 392 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 393 MovieClip [__Packages.com.Player] Frame 0
class com.Player
{
var _round, _score, _goals, _possessions, _difference, _cleanSheet, _totalScore, _numOfGames, _id, _layout;
function Player () {
init();
}
function init() {
_round = 0;
_score = 0;
_goals = 0;
_possessions = 0;
_difference = 0;
_cleanSheet = false;
_totalScore = 0;
_numOfGames = 0;
}
function getCleanSheetStatus() {
if (_goals == 0) {
return(true);
}
return(false);
}
function getDifference() {
return(_difference);
}
function setDifference(difference) {
_difference = _difference + Math.max(0, difference);
}
function setScoreArray() {
_gameScores[_numOfGames] = _totalScore;
}
function getScoreArray() {
return(_gameScores);
}
function getGoals() {
return(_goals);
}
function setGoals(goals) {
_goals = _goals + getScore();
}
function setPossessions() {
_possessions++;
}
function getPossessions() {
return(_possessions);
}
function getScore() {
return(_score);
}
function setScore(score) {
_score = score;
}
function getId() {
return(_id);
}
function setId(id) {
_id = id;
}
function setLayout(layout) {
_layout = layout;
}
function getLayout() {
return(_layout);
}
function getRound() {
return(_round);
}
function setRound() {
_round++;
resetPossessions();
_numOfGames++;
}
function resetRound() {
_round = 0;
}
function resetPossessions() {
_possessions = 0;
}
function setTotalScore(totalScore) {
_totalScore = totalScore;
}
function getTotalScore() {
return(_totalScore);
}
var _gameScores = new Array();
}
Symbol 394 MovieClip [__Packages.com.Team] Frame 0
class com.Team
{
var _results, _round, _id, _score, _name, _difference;
function Team (id, name) {
_results = [];
_round = 0;
_id = id;
_score = 0;
_name = name;
}
function setScore(score) {
_score = score;
}
function getScore() {
return(_score);
}
function setDiff(diff) {
_difference = diff;
}
function getDiff() {
return(_difference);
}
function getId() {
return(_id);
}
function getName() {
return(_name);
}
function getRound() {
return(_round);
}
function getResults(n) {
return(_results[n]);
}
}
Symbol 395 MovieClip [__Packages.com.Teams] Frame 0
class com.Teams
{
var teamsArray, teamNames, resultsArray, teamsPerRound;
function Teams () {
teamsArray = [];
teamNames = ["Gooners", "Villa ", "Rovers ", "Wanderers", "Brum", "Blues", "Toffees", "Cottagers", "Reds", "City Blues", "Red Devils", "Boro", "The Toon", "Pompey", "Royals", "Black Cats", "Spurs ", "Rams ", "Hammers ", "The Lactics"];
trace("// Teams constructed");
var _local2 = 0;
while (_local2 < teamNames.length) {
var _local3 = new com.Team(_local2, teamNames[_local2]);
teamsArray.push(_local3);
_local2++;
}
resultsArray = [[], [], [], [], []];
resultsArray[0] = teamsArray.slice();
teamsPerRound = [8, 4, 2];
}
function order(a, b) {
var _local2 = a.getScore();
var _local1 = b.getScore();
var _local3 = a.getDiff();
var _local4 = b.getDiff();
if (_local3 < _local4) {
return(1);
}
if (_local3 > _local4) {
return(-1);
}
if (_local2 < _local1) {
return(1);
}
if (_local2 > _local1) {
return(-1);
}
return(0);
}
function getTeamsInRound(round) {
return(teamsPerRound[round]);
}
function setTeams(round, Arr) {
resultsArray[round] = Arr;
}
function shuffleTeams(round) {
resultsArray[round] = shuffle(resultsArray[round]);
return(resultsArray[round]);
}
function getTeams(round) {
return(resultsArray[round]);
}
function getTeamId(name) {
var _local2 = 0;
while (_local2 < teamsArray.length) {
if (name == teamsArray[_local2].getName()) {
return(_local2);
}
_local2++;
}
}
function getTeam(id) {
return(teamsArray[id]);
}
function getNumTeams() {
return(teamsArray.length);
}
function shuffle(tempArray) {
var _local2 = 0;
while (_local2 < tempArray.length) {
var _local4 = tempArray[_local2];
var _local3 = random(tempArray.length);
tempArray[_local2] = tempArray[_local3];
tempArray[_local3] = _local4;
_local2++;
}
return(tempArray);
}
}
Symbol 396 MovieClip [__Packages.com.Fx] Frame 0
class com.Fx
{
function Fx () {
}
static function zoomIn(mc, delay, duration, startX, startY, finishX, finishY, blur, callBack) {
function _animate() {
mc.filters = [blur];
clearInterval(_interval);
var _local1 = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Regular.easeOut, startX, finishX, duration, true);
var _local2 = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Regular.easeOut, startY, finishY, duration, true);
_local1.onMotionFinished = function () {
mc.filters = [1];
callBack();
};
}
var _local7 = getTimer();
var _interval;
var _local1 = Math.atan2(finishY - startY, finishX - startX);
var _local3 = Math.abs(Math.floor(Math.cos(_local1) * blur));
var _local2 = Math.abs(Math.floor(Math.sin(_local1) * blur));
var _local6 = 1000 * delay;
mc._x = startX;
mc._y = startY;
var blur = (new flash.filters.BlurFilter(_local3, _local2, 1));
_interval = setInterval(_animate, delay);
}
}
Symbol 397 MovieClip [__Packages.com.Timer] Frame 0
class com.Timer
{
function Timer (ms) {
if (ms != undefined) {
isCountdown = true;
countdownTime = ms;
}
reset();
}
function two(x) {
return(((x > 9) ? "" : "0") + x);
}
function three(x) {
return((((x > 99) ? "" : "0") + ((x > 9) ? "" : "0")) + x);
}
function displayMili() {
var _local2 = getMili();
_local2 = _local2 % 1000;
return(_local2);
}
function displaySec() {
var _local3 = getMili();
var _local2 = Math.floor(_local3 / 1000);
_local2 = _local2 % 60;
return(_local2);
}
function displayMin() {
var _local3 = getMili();
var _local4 = Math.floor(_local3 / 1000);
var _local2 = Math.floor(_local4 / 60);
_local2 = _local2 % 60;
return(_local2);
}
function displayHour() {
var _local2 = getMili();
var _local3 = Math.floor(_local2 / 1000);
var _local5 = Math.floor(_local3 / 60);
var _local4 = Math.floor(_local5 / 60);
return(_local4);
}
function displayTime() {
var _local2 = three(displayMili());
_local2 = _local2.substring(0, 2);
var _local3 = (((displayMin() + ":") + two(displaySec())) + ":") + _local2;
return(_local3);
}
function reset() {
oldTime = 0;
pause = true;
totalTime = 0;
}
function stop() {
if (!pause) {
pause = true;
totalTime = totalTime + (getTimer() - oldTime);
}
}
function start() {
if (pause) {
pause = false;
oldTime = getTimer();
}
}
function getMili() {
var _local2 = totalTime;
if (!pause) {
_local2 = _local2 + (getTimer() - oldTime);
}
return(getTime(_local2));
}
function getSecs() {
var _local2 = totalTime / 1000;
if (!pause) {
_local2 = _local2 + ((getTimer() - oldTime) / 1000);
}
return(Math.round(getTime(_local2)));
}
function getMins() {
var _local2 = totalTime / 1000;
if (!pause) {
_local2 = _local2 + (((getTimer() - oldTime) / 1000) / 60);
}
return(Math.round(getTime(_local2)));
}
function addMili(ms) {
totalTime = Math.max(0, totalTime + ms);
}
function getTime(time) {
if (isCountdown) {
return(countdownTime - time);
}
return(time);
}
var oldTime = 0;
var pause = false;
var totalTime = 0;
var isCountdown = false;
var countdownTime = 0;
}
Symbol 398 MovieClip [__Packages.com.meychi.ascrypt.RC4] Frame 0
class com.meychi.ascrypt.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 62 MovieClip [__Packages.com.tmgc.gameconnector.GameConnectorAS2] Frame 0
class com.tmgc.gameconnector.GameConnectorAS2 extends MovieClip
{
var _url, _localConnection;
function GameConnectorAS2 () {
super();
var _local7 = unescape(_url);
var _local9 = _local7.lastIndexOf("?");
var _local8 = _local7.substr(_local9 + 1, _local7.length);
var _local6 = _local8.split("&");
var _local3 = 0;
while (_local3 < _local6.length) {
var _local5 = _local6[_local3].split("=")[0];
var _local4 = _local6[_local3].split("=")[1];
if (_local5 == "doofConnectionName") {
_doofConnectionName = _local4;
}
if (_local5 == "gameConnectionName") {
_gameConnectionName = _local4;
}
_local3++;
}
_localConnection = new LocalConnection();
try {
_localConnection.connect(gameConnectionName);
} catch(error:Error) {
trace(error);
}
}
function get doofConnectionName() {
return(_doofConnectionName);
}
function get gameConnectionName() {
return(_gameConnectionName);
}
function gameStarted(initialScore) {
trace("GameConnectorAS2.gameStarted() initialScore=" + String(initialScore));
_localConnection.send(doofConnectionName, "gameStarted", initialScore);
}
function gameEnded(finalScore) {
trace("GameConnectorAS2.gameEnded() finalScore=" + String(finalScore));
_localConnection.send(doofConnectionName, "gameEnded", finalScore);
}
function gameScore(score) {
trace("GameConnectorAS2.gameScore() score=" + String(score));
_localConnection.send(doofConnectionName, "gameScore", score);
}
function gameStat(statName, statValue) {
trace((("GameConnectorAS2.gameStat() statName=" + statName) + ", statValue=") + statValue);
_localConnection.send(doofConnectionName, "gameStat", statName, statValue);
}
function gameStatList(stats) {
trace("GameConnectorAS2.gameStatList() stats=" + stats);
_localConnection.send(doofConnectionName, "gameStatList", stats);
}
function stopGame() {
trace("GameConnectorAS2.stopGame()");
}
var _doofConnectionName = "doof";
var _gameConnectionName = "game";
}
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 2
stop();
Symbol 125 MovieClip Frame 3
stop();
Symbol 125 MovieClip Frame 4
stop();
Symbol 125 MovieClip Frame 5
stop();
Symbol 125 MovieClip Frame 6
stop();
Symbol 125 MovieClip Frame 7
stop();
Symbol 125 MovieClip Frame 8
stop();
Symbol 125 MovieClip Frame 9
stop();
Symbol 125 MovieClip Frame 10
stop();
Symbol 125 MovieClip Frame 11
stop();
Symbol 125 MovieClip Frame 12
stop();
Symbol 125 MovieClip Frame 13
stop();
Symbol 125 MovieClip Frame 14
stop();
Symbol 125 MovieClip Frame 15
stop();
Symbol 125 MovieClip Frame 16
stop();
Symbol 125 MovieClip Frame 17
stop();
Symbol 125 MovieClip Frame 18
stop();
Symbol 125 MovieClip Frame 19
stop();
Symbol 125 MovieClip Frame 20
stop();
Symbol 141 MovieClip Frame 1
function zoomOut(callBack) {
com.Fx.zoomIn(btnPlay, 0, 0.25, btnPlay._x, btnPlay._y, 3000, btnPlay._y, 20, callBack);
com.Fx.zoomIn(btnHelp, 50, 0.5, btnHelp._x, btnHelp._y, 3000, btnHelp._y, 20);
com.Fx.zoomIn(btnScores, 100, 0.5, btnScores._x, btnScores._y, 3000, btnScores._y, 20);
com.Fx.zoomIn(btnMore, 150, 0.5, btnMore._x, btnMore._y, 3000, btnMore._y, 20);
}
stop();
com.Fx.zoomIn(btnPlay, 0, 0.75, -3000, btnPlay._y, btnPlay._x, btnPlay._y, 20);
com.Fx.zoomIn(btnHelp, 100, 0.75, -3000, btnHelp._y, btnHelp._x, btnHelp._y, 20);
com.Fx.zoomIn(btnScores, 200, 0.75, -3000, btnScores._y, btnScores._x, btnScores._y, 20);
com.Fx.zoomIn(btnMore, 300, 0.75, -3000, btnMore._y, btnMore._x, btnMore._y, 20);
btnPlay.onRelease = function () {
zoomOut(function () {
gotoAndPlay ("select");
});
};
btnHelp.onRelease = function () {
zoomOut(function () {
gotoAndPlay ("help");
});
};
btnScores.onRelease = function () {
getURL ("http://www.markfennell.com/flash/premiere/showscores.php", "_top");
};
btnMore.onRelease = function () {
getURL ("http://www.markfennell.com/flash/", "_top");
};
Symbol 141 MovieClip Frame 2
function wipeOut(callBack) {
var _local1 = 0;
while (_local1 < buttonArray.length) {
var _local2 = buttonArray[_local1];
com.Fx.zoomIn(_local2, _local1 * 35, 0.5, _local2._x, _local2._y, 3000, _local2._y, 10);
_local1++;
}
com.Fx.zoomIn(txtSelect, 1, 0.75, txtSelect._x, txtSelect._y, 3000, txtSelect._y, 10, callBack);
}
com.Fx.zoomIn(txtSelect, 0, 0.5, -3000, txtSelect._y, txtSelect._x, txtSelect._y, 10);
var delay = 50;
var startDelay = 100;
var offsetX = 90;
var offsetY = 180;
var gapX = 70;
var gapY = 70;
var perRow = 5;
var buttonArray = [];
var col = 0;
var row = 0;
var filter = (new flash.filters.GlowFilter(16761856, 1, 4, 4, 4, 3, false, false));
trace("length" + _global.teams[0]);
var i = 0;
while (i < _global.teams.getNumTeams()) {
if ((i % perRow) == 0) {
offsetY = offsetY + gapY;
row = 0;
}
var logo = this.attachMovie("teamLogo", "logo" + i, i);
logo.id = i;
logo.logos.gotoAndStop(i + 1);
logo.nameText.text = _global.teams.getTeam(i).getName().toUpperCase();
logo.onRollOver = function () {
this.filters = [filter];
};
logo.onRollOut = function () {
this.filters = [];
};
logo.onRelease = function () {
_global.Me.setId(this.id);
trace("ID " + _global.Me.getId());
wipeOut(function () {
_parent.gotoAndPlay("layout");
});
};
com.Fx.zoomIn(logo, startDelay + (i * delay), 0.75, -3000, offsetY, offsetX + (gapX * row), offsetY, 10);
buttonArray.push(logo);
row++;
i++;
}
stop();
Symbol 141 MovieClip Frame 3
stop();
com.Fx.zoomIn(txtHow, 0, 0.75, -3000, txtHow._y, txtHow._x, txtHow._y, 10);
com.Fx.zoomIn(helpText, 100, 0.75, -3000, helpText._y, helpText._x, helpText._y, 10);
com.Fx.zoomIn(btnBack, 200, 0.75, -3000, btnBack._y, btnBack._x, btnBack._y, 10);
btnBack.onRelease = function () {
com.Fx.zoomIn(txtHow, 0, 0.75, txtHow._x, txtHow._y, 3000, txtHow._y, 10, function () {
gotoAndPlay ("menu");
});
com.Fx.zoomIn(helpText, 100, 0.75, helpText._x, helpText._y, 3000, helpText._y, 10);
com.Fx.zoomIn(btnBack, 200, 0.75, btnBack._x, btnBack._y, 3000, btnBack._y, 10);
};
Symbol 149 MovieClip Frame 1
stop();
_root.soundButton.onRelease = function () {
gotoAndStop ("soundOff");
stopAllSounds();
_root.soundsOn = false;
trace("Sounds On = " + _root.soundsOn);
};
Symbol 149 MovieClip Frame 11
stop();
_root.soundButton.onRelease = function () {
_root.soundsOn = true;
gotoAndStop ("soundOn");
trace("Sounds On = " + _root.soundsOn);
};
Symbol 158 MovieClip Frame 1
function zoomOut(callBack) {
com.Fx.zoomIn(txt, 0, 0.5, txt._x, txt._y, 3000, txt._y, 10, callBack);
com.Fx.zoomIn(btn342, 0, 0.5, btn342._x, btn342._y, 3000, btn342._y, 20);
com.Fx.zoomIn(btn432, 50, 0.5, btn432._x, btn432._y, 3000, btn432._y, 20);
}
stop();
com.Fx.zoomIn(txt, 0, 0.75, -3000, txt._y, txt._x, txt._y, 10);
com.Fx.zoomIn(btn342, 100, 0.75, -3000, btn342._y, btn342._x, btn342._y, 20);
com.Fx.zoomIn(btn432, 200, 0.75, -3000, btn432._y, btn432._x, btn432._y, 20);
btn342.onRelease = function () {
_global.Me.setLayout(0);
zoomOut(function () {
_parent.gotoAndPlay("stage");
});
};
btn432.onRelease = function () {
_global.Me.setLayout(1);
zoomOut(function () {
_parent.gotoAndPlay("stage");
});
};
Symbol 172 MovieClip Frame 1
isMe.onEnterFrame = function () {
this._rotation = this._rotation + 5;
};
stop();
Symbol 175 MovieClip Frame 1
function zoomOut(callBack) {
com.Fx.zoomIn(txt, 0, 1, txt._x, txt._y, 3000, txt._y, 10, callBack);
com.Fx.zoomIn(btnPlay, 0, 0.5, btnPlay._x, btnPlay._y, 3000, btnPlay._y, 20);
var _local1 = 0;
while (_local1 < game_display.length) {
var _local2 = game_display[_local1];
com.Fx.zoomIn(_local2, _local1 * delay, 0.5, _local2._x, _local2._y, 3000, _local2._y, 20);
_local1++;
}
}
var tempArray = _global.teams.shuffleTeams(_global.Me.getRound());
var gameDepth = 0;
var offsetX = 120;
var offsetY = 220;
var startDelay = 1000;
var delay = 50;
var gap = 10;
var game_display = [];
var i = 0;
while (i < tempArray.length) {
gameDepth++;
var game_mc = this.attachMovie("roundTeam", "roundTeam" + gameDepth, gameDepth);
game_mc._x = offsetX;
game_mc._y = offsetY + (i * gap);
game_mc.left.nameText.text = tempArray[i].getName().toUpperCase();
game_mc.right.nameText.text = tempArray[i + 1].getName().toUpperCase();
game_mc.left.scoreText.text = "";
game_mc.right.scoreText.text = "";
if (_global.teams.getTeam(_global.Me.getId()).getName() == tempArray[i].getName()) {
game_mc.left.isMe._visible = true;
game_mc.right.isMe._visible = false;
var opponentTeam = tempArray[i + 1].getName();
_global.Opponent.setId(_global.teams.getTeamId(opponentTeam));
trace("left" + opponentTeam);
} else if (_global.teams.getTeam(_global.Me.getId()).getName() == tempArray[i + 1].getName()) {
game_mc.left.isMe._visible = false;
game_mc.right.isMe._visible = true;
var opponentTeam = tempArray[i].getName();
_global.Opponent.setId(_global.teams.getTeamId(opponentTeam));
trace("right" + opponentTeam);
} else {
game_mc.left.isMe._visible = false;
game_mc.right.isMe._visible = false;
}
com.Fx.zoomIn(game_mc, startDelay + (i * delay), 0.5, -3000, game_mc._y, game_mc._x, game_mc._y, 20);
game_display.push(game_mc);
i = i + 2;
}
txt.round.text = _global.Me.getRound() + 1;
com.Fx.zoomIn(txt, 0, 0.5, -3000, txt._y, txt._x, txt._y, 10);
com.Fx.zoomIn(btnPlay, 100, 0.5, -3000, btnPlay._y, btnPlay._x, btnPlay._y, 20);
btnPlay.onRelease = function () {
zoomOut(function () {
_parent.gotoAndPlay("start");
});
};
stop();
Symbol 206 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 2
stop();
Symbol 218 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 2
stop();
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 34
_parent.restart();
Symbol 221 MovieClip Frame 35
stop();
Symbol 221 MovieClip Frame 68
_parent.restart();
Symbol 226 MovieClip Frame 1
stop();
Symbol 226 MovieClip Frame 51
stop();
_parent.gotoAndPlay("results");
Symbol 226 MovieClip Frame 101
stop();
_parent.gotoAndPlay("results");
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 49
stop();
_parent.gotoAndPlay("results");
Symbol 230 MovieClip Frame 97
stop();
_parent.gotoAndPlay("results");
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 47
stop();
Symbol 235 MovieClip Frame 93
stop();
Symbol 257 MovieClip Frame 1
if (_root.soundsOn) {
play();
} else {
stop();
}
Symbol 278 MovieClip Frame 1
btnRestart.onRelease = function () {
trace(_parent._parent);
_parent._parent.gotoAndPlay("instructions");
};
btnSubmit.onRelease = function () {
_parent._parent.gotoAndPlay("submit");
};
Symbol 278 MovieClip Frame 12
stop();
trace("SCORE: " + _global.endScore);
trace("SEND API SCORE HERE");
var localConnection = new LocalConnection();
var hostURL = localConnection.domain();
com.doof.DoofBot.end(hostURL, "DoofBall");
trace("------------------");
trace("Calling connector.gameEnded: " + _global.endScore);
_root.connector.gameStat("possession", _global.possession);
_root.connector.gameEnded(_global.endScore);
var endScreenRef = _root.attachMovie("endScreen", "endScreen", _root.getNextHighestDepth());
endScreenRef.playAgain.score.text = _global.endScore;
Symbol 313 MovieClip Frame 558
this.gotoAndPlay(209);
trace("GOTO 209");
Symbol 314 MovieClip Frame 1
function showResults() {
var _local6 = 0;
while (_local6 < tempArray.length) {
var _local7 = com.Util.rand(4);
var _local4 = com.Util.rand(scoreMax + _local7) + _local7;
var _local5 = com.Util.rand(scoreMax + _local7) + _local7;
if (_global.teams.getTeam(_global.Me.getId()).getName() == tempArray[_local6].getName()) {
_local4 = _global.Me.getScore();
_local5 = _global.Opponent.getScore();
if (_local4 > _local5) {
tempArray[_local6].setDiff(100);
tempArray[_local6 + 1].setDiff(0);
} else {
tempArray[_local6].setDiff(_local4 - _local5);
tempArray[_local6 + 1].setDiff(_local5 - _local4);
}
_global.Me.setDifference(_local4 - _local5);
} else if (_global.teams.getTeam(_global.Me.getId()).getName() == tempArray[_local6 + 1].getName()) {
_local4 = _global.Opponent.getScore();
_local5 = _global.Me.getScore();
if (_local4 < _local5) {
tempArray[_local6].setDiff(0);
tempArray[_local6 + 1].setDiff(100);
} else {
tempArray[_local6].setDiff(_local4 - _local5);
tempArray[_local6 + 1].setDiff(_local5 - _local4);
}
_global.Me.setDifference(_local5 - _local4);
} else {
if (_local4 == _local5) {
_local4++;
}
tempArray[_local6].setDiff(_local4 - _local5);
tempArray[_local6 + 1].setDiff(_local5 - _local4);
}
tempArray[_local6].setScore(_local4);
tempArray[_local6 + 1].setScore(_local5);
if (_local4 > _local5) {
nextRoundArray.push(tempArray[_local6]);
} else {
nextRoundArray.push(tempArray[_local6 + 1]);
}
scoresArray.push(tempArray[_local6]);
scoresArray.push(tempArray[_local6 + 1]);
_local6 = _local6 + 2;
}
nextRoundArray.sort(_global.teams.order);
nextRoundArray = nextRoundArray.slice(0, _global.teams.getTeamsInRound(_global.Me.getRound()));
_local6 = 0;
while (_local6 < nextRoundArray.length) {
trace((((nextRoundArray[_local6].getName() + " : ") + nextRoundArray[_local6].getDiff()) + " score: ") + nextRoundArray[_local6].getScore());
_local6++;
}
_local6 = 0;
while (_local6 < scoresArray.length) {
trace(scoresArray[_local6].getName().toUpperCase());
gameDepth++;
var _local3 = this.attachMovie("roundTeam", "roundTeam" + gameDepth, gameDepth);
_local3._x = offsetX;
_local3._y = offsetY + (_local6 * gap);
_local3.left.nameText.text = scoresArray[_local6].getName().toUpperCase();
_local3.right.nameText.text = scoresArray[_local6 + 1].getName().toUpperCase();
_local3.left.scoreText.text = scoresArray[_local6].getScore();
_local3.right.scoreText.text = scoresArray[_local6 + 1].getScore();
if (_global.teams.getTeam(_global.Me.getId()).getName() == tempArray[_local6].getName()) {
_local3.left.isMe._visible = true;
_local3.right.isMe._visible = false;
} else if (_global.teams.getTeam(_global.Me.getId()).getName() == tempArray[_local6 + 1].getName()) {
_local3.left.isMe._visible = false;
_local3.right.isMe._visible = true;
} else {
_local3.left.isMe._visible = false;
_local3.right.isMe._visible = false;
}
com.Fx.zoomIn(_local3, startDelay + (_local6 * delay), 0.5, -3000, _local3._y, _local3._x, _local3._y, 20);
game_display.push(_local3);
_local6 = _local6 + 2;
}
}
function zoomOut(callBack) {
com.Fx.zoomIn(txt, 0, 1, txt._x, txt._y, 3000, txt._y, 10, callBack);
com.Fx.zoomIn(btnPlay, 0, 0.5, btnPlay._x, btnPlay._y, 3000, btnPlay._y, 20);
var _local1 = 0;
while (_local1 < game_display.length) {
var _local2 = game_display[_local1];
com.Fx.zoomIn(_local2, _local1 * delay, 0.5, _local2._x, _local2._y, 3000, _local2._y, 20);
_local1++;
}
}
function setScores() {
setEndScore();
_global.Me.setScoreArray();
var _local4 = _global.Me.getGoals();
doofball_gameOver.textGoals.text = _local4;
totalScore = _local4 * 100;
var _local3 = _global.Me.getDifference() * 150;
_global.endScore = 0;
if (_global.Me.getRound() == 3) {
_local3 = _local3 + 2000;
doofball_gameOver.textBonus.text = _local3;
totalScore = totalScore + _local3;
} else {
totalScore = totalScore + _local3;
totalPScore = totalPScore + _local3;
doofball_gameOver.textBonus.text = _local3;
}
myArray = new Array();
myArray = _global.Me.getScoreArray();
trace("myArray:" + myArray);
i = 0;
while (i < myArray.length) {
_global.endScore = _global.endScore + Number(myArray[i]);
trace("END SCORE:" + _global.endScore);
doofball_gameOver["gameScore_" + (i + 1)].gamescore_txt.text = ((("Round " + String(i + 1)) + ": ") + myArray[i]) + newline;
i++;
}
doofball_gameOver.endScore_txt.text = _global.endScore;
trace(_global.Me.getScoreArray());
doofball_gameOver.textTotal.text = totalScore;
_root.x1025 = totalScore;
}
function setEndScore() {
newResults.scrollingText.nameTextLeft1.text = _global.teams.getTeam(_global.Me.getId()).getName();
newResults.scrollingText.nameTextRight1.text = _global.teams.getTeam(_global.Opponent.getId()).getName();
newResults.scrollingText.nameTextLeft2.text = _global.teams.getTeam(_global.Me.getId()).getName();
newResults.scrollingText.nameTextRight2.text = _global.teams.getTeam(_global.Opponent.getId()).getName();
newResults.scrollingText.scoreTextLeft1.text = _global.Me.getScore();
newResults.scrollingText.scoreTextRight1.text = _global.Opponent.getScore();
newResults.scrollingText.scoreTextLeft2.text = _global.Me.getScore();
newResults.scrollingText.scoreTextRight2.text = _global.Opponent.getScore();
trace("TEAM NAME:" + _global.teams.getTeam(_global.Me.getId()).getName());
trace("OPPONENT SCORE:" + _global.Opponent.getScore());
var _local2 = _global.Me.getTotalScore();
newResults.scrollingText.cleanSheet_txt.text = "NO";
if (_global.Opponent.getScore() == 0) {
_local2 = _local2 + 100;
newResults.scrollingText.cleanSheet_txt.text = "YES";
}
totalPossessions = _global.Me.getPossessions() + _global.Opponent.getPossessions();
playPossessionsPercentage = (_global.Me.getPossessions() / totalPossessions) * 100;
newResults.scrollingText.possessions_txt.text = _global.Me.getPossessions();
newResults.scrollingText.possessionsPercentage_txt.text = Math.round(playPossessionsPercentage);
newResults.scrollingText.total_possessions_txt.text = totalPossessions;
_local2 = _local2 + Math.round(playPossessionsPercentage * 3);
_global.Me.setTotalScore(_local2);
newResults.scrollingText.playerTotalScore_txt.text = _global.Me.getTotalScore();
_global.Me.setScoreArray();
}
var totalScore = 0;
var iWon = (_global.Me.getScore() > _global.Opponent.getScore());
var gameDepth = 0;
var offsetX = 110;
var offsetY = 220;
var startDelay = 1000;
var delay = 50;
var gap = 10;
var game_display = [];
var scoreMax = Math.abs((_global.Me.getScore() - _global.Opponent.getScore()) - 1);
var scoresArray = [];
var nextRoundArray = [];
var tempArray = _global.teams.getTeams(_global.Me.getRound());
_global.endScore;
doofball_gameOver._visible = false;
if (!iWon) {
trace("i LOST");
_global.Me.setGoals();
setScores();
doofball_gameOver._visible = true;
txt._visible = false;
btnPlay._visible = false;
doofball_gameOver.titleText.text = "GAME OVER!";
com.Fx.zoomIn(doofball_gameOver, 0, 1, 3000, doofball_gameOver._y, doofball_gameOver._x, doofball_gameOver._y, 10, callBack);
} else {
trace("i WON");
setEndScore();
if (_global.Me.getRound() < 3) {
trace("Less than 3 rounds");
txt._visible = true;
btnPlay._visible = true;
_global.Me.setGoals();
txt.round.text = _global.Me.getRound() + 1;
com.Fx.zoomIn(txt, 0, 0.5, -3000, txt._y, txt._x, txt._y, 10);
com.Fx.zoomIn(btnPlay, 100, 0.5, -3000, btnPlay._y, btnPlay._x, btnPlay._y, 20);
trace(_global.Me.getRound());
showResults();
doofball_gameOver.stop();
} else {
trace("more than 3 rounds");
setScores();
doofball_gameOver._visible = true;
txt._visible = false;
btnPlay._visible = false;
doofball_gameOver.titleText.text = "WELL DONE!";
trace("doofball_gameOver zoomIn");
com.Fx.zoomIn(doofball_gameOver, 0, 0.5, 3000, doofball_gameOver._y, doofball_gameOver._x, doofball_gameOver._y, 10, callBack);
}
}
btnPlay.onRelease = function () {
_global.Me.setRound();
_global.Opponent.resetPossessions();
_global.teams.setTeams(_global.Me.getRound(), nextRoundArray);
zoomOut(function () {
_parent.gotoAndPlay("layout");
});
};
stop();
Symbol 317 MovieClip Frame 8
stop();
Symbol 318 MovieClip Frame 26
stop();
Symbol 345 MovieClip [GWBaseClass] Frame 1
#initclip 20
_global.GWBaseClass = function () {
this.init();
};
GWBaseClass.prototype = new MovieClip();
GWBaseClass.prototype.init = function (c) {
this.classHolder._visible = 0;
if (this._targetInstanceName.length) {
var _local2 = this._parent[this._targetInstanceName];
for (var _local3 in this) {
_local2[_local3] = this[_local3];
}
this.inherit(c, _local2);
_local2.init();
this.snapToPixels(_local2);
} else {
this.snapToPixels(this);
}
};
GWBaseClass.prototype.inherit = function (c, o) {
if (o == undefined) {
o = this;
}
for (var _local4 in c.prototype) {
o[_local4] = c.prototype[_local4];
}
};
GWBaseClass.prototype.snapToPixels = function (t) {
t.classHolder._visible = 0;
while (t._parent) {
t._x = Math.round(t._x);
t._y = Math.round(t._y);
t = t._parent;
}
};
GWBaseClass.prototype.drawBox = function (n, d, x, y, w, h, c, a, o) {
if (a == undefined) {
a = 100;
}
if (o == undefined) {
o = this;
}
o.createEmptyMovieClip(n, d);
o[n].beginFill(c, a);
o[n].moveTo(x, y);
o[n].lineTo(x + w, y);
o[n].lineTo(x + w, y + h);
o[n].lineTo(x, y + h);
o[n].lineTo(x, y);
o[n].endFill();
};
GWBaseClass.prototype.sizeMe = function (w, h, o) {
w = Math.round(w);
h = Math.round(h);
if (o.setSize) {
o.setSize(w, h);
} else if (o.TL) {
o._xscale = (o._yscale = 100);
o.T._width = (w - o.TL._width) - o.TR._width;
o.B._width = (w - o.BL._width) - o.BR._width;
o.L._height = (h - o.TL._height) - o.BL._height;
o.R._height = (h - o.TR._height) - o.BR._height;
o.BL._y = h - o.BL._height;
o.BR._y = h - o.BR._height;
o.B._y = h - o.B._height;
o.TR._x = w - o.TR._width;
o.BR._x = w - o.BR._width;
o.R._x = w - o.R._width;
o.C._width = o.T._width;
o.C._height = o.L._height;
o.width = w;
o.height = h;
} else if ((o._width != w) || (o._height != h)) {
o.width = (o._width = w);
o.height = (o._height = h);
}
};
GWBaseClass.prototype.drag = function (o, lock, left, top, right, bottom) {
if (lock == -1) {
delete o.onMouseMove;
o.onDrop();
return(undefined);
}
var _local3 = function () {
var _local2 = arguments.callee;
var _local4 = _local2.t._parent._xmouse + _local2.xd;
var _local3 = _local2.t._parent._ymouse + _local2.yd;
if ((_local4 < _local2.left) && (_local2.left != null)) {
_local4 = _local2.left;
}
if ((_local4 > _local2.right) && (_local2.right != null)) {
_local4 = _local2.right;
}
if ((_local3 < _local2.top) && (_local2.top != null)) {
_local3 = _local2.top;
}
if ((_local3 > _local2.bottom) && (_local2.bottom != null)) {
_local3 = _local2.bottom;
}
_local2.t._x = _local4;
_local2.t._y = _local3;
_local2.t.onDrag();
updateAfterEvent();
};
_local3.t = o;
if ((lock == false) or (lock == undefined)) {
_local3.xd = o._x - o._parent._xmouse;
_local3.yd = o._y - o._parent._ymouse;
}
if (left != undefined) {
_local3.left = left;
} else {
_local3.left = null;
}
if (right != undefined) {
_local3.right = right;
} else {
_local3.right = null;
}
if (top != undefined) {
_local3.top = top;
} else {
_local3.top = null;
}
if (bottom != undefined) {
_local3.bottom = bottom;
} else {
_local3.bottom = null;
}
o.onMouseMove = _local3;
};
ASSetPropFlags(GWBaseClass.prototype, "drag", 1);
ASSetPropFlags(GWBaseClass.prototype, "sizeMe", 1);
ASSetPropFlags(GWBaseClass.prototype, "drawBox", 1);
ASSetPropFlags(GWBaseClass.prototype, "snapToPixels", 1);
ASSetPropFlags(GWBaseClass.prototype, "inherit", 1);
#endinitclip
Symbol 346 MovieClip [GWListBoxClass] Frame 1
#initclip 25
_global.GWListBoxClass = function () {
this.rowHeight = 18;
this.face = 16777215 /* 0xFFFFFF */;
this.highlight = 4210752 /* 0x404040 */;
this.highlight3D = 8421504 /* 0x808080 */;
this.shadow = 13947080 /* 0xD4D0C8 */;
this.darkshadow = 16777215 /* 0xFFFFFF */;
this.itemcolor_on = 664682 /* 0x0A246A */;
this.itemcolor_off = 16777215 /* 0xFFFFFF */;
this.itemcolor_out = 16777215 /* 0xFFFFFF */;
this.fontcolor_on = 16777215 /* 0xFFFFFF */;
this.fontcolor_off = 0;
this.fontcolor_out = 0;
super.init(GWListBoxClass);
};
GWListBoxClass.prototype = new GWBaseClass();
Object.registerClass("GWListBoxClass", GWListBoxClass);
GWListBoxClass.prototype.init = function () {
if (this.width == undefined) {
this.width = this._width;
}
if (this.height == undefined) {
this.height = this._height;
}
this._xscale = (this._yscale = 100);
this.createEmptyMovieClip("list_mc", 1);
this.list_mc.createEmptyMovieClip("content_mc", 1);
this.list_mc.content_mc.createEmptyMovieClip("holder_mc", 1);
this.list_mc.content_mc._x = (this.list_mc.content_mc._y = this.pad);
this.list_mc.content_mc.root = this;
this.drawBox("mask_mc", 2, 0, 0, 1, 1, 0, 100, this.list_mc.content_mc);
this.list_mc.content_mc.setMask(this.list_mc.content_mc.mask_mc);
this.sbprops.height = this.height - (this.pad * 2);
this.list_mc.attachMovie(this.sbSymbol, "vscroll_mc", 3, this.sbprops);
this.barwidth = this.list_mc.vscroll_mc._width;
delete this.sb_props;
this.list_mc.vscroll_mc._y = this.pad;
this.list_mc.vscroll_mc.setScrollTarget(this.list_mc.content_mc);
this.list_mc.content_mc.addListener(this);
this.width = Math.round(Math.max(this.barwidth * 3, this.width));
this.height = Math.round(Math.max(this.barwidth * 3, this.height));
this.frame_mc.colorObj = {face:this.face, highlight:this.highlight, highlight3D:this.highlight3D, shadow:this.shadow, darkshadow:this.darkshadow};
this.list_mc.frame_mc = this.frame_mc;
this.setFrameColor({face:this.face, highlight:this.highlight, highlight3D:this.highlight3D, shadow:this.shadow, darkshadow:this.darkshadow});
this.list = this.list_mc.content_mc.holder_mc;
this.setSmallScroll(this.rowHeight);
this.setLargeScroll(this.rowHeight * 2);
this.item_mc.unloadMovie();
this.items = [];
var _local4 = this.labels.length;
var _local3 = 0;
while (_local3 < _local4) {
this.items.push({label:this.labels[_local3], data:this.data[_local3], icon:this.icons[_local3]});
_local3++;
}
this.rowCount = this.rowCount || (Math.ceil(this.height / this.rowHeight));
if (this.items.length) {
this.setDataProvider(this.items);
} else {
this.refreshPane();
}
if (this.checkFocus) {
this.onMouseDown = function () {
var _local4 = this.items.length;
if (this.list_mc.frame_mc.hitTest(_root._xmouse, _root._ymouse, 1)) {
var _local3 = 0;
while (_local3 < _local4) {
if (this.items[_local3].selected) {
this.list["item" + _local3].setLabelColor(this.list["item" + _local3].fontcolor_on);
this.list["item" + _local3].setBaseColor(this.itemcolor_on);
}
_local3++;
}
} else {
var _local3 = 0;
while (_local3 < _local4) {
if (this.items[_local3].selected) {
this.list["item" + _local3].setLabelColor(this.list["item" + _local3].fontcolor_out);
this.list["item" + _local3].setBaseColor(this.itemcolor_out);
}
_local3++;
}
}
};
}
};
GWListBoxClass.prototype.getLength = function () {
return(this.items.length);
};
GWListBoxClass.prototype.setDataProvider = function (d) {
this.items = [];
this.list_mc.content_mc.createEmptyMovieClip("holder_mc", 1);
if (!(d[0] instanceof Object)) {
this.items = [];
var _local6 = d.length;
var _local2 = 0;
while (_local2 < _local6) {
this.items.push({data:d[_local2], label:d[_local2]});
_local2++;
}
} else {
this.items = d;
}
this.drawBox("height_mc", -1, 0, (this.items.length - 1) * this.rowHeight, 1, 1, 0, 0, this.list);
if (this.items.length) {
this.rowCount = this.rowCount || (Math.ceil(this.height / this.rowHeight));
var _local2 = 0;
while (_local2 < this.rowCount) {
this._buildItem(_local2);
_local2++;
}
}
this.refreshPane();
return(this.items);
};
GWListBoxClass.prototype.deSelect = function (i) {
if (!this.items[i].isHeader) {
this.items[i].selected = 0;
this.list["item" + i].setLabelColor(this.list["item" + i].fontcolor_off);
this.list["item" + i].setBaseColor(this.itemcolor_off);
}
};
GWListBoxClass.prototype.deSelectAll = function () {
var _local3 = this.items.length;
var _local2 = 0;
while (_local2 < _local3) {
this.deSelect(_local2);
_local2++;
}
};
GWListBoxClass.prototype.selectAll = function () {
if (this.selectMultiple) {
var _local3 = this.items.length;
var _local2 = 0;
while (_local2 < _local3) {
this.select(_local2);
_local2++;
}
}
};
GWListBoxClass.prototype.setFrameColor = function (c) {
for (var _local3 in c) {
this.list_mc.frame_mc[_local3] = c[_local3];
}
this.list_mc.frame_mc.setColor(c);
};
GWListBoxClass.prototype.getSelectMultiple = function () {
return(this.selectMultiple);
};
GWListBoxClass.prototype.setSelectMultiple = function (f) {
this.selectMultiple = f;
if (!f) {
this.deSelectAll();
this.select(this.lastIdx);
}
};
GWListBoxClass.prototype.select = function (i) {
if ((!this.selectMultiple) && (this.getSelectedIndices().length)) {
return(undefined);
}
if (!this.items[i].isHeader) {
this.items[i].selected = 1;
this.list["item" + i].setLabelColor(this.list["item" + i].fontcolor_on);
this.list["item" + i].setBaseColor(this.itemcolor_on);
}
};
GWListBoxClass.prototype.setSelectedIndex = function (i) {
this.lastIdx = i;
this.select(i);
if ((i >= (this.getScrollPosition() + this.getRowCount())) || (i <= this.getScrollPosition())) {
this.setScrollPosition(i - 1);
}
this.onSelect(i);
};
GWListBoxClass.prototype.setSelectedIndices = function (a) {
this.deSelectAll();
for (var _local3 in a) {
this.select(a[_local3]);
}
};
GWListBoxClass.prototype.getValue = function () {
return(this.getSelectedItem().data);
};
GWListBoxClass.prototype.getSelectedItem = function () {
if (this.items[this.lastIdx].selected) {
return({data:((this.items[this.lastIdx].data == undefined) ? (this.items[this.lastIdx].label) : (this.items[this.lastIdx].data)), label:this.items[this.lastIdx].label, icon:this.items[this.lastIdx].icon});
}
return(null);
};
GWListBoxClass.prototype.getSelectedIndices = function () {
var _local3 = [];
var _local4 = this.items.length;
var _local2 = 0;
while (_local2 < _local4) {
if (this.items[_local2].selected) {
_local3.push(_local2);
}
_local2++;
}
return(_local3);
};
GWListBoxClass.prototype.getSelectedItems = function () {
var _local5 = [];
var _local6 = this.items.length;
var _local2 = 0;
while (_local2 < _local6) {
if (this.items[_local2].selected) {
_local5.push({data:((this.items[_local2].data == undefined) ? (this.items[_local2].label) : (this.items[_local2].data)), label:this.items[_local2].label});
}
_local2++;
}
return(_local5);
};
GWListBoxClass.prototype.getRowCount = function () {
this.rowCount = Math.ceil((this.list_mc.content_mc.mask_mc._height - (this.pad * 2)) / this.rowHeight);
return(this.rowCount);
};
GWListBoxClass.prototype.setRowCount = function (n) {
if (n) {
this.rowCount = n;
if (this.items.length > 1) {
if ((n * this.rowHeight) < (this.barwidth * 2)) {
this.setRowHeight((this.barwidth * 2) / n);
}
}
this.setSize(this.width, this.rowHeight * n);
}
};
GWListBoxClass.prototype.getRowHeight = function () {
return(this.rowHeight);
};
GWListBoxClass.prototype.setRowHeight = function (n) {
this.rowHeight = n;
this.setSmallScroll(n);
this.setLargeScroll(n * 2);
this.setDataProvider(this.items);
this.setSize(this.width, Math.max(this.getRowCount() * n, this.height));
};
GWListBoxClass.prototype.getEnabled = function () {
return(this.enabled);
};
GWListBoxClass.prototype.setEnabled = function (f) {
this.enabled = f;
this.list_mc.vscroll_mc.setEnabled(f);
};
GWListBoxClass.prototype.removeAll = function () {
this.items = [];
this.list_mc.content_mc.createEmptyMovieClip("holder_mc", 1);
this.setSize(this.width, this.height, 1);
};
GWListBoxClass.prototype.getSize = function () {
return({width:this.width, height:this.height});
};
GWListBoxClass.prototype.setSize = function (w, h) {
if (((arguments.length > 2) || (this.width != w)) || (this.height != h)) {
var _local4 = this.pad * 2;
w = (this.width = Math.round(Math.max((this.barwidth * 2) + _local4, w)));
h = (this.height = Math.round(Math.max(this.barwidth * 2, Math.floor(h / this.rowHeight) * this.rowHeight) + _local4));
this.list_mc.content_mc.bottomScroll = (this.list_mc.content_mc.mask_mc._height = h - _local4);
this.list_mc.vscroll_mc.setSize(this.barwidth, h - _local4);
this.list_mc.vscroll_mc._x = (w - this.barwidth) - this.pad;
this.list_mc.content_mc.onChanged();
this.list_mc.content_mc.mask_mc._width = w - _local4;
this.sizeMe(this.width, this.height, this.list_mc.frame_mc);
for (var _local5 in this.list) {
this.list[_local5].setSize(w, this.rowHeight);
}
this.setVScroll();
this.list_mc.content_mc.maxscroll = Math.max(0, Math.ceil((this.list_mc.content_mc.holder_mc._height - this.list_mc.content_mc.mask_mc._height) / this.rowHeight) * this.rowHeight);
this.setScrollPosition(this.getScrollPosition());
}
};
GWListBoxClass.prototype.getEnabled = function () {
return(this.enabled);
};
GWListBoxClass.prototype.setEnabled = function (f) {
this.list_mc.vscroll_mc.setEnabled(f);
this.enabled = f;
};
GWListBoxClass.prototype.getSize = function () {
return({width:this.width, height:this.height});
};
GWListBoxClass.prototype.getScrollPosition = function () {
return(this.list_mc.vscroll_mc.getScrollPosition() / this.rowHeight);
};
GWListBoxClass.prototype.setScrollPosition = function (pos) {
if (this.getEnabled()) {
this.list_mc.vscroll_mc.setScrollPosition(Math.max(0, Math.min(pos * this.rowHeight, this.list_mc.content_mc.maxscroll)));
}
};
GWListBoxClass.prototype.setSmallScroll = function (n) {
this.smallScroll = n;
this.list_mc.vscroll_mc.setSmallScroll(n);
};
GWListBoxClass.prototype.setLargeScroll = function (n) {
this.largeScroll = n;
this.list_mc.vscroll_mc.setLargeScroll(n);
};
GWListBoxClass.prototype.setVScroll = function () {
this.list_mc.vscroll_mc._visible = ((this.items.length > this.getRowCount()) ? 1 : 0);
};
GWListBoxClass.prototype.setScrollBarColor = function (c) {
for (var _local3 in c) {
this.list_mc.vscroll_mc[_local3] = c[_local3];
}
this.list_mc.vscroll_mc.setColor(c);
};
GWListBoxClass.prototype.refreshPane = function () {
clearInterval(this.initID);
this.list_mc.content_mc.watch("scrollpos", this._updateScroll);
this.setSize(this.width, this.height, 1);
this.setEnabled(this.enabled);
};
GWListBoxClass.prototype._buildItem = function (i) {
if (this.items[i] == undefined) {
return(undefined);
}
this.list.attachMovie("GWListItemClass", "item" + i, i, {_y:i * this.rowHeight, idx:i, width:this.width, height:this.rowHeight, font:this.font, fontsize:this.fontsize, useEmbedFonts:this.useEmbedFonts, fontcolor:((this.items[i].fontcolor == undefined) ? (this.fontcolor_off) : (this.items[i].fontcolor)), fontcolor_off:((this.items[i].fontcolor_off == undefined) ? (this.fontcolor_off) : (this.items[i].fontcolor_off)), fontcolor_on:((this.items[i].fontcolor_on == undefined) ? (this.fontcolor_on) : (this.items[i].fontcolor_on)), fontcolor_out:((this.items[i].fontcolor_out == undefined) ? (this.fontcolor_out) : (this.items[i].fontcolor_out)), basecolor_off:this.itemcolor_off, data:((this.items[i].data == undefined) ? (this.items[i].label) : (this.items[i].data)), icon:this.items[i].icon, label:this.items[i].label, root:this});
if (!this.items[i].isHeader) {
if (this.items[i].selected) {
this.list["item" + i].setLabelColor(this.list["item" + i].fontcolor_on);
this.list["item" + i].setBaseColor(this.itemcolor_on);
}
this.list["item" + i].trackAsMenu = true;
this.list["item" + i].onDragOver = function () {
this.root.select(this.idx);
if ((this.root.lastDragIdx != this.root.lastIdx) && (((this.idx > this.root.lastDragIdx) && (this.root.lastDragIdx < this.root.lastIdx)) || ((this.idx < this.root.lastDragIdx) && (this.root.lastDragIdx > this.root.lastIdx)))) {
this.root.deSelect(this.root.lastDragIdx);
}
if (!this.root.selectMultiple) {
this.root.lastIdx = this.idx;
}
this.root.lastDragIdx = this.idx;
};
this.list["item" + i].onDragOut = function () {
if (!this.root.selectMultiple) {
this.root.deSelect(this.idx);
}
};
this.list["item" + i].onReleaseOutside = (this.list["item" + i].onRelease = function () {
clearInterval(this.root.isScrolling);
delete this.root.onMouseMove;
if ((this.idx == this.lastIdx) && ((getTimer() - this.lastHit) < 250)) {
clearInterval(this.root.clickID);
this.root.onDSelect(this.idx);
} else if (this.root.onDSelect == undefined) {
this.root.onSelect(this.idx);
} else {
this.root._onSelect = function (idx) {
clearInterval(this.clickID);
this.onSelect(idx);
};
this.root.clickID = setInterval(this.root, "_onSelect", 250, this.idx);
}
this.lastHit = getTimer();
this.lastIdx = this.idx;
});
this.list["item" + i].onPress = function () {
if (this.root.getEnabled()) {
if ((!Key.isDown(17)) || (!this.root.selectMultiple)) {
this.root.deSelectAll();
}
if (Key.isDown(16) && (this.root.selectMultiple)) {
if (this.root.lastIdx <= this.idx) {
var _local2 = this.root.lastIdx;
while (_local2 <= this.idx) {
this.root.select(_local2);
_local2++;
}
} else {
var _local2 = this.root.lastIdx;
while (_local2 >= this.idx) {
this.root.select(_local2);
_local2--;
}
}
return(undefined);
}
this.root._startSelect(this.idx);
}
};
}
this.onBuildItem(i);
};
GWListBoxClass.prototype._updateScroll = function () {
this.holder_mc._y = (-Math.round(Math.min(arguments[2], Math.min(this.maxscroll, Math.max(0, this.holder_mc._height - this.mask_mc._height))) / this.root.rowHeight)) * this.root.rowHeight;
var _local3 = (-this.holder_mc._y) / this.root.rowHeight;
var _local4 = _local3 + this.root.rowCount;
do {
if (!this.root.list["item" + _local3]) {
this.root._buildItem(_local3);
}
_local3++;
} while (_local3 <= _local4);
};
GWListBoxClass.prototype._startSelect = function (i) {
this.onMouseMove = function () {
clearInterval(this.isScrolling);
if (this._parent._ymouse >= (this._y + this.height)) {
this.isScrolling = setInterval(this, "_startScroll", 100, 1);
} else if (this._parent._ymouse <= this._y) {
this.isScrolling = setInterval(this, "_startScroll", 100, -1);
}
};
if (this.items[i].selected) {
this.deSelect(i);
} else {
this.select(i);
this.lastIdx = i;
}
};
GWListBoxClass.prototype._startScroll = function (d) {
this.setScrollPosition(this.getScrollPosition() + d);
if (this.selectMultiple) {
this.select(((d > 0) ? ((this.getScrollPosition() + this.getRowCount()) - 1) : (this.getScrollPosition())));
}
};
#endinitclip
Instance of Symbol 345 MovieClip [GWBaseClass] "baseclass" in Symbol 346 MovieClip [GWListBoxClass] Frame 1
//component parameters
onClipEvent (construct) {
}
Symbol 347 MovieClip [GWComboBoxClass] Frame 1
#initclip 21
_global.GWComboBoxClass = function () {
this.cbDepth = 17000;
this.rowHeight = 18;
this.listPos = "bottom";
this.face = 16777215 /* 0xFFFFFF */;
this.highlight = 4210752 /* 0x404040 */;
this.highlight3D = 8421504 /* 0x808080 */;
this.shadow = 13947080 /* 0xD4D0C8 */;
this.darkshadow = 16777215 /* 0xFFFFFF */;
this.fontcolor_on = 16777215 /* 0xFFFFFF */;
this.fontcolor_off = 0;
this.itemcolor_on = 664682 /* 0x0A246A */;
this.itemcolor_off = 16777215 /* 0xFFFFFF */;
super.init(GWComboBoxClass);
};
GWComboBoxClass.prototype = new GWBaseClass();
Object.registerClass("GWComboBoxClass", GWComboBoxClass);
GWComboBoxClass.prototype.init = function () {
this.width = Math.round(this._width);
this.height = Math.round(this._height);
this._xscale = (this._yscale = 100);
var _local7 = this.getDepth();
if (this._parent._GWTopComboBoxDepth == undefined) {
this._parent._GWTopComboBoxDepth = _local7;
} else if (_local7 > this._parent._GWTopComboBoxDepth) {
this._parent._GWTopComboBoxDepth = _local7;
}
this.items = [];
var _local5 = this.labels.length;
var _local6 = 0;
while (_local6 < _local5) {
this.items.push({label:this.labels[_local6], data:this.data[_local6], icon:this.icons[_local6]});
_local6++;
}
if (this.listprops == undefined) {
this.listprops = {};
}
this.listprops.face = (this.listprops.highlight = (this.listprops.shadow = (this.listprops.itemcolor_off = this.itemcolor_off)));
this.listprops.highlight3D = (this.listprops.darkshadow = this.listborder || 4210752);
this.listprops.vScroll = "auto";
this.listprops.pad = this.listpad || 1;
this.listprops.width = this.width;
this.listprops.rowHeight = this.rowHeight;
this.listprops.rowCount = this.rowCount || (this.items.length);
this.listprops.useEmbedFonts = this.useEmbedFonts;
this.box_mc.colorObj = {face:this.face, highlight:this.highlight, highlight3D:this.highlight3D, shadow:this.shadow, darkshadow:this.darkshadow};
this.box_mc.useHandCursor = false;
this.box_mc.onPress = function () {
if (this._parent.list_mc._visible) {
this._parent.hideList();
} else {
this._parent.showList();
}
};
this.attachMovie("GWListItemClass", "item_mc", 2, {_x:this.pad, _y:this.pad, font:this.font, fontsize:this.fontsize, fontcolor:this.fontcolor, label:"", useEmbedFonts:this.useEmbedFonts, width:this.width - (this.pad * 2), height:Math.max(this.rowHeight + (this.pad * 2), this.height) - (this.pad * 2)});
this.setSize(this.width, this.height);
this.arrow_mc.useHandCursor = false;
this.arrow_mc.onPress = function () {
this._parent.box_mc.onPress();
if (this._parent.enabled) {
for (var _local2 in this) {
this[_local2]._visible = 0;
}
this.down_mc._visible = 1;
}
};
this.arrow_mc.onRelease = (this.arrow_mc.onReleaseOutside = function () {
if (this._parent.enabled) {
for (var _local2 in this) {
this[_local2]._visible = 0;
}
this.up_mc._visible = 1;
}
});
this.arrow_mc.swapDepths(3);
this.onMouseDown();
if (this.items.length) {
if ((this.idx != undefined) && (this.idx != "")) {
this.select(parseInt(this.idx));
}
} else {
this.setEnabled(false);
}
if (this.spawnAtRoot && (!_root.__GWcombobox)) {
_root.createEmptyMovieClip("__GWcombobox", this.cbDepth);
_root.__GWcombobox.count = 1;
}
this.depth = _root.__GWcombobox.count++;
};
GWComboBoxClass.prototype.onMouseDown = function () {
if (!((this.list_mc._visible && (this.list_mc.hitTest(_root._xmouse, _root._ymouse, 1))) || (this.box_mc.hitTest(_root._xmouse, _root._ymouse, 1)))) {
this.hideList();
this.item_mc.setLabelEnabled(this.getEnabled());
this.item_mc.setBaseColor(this.box_mc.colorObj.face);
}
};
GWComboBoxClass.prototype.select = function (i) {
if (i == -1) {
this.item_mc.icon_mc.removeMovieClip();
this.item_mc.setLabel("");
delete this.item_mc.idx;
} else if (this.items[i]) {
this.item_mc.icon_mc.removeMovieClip();
this.item_mc.setIcon(this.items[i].icon);
this.item_mc.setLabel(this.items[i].label);
this.item_mc.idx = i;
this.list_mc.select(i);
this.hideList();
this.onSelect(i);
}
};
GWComboBoxClass.prototype.setSelectedIndex = function (i) {
this.select(i);
};
GWComboBoxClass.prototype.getEnabled = function () {
return(this.enabled);
};
GWComboBoxClass.prototype.setEnabled = function (f) {
for (var _local2 in this.arrow_mc) {
this.arrow_mc[_local2]._visible = 0;
}
if (!f) {
this.arrow_mc.off_mc._visible = 1;
this.enabled = false;
this.item_mc.setLabelEnabled(false);
} else {
this.arrow_mc.up_mc._visible = 1;
this.enabled = true;
this.item_mc.setLabelEnabled(true);
}
};
GWComboBoxClass.prototype.getSize = function () {
return({width:this.width, height:this.height});
};
GWComboBoxClass.prototype.setSize = function (w, h) {
w = (this.width = Math.round(w));
h = (this.height = Math.round(h));
var _local2 = this.pad * 2;
this.sizeMe(w, Math.max(this.rowHeight + _local2, h), this.box_mc);
this.listprops.width = this.width;
this.item_mc.setSize(w - _local2, Math.max(this.rowHeight + _local2, h) - _local2);
this.select(this.getSelectedIndex());
var _local6 = this.arrow_mc.down_mc.arrow_mc._y - this.arrow_mc.up_mc.arrow_mc._y;
for (var _local3 in this.arrow_mc) {
this.sizeMe(this.arrow_mc._width, this.item_mc.height, this.arrow_mc[_local3].base_mc);
this.arrow_mc[_local3].arrow_mc._y = (this.arrow_mc[_local3].shadow_mc._y = Math.round((this.item_mc.height - this.arrow_mc[_local3].arrow_mc._height) / 2));
}
this.arrow_mc.down_mc.arrow_mc._y = this.arrow_mc.down_mc.arrow_mc._y + _local6;
this.arrow_mc._x = (w - this.arrow_mc._width) - this.pad;
this.arrow_mc._y = this.pad;
this.initList = false;
};
GWComboBoxClass.prototype.getSelectedIndex = function () {
return(this.item_mc.idx);
};
GWComboBoxClass.prototype.getSelectedItem = function () {
return(this.items[this.item_mc.idx]);
};
GWComboBoxClass.prototype.getValue = function () {
return(this.items[this.item_mc.idx].data);
};
GWComboBoxClass.prototype.setValue = function (v) {
var _local3 = this.items.length;
var _local2 = 0;
while (_local2 < _local3) {
if (this.items[_local2].data == v) {
this.list_mc.deSelectAll();
this.select(_local2);
return(undefined);
}
_local2++;
}
return(false);
};
GWComboBoxClass.prototype.setBoxColor = function (c) {
this.box_mc.setColor(c);
this.item_mc.setLabelColor(this.fontcolor);
this.item_mc.setBaseColor(this.box_mc.colorObj.face);
};
GWComboBoxClass.prototype.setListPlacement = function (p) {
this.listPos = p;
var _local5 = this._x;
var _local4 = this._y;
var _local3 = this;
do {
_local3 = _local3._parent;
pt = {x:_local3._x, y:_local3._y};
_local5 = _local5 + pt.x;
_local4 = _local4 + pt.y;
} while (_local3 != _root);
this.y = _local4;
if (!this.spawnAtRoot) {
_local5 = 0;
_local4 = 0;
}
this.list_mc._x = _local5;
if (p == "top") {
this.list_mc._y = _local4 - this.list_mc.height;
} else if (p == "bottom") {
this.list_mc._y = _local4 + this.box_mc.height;
} else {
this.list_mc._y = _local4 - Math.floor((this.list_mc.height - this.box_mc.height) / 2);
}
};
GWComboBoxClass.prototype.setRowCount = function (n) {
this.rowCount = n;
this.initList = false;
};
GWComboBoxClass.prototype.setRowHeight = function (n) {
this.rowHeight = n;
this.initList = false;
};
GWComboBoxClass.prototype.setDataProvider = function (d) {
if ((this.spawnAtRoot && (!_root.__GWcombobox["cb" + this.depth])) || (!this.list_mc)) {
if (this.spawnAtRoot) {
_root.__GWcombobox.attachMovie(this.listSymbol, "cb" + this.depth, this.depth, this.listprops);
this.list_mc = _root.__GWcombobox["cb" + this.depth];
} else {
this.attachMovie(this.listSymbol, "list_mc", 4, this.listprops);
}
this.list_mc.parent = this;
this.list_mc.data = this.data;
this.list_mc.icons = this.icons;
this.list_mc.labels = this.labels;
this.list_mc.font = this.font;
this.list_mc.fontsize = this.fontsize;
this.list_mc.itemcolor_on = this.itemcolor_on;
this.list_mc.face = (this.list_mc.highlight = (this.list_mc.shadow = (this.list_mc.itemcolor_off = this.itemcolor_off)));
this.list_mc.fontcolor_on = this.fontcolor_on;
this.list_mc.fontcolor_off = this.fontcolor_off;
this.list_mc.rowCount = this.rowCount || (this.items.length);
this.list_mc.onSelect = function (i) {
this.parent.select(i);
this.parent.item_mc.setLabelColor(this.parent.fontcolor_on);
this.parent.item_mc.setBaseColor(this.parent.itemcolor_on);
};
this.list_mc._startSelect = function (i) {
this.select(i);
};
this.list_mc.onBuildItem = function (i) {
this.list["item" + i].trackAsMenu = true;
this.list["item" + i].onDragOver = (this.list["item" + i].onRollOver = function () {
for (var _local2 in this._parent) {
this._parent[_local2].setLabelColor(this.root.fontcolor_off);
this._parent[_local2].setBaseColor(this.root.itemcolor_off);
}
this.setLabelColor(this.root.fontcolor_on);
this.setBaseColor(this.root.itemcolor_on);
});
};
}
this.items = this.list_mc.setDataProvider(d);
this.list_mc.setSize(this.width, this.list_mc.height);
this.initList = false;
this.setEnabled(this.items.length);
this.onMouseDown();
};
GWComboBoxClass.prototype.showList = function () {
if (this.spawnAtRoot) {
_root.__GWcombobox.swapDepths(this.cbDepth);
_root.__GWcombobox.active.hideList();
} else {
this.swapDepths(this._parent._GWTopComboBoxDepth);
}
if (this.getEnabled() && (this.items.length)) {
if (!this.initList) {
this.listprops.rowHeight = this.rowHeight;
this.setDataProvider(this.items);
this.list_mc.setRowCount(this.rowCount || (this.items.length));
this.initList = true;
}
this.setListPlacement(this.listPos);
this.list_mc._visible = 1;
this.list_mc.select(this.item_mc.idx);
if ((this.item_mc.idx >= (this.list_mc.getScrollPosition() + this.list_mc.getRowCount())) || (this.item_mc.idx <= this.list_mc.getScrollPosition())) {
this.list_mc.setScrollPosition(this.item_mc.idx - 1);
}
if ((this.useEdgeScroll && (this.rowCount)) && (this.items.length > this.rowCount)) {
this.onMouseMove = function () {
clearInterval(this.isScrolling);
if (_root._ymouse < Math.min(this.y, (this.spawnAtRoot ? 0 : (this.y)) + this.list_mc._y)) {
this.isScrolling = setInterval(this.list_mc, "_startScroll", 100, -1);
} else if (_root._ymouse > Math.max(this.y + this.box_mc.height, ((this.spawnAtRoot ? 0 : (this.y)) + this.list_mc._y) + this.list_mc.height)) {
this.isScrolling = setInterval(this.list_mc, "_startScroll", 100, 1);
}
};
}
_root.__GWcombobox.active = this;
}
};
GWComboBoxClass.prototype.hideList = function () {
this.list_mc._visible = 0;
this.list_mc.deSelectAll();
this.onMouseMove = null;
clearInterval(this.isScrolling);
};
#endinitclip
Instance of Symbol 345 MovieClip [GWBaseClass] "baseclass" in Symbol 347 MovieClip [GWComboBoxClass] Frame 1
//component parameters
onClipEvent (construct) {
}
Symbol 351 MovieClip [GWPanel] Frame 1
#initclip 22
_global.GWPanel = function () {
if (this.colorObj != undefined) {
for (var _local3 in this.colorObj) {
this[_local3] = this.colorObj[_local3];
}
}
super.init(GWPanel);
this.init();
};
GWPanel.prototype = new GWBaseClass();
Object.registerClass("GWPanel", GWPanel);
GWPanel.prototype.init = function () {
this.face = ((this.face == undefined) ? 13947080 : (this.face));
this.highlight = ((this.highlight == undefined) ? 13947080 : (this.highlight));
this.highlight3D = ((this.highlight3D == undefined) ? 16777215 : (this.highlight3D));
this.shadow = ((this.shadow == undefined) ? 8421504 : (this.shadow));
this.darkshadow = ((this.darkshadow == undefined) ? 4210752 : (this.darkshadow));
this.width = Math.round(this.width || (this._width));
this.height = Math.round(this.height || (this._height));
this._xscale = (this._yscale = 100);
this.classHolder._width = this.width;
this.classHolder._height = this.height;
this.setSize();
};
GWPanel.prototype.setSize = function (w, h) {
this.snapToPixels(this);
if (!arguments.length) {
w = (this.width = this.width || (this._width));
h = (this.height = this.height || (this._height));
this._xscale = (this._yscale = 100);
} else {
w = Math.round(w);
this.width = w;
h = Math.round(h);
this.height = h;
}
this.drawPanel(w, h);
};
GWPanel.prototype.getSize = function () {
return({width:this._width, height:this._height});
};
GWPanel.prototype.setColor = function (c) {
c = ((c != undefined) ? (c) : (this.colorObj));
for (var _local4 in c) {
this[_local4] = c[_local4];
}
this.colorObj = c;
var _local2 = new Color(this.iMC);
_local2.setRGB(this.face);
_local2 = new Color(this.eMC);
_local2.setRGB(this.highlight);
_local2 = new Color(this.fMC);
_local2.setRGB(this.highlight);
_local2 = new Color(this.aMC);
_local2.setRGB(this.highlight3D);
_local2 = new Color(this.bMC);
_local2.setRGB(this.highlight3D);
_local2 = new Color(this.gMC);
_local2.setRGB(this.shadow);
_local2 = new Color(this.hMC);
_local2.setRGB(this.shadow);
_local2 = new Color(this.cMC);
_local2.setRGB(this.darkshadow);
_local2 = new Color(this.dMC);
_local2.setRGB(this.darkshadow);
};
GWPanel.prototype.drawPanel = function (w, h) {
if ((this._width != w) || (this._height != h)) {
w = (this.width = Math.max(4, w || (this.width)));
h = (this.height = Math.max(4, h || (this.height)));
this.aMC._width = w - 1;
this.bMC._height = h - 2;
this.cMC._width = w;
this.dMC._height = h - 1;
this.eMC._width = w - 3;
this.fMC._height = h - 4;
this.gMC._width = w - 2;
this.hMC._height = h - 3;
this.iMC._width = w - 4;
this.iMC._height = h - 4;
this.cMC._y = h - 1;
this.dMC._x = w - 1;
this.gMC._y = h - 2;
this.hMC._x = w - 2;
}
this.setColor();
};
#endinitclip
Instance of Symbol 345 MovieClip [GWBaseClass] "baseclass" in Symbol 351 MovieClip [GWPanel] Frame 1
//component parameters
onClipEvent (construct) {
}
Instance of Symbol 351 MovieClip [GWPanel] "base_mc" in Symbol 352 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
face = 13947080 /* 0xD4D0C8 */;
highlight = 16777215 /* 0xFFFFFF */;
highlight3D = 13947080 /* 0xD4D0C8 */;
shadow = 8421504 /* 0x808080 */;
darkshadow = 4210752 /* 0x404040 */;
}
Instance of Symbol 351 MovieClip [GWPanel] "base_mc" in Symbol 355 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
face = 13947080 /* 0xD4D0C8 */;
highlight = 13947080 /* 0xD4D0C8 */;
highlight3D = 8421504 /* 0x808080 */;
shadow = 13947080 /* 0xD4D0C8 */;
darkshadow = 8421504 /* 0x808080 */;
}
Instance of Symbol 351 MovieClip [GWPanel] "base_mc" in Symbol 356 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
face = 13947080 /* 0xD4D0C8 */;
highlight = 16777215 /* 0xFFFFFF */;
highlight3D = 13947080 /* 0xD4D0C8 */;
shadow = 8421504 /* 0x808080 */;
darkshadow = 4210752 /* 0x404040 */;
}
Instance of Symbol 351 MovieClip [GWPanel] "base_mc" in Symbol 357 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
face = 13947080 /* 0xD4D0C8 */;
highlight = 16777215 /* 0xFFFFFF */;
highlight3D = 13947080 /* 0xD4D0C8 */;
shadow = 8421504 /* 0x808080 */;
darkshadow = 4210752 /* 0x404040 */;
}
Instance of Symbol 351 MovieClip [GWPanel] "base_mc" in Symbol 361 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
face = 13947080 /* 0xD4D0C8 */;
highlight = 13947080 /* 0xD4D0C8 */;
highlight3D = 8421504 /* 0x808080 */;
shadow = 13947080 /* 0xD4D0C8 */;
darkshadow = 8421504 /* 0x808080 */;
}
Instance of Symbol 351 MovieClip [GWPanel] "base_mc" in Symbol 362 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
face = 13947080 /* 0xD4D0C8 */;
highlight = 16777215 /* 0xFFFFFF */;
highlight3D = 13947080 /* 0xD4D0C8 */;
shadow = 8421504 /* 0x808080 */;
darkshadow = 4210752 /* 0x404040 */;
}
Instance of Symbol 351 MovieClip [GWPanel] "base_mc" in Symbol 363 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
face = 13947080 /* 0xD4D0C8 */;
highlight = 16777215 /* 0xFFFFFF */;
highlight3D = 13947080 /* 0xD4D0C8 */;
shadow = 8421504 /* 0x808080 */;
darkshadow = 4210752 /* 0x404040 */;
}
Symbol 366 MovieClip [GWScrollerClass] Frame 1
#initclip 23
_global.GWScrollerClass = function () {
super.init(GWScrollerClass);
};
GWScrollerClass.prototype = new GWBaseClass();
Object.registerClass("GWScrollerClass", GWScrollerClass);
GWScrollerClass.prototype.init = function () {
if (this.horizontal && (this._rotation == 90)) {
this.isHorizontal = true;
}
this.snapToPixels(this);
this.largeScroll = (this.horizontal ? 30 : 5);
this.smallScroll = (this.horizontal ? 5 : 1);
for (var _local2 in this.scrollbar_mc) {
this.scrollbar_mc[_local2].useHandCursor = false;
}
var _local5 = this.width || ((this.horizontal ? (this._height) : (this._width)));
var _local4 = this.height || ((this.horizontal ? (this._width) : (this._height)));
this._xscale = (this._yscale = 100);
this.thumbMinSize = this.scrollbar_mc.thumb_mc._height;
this.setSize(_local5, _local4);
for (var _local2 in this.scrollbar_mc.bot_mc) {
if (_local2 == "over_mc") {
this.scrollbar_mc.bot_mc.onRollOver = (this.scrollbar_mc.top_mc.onRollOver = function () {
if (this._parent._parent.enabled) {
for (var _local2 in this) {
this[_local2]._visible = 0;
}
this.over_mc._visible = 1;
}
});
} else if (_local2 == "down_mc") {
this.scrollbar_mc.bot_mc.onPress = (this.scrollbar_mc.top_mc.onPress = function () {
if (this._parent._parent.enabled) {
for (var _local2 in this) {
this[_local2]._visible = 0;
}
this.down_mc._visible = 1;
var _local3 = ((this._name == "bot_mc") ? 1 : -1) * this._parent._parent.smallScroll;
this._parent._parent.isScrolling = setInterval(this._parent._parent, "_doScroll", 100, _local3);
}
});
} else if (_local2 == "up_mc") {
this.scrollbar_mc.bot_mc.onRelease = (this.scrollbar_mc.bot_mc.onReleaseOutside = (this.scrollbar_mc.top_mc.onRelease = (this.scrollbar_mc.top_mc.onReleaseOutside = function () {
if (this._parent._parent.enabled) {
for (var _local2 in this) {
this[_local2]._visible = 0;
}
this.up_mc._visible = 1;
clearInterval(this._parent._parent.isScrolling);
delete this._parent._parent.isScrolling;
var _local3 = ((this._name == "bot_mc") ? 1 : -1) * this._parent._parent.smallScroll;
this._parent._parent._doScroll(_local3, this._parent._parent);
}
})));
}
}
this.scrollbar_mc.thumb_mc.onPress = function () {
this._parent._parent.drag(this, false, 0, this._parent.track_mc._y, 0, (this._parent.track_mc._y + this._parent.track_mc._height) - this.height);
this.onDrag = this._parent._parent._onThumbDrag;
this._parent._parent.isDragging = true;
};
this.scrollbar_mc.thumb_mc.onRelease = (this.scrollbar_mc.thumb_mc.onReleaseOutside = function () {
this._parent._parent.drag(this, -1);
this._parent._parent.isDragging = false;
this._parent._parent.scrollTarget.onChanged();
});
this.scrollbar_mc.track_mc.onPress = function () {
if (this._parent._parent.enabled) {
var _local2 = this._parent._parent.largeScroll * ((this._parent._ymouse > this._parent.thumb_mc._y) ? 1 : -1);
this._parent._parent.isScrolling = setInterval(this._parent._parent, "_doScroll", 50, _local2, this._parent._ymouse);
this._parent._parent._doScroll(_local2);
}
};
this.scrollbar_mc.track_mc.onDragOut = (this.scrollbar_mc.track_mc.onRelease = (this.scrollbar_mc.track_mc.onReleaseOutside = function () {
clearInterval(this._parent._parent.isScrolling);
delete this._parent._parent.isScrolling;
}));
this.setScrollTarget(((this.scrollTarget.length > 0) ? (this.scrollTarget) : (this._targetInstanceName)));
this.scrollTarget.onChanged();
};
GWScrollerClass.prototype.setHorizontal = function (f) {
this.horizontal = f;
this.setSize(this.width, this.height, 1);
};
GWScrollerClass.prototype.getSize = function () {
return({width:this._width, height:this._height});
};
GWScrollerClass.prototype.setSize = function (w, h) {
if (((arguments.length > 2) || (this.width != w)) || (this.height != h)) {
w = (this.width = Math.round(w));
h = (this.height = Math.round(h));
var _local3 = this.scrollbar_mc;
this._rotation = 0;
var _local7 = _local3.bot_mc.down_mc.arrow_mc._x - _local3.bot_mc.up_mc.arrow_mc._x;
for (var _local5 in _local3.bot_mc) {
_local3.bot_mc[_local5]._x = (_local3.bot_mc[_local5]._y = 0);
_local3.top_mc[_local5]._x = (_local3.top_mc[_local5]._y = 0);
_local3.bot_mc[_local5]._visible = (_local3.top_mc[_local5]._visible = 0);
this.sizeMe(w, _local3.bot_mc[_local5]._height, _local3.bot_mc[_local5].base_mc);
this.sizeMe(w, _local3.top_mc[_local5]._height, _local3.top_mc[_local5].base_mc);
_local3.bot_mc[_local5].arrow_mc._x = (_local3.top_mc[_local5].arrow_mc._x = Math.floor((w - _local3.bot_mc.up_mc.arrow_mc._width) / 2));
_local3.bot_mc[_local5].shadow_mc._x = (_local3.top_mc[_local5].shadow_mc._x = Math.floor((w - _local3.top_mc[_local5].shadow_mc._width) / 2));
}
_local3.bot_mc.down_mc.arrow_mc._x = (_local3.top_mc.down_mc.arrow_mc._x = Math.floor((w - _local3.bot_mc.down_mc.arrow_mc._width) / 2) + _local7);
_local3.bot_mc.up_mc._visible = (_local3.top_mc.up_mc._visible = 1);
this.sizeMe(w, (h - _local3.top_mc._height) - _local3.bot_mc._height, _local3.track_mc);
this.sizeMe(w, _local3.thumb_mc._height, _local3.thumb_mc.base_mc);
_local3.track_mc._y = _local3.top_mc._height;
_local3.bot_mc._y = h - _local3.bot_mc._height;
if (this.horizontal) {
this._rotation = 90;
if (!this.isHorizontal) {
this._yscale = -Math.abs(this._yscale);
}
}
this._updateThumb();
}
};
GWScrollerClass.prototype.getScrollPosition = function () {
return(this.scrollpos);
};
GWScrollerClass.prototype.setScrollPosition = function (p) {
if (this.horizontal) {
this.scrollTarget.hscroll = p;
} else {
this.scrollTarget.scroll = p;
}
this.scrollTarget.onChanged();
};
GWScrollerClass.prototype.setSmallScroll = function (n) {
this.smallScroll = n;
};
GWScrollerClass.prototype.setLargeScroll = function (n) {
this.largeScroll = n;
};
GWScrollerClass.prototype.setEnabled = function (f) {
var _local2 = this.scrollbar_mc;
for (var _local3 in _local2.bot_mc) {
_local2.bot_mc[_local3]._visible = 0;
_local2.top_mc[_local3]._visible = 0;
}
if (!f) {
_local2.bot_mc.off_mc._visible = (_local2.top_mc.off_mc._visible = 1);
_local2.thumb_mc._visible = 0;
this.enabled = false;
} else {
_local2.bot_mc.up_mc._visible = (_local2.top_mc.up_mc._visible = 1);
this._updateThumb();
this.enabled = true;
}
};
GWScrollerClass.prototype.setScrollTarget = function (t) {
if (t != undefined) {
t = (((t instanceof TextField) || (t instanceof MovieClip)) ? (t) : (this._parent[t]));
if ((t instanceof TextField) || (t instanceof MovieClip)) {
this.scrollTarget = t;
if (!this.scrollTarget.scroller) {
this.scrollTarget.scroller = [this];
} else {
this.scrollTarget.scroller.push(this);
}
this.scrollTarget.addListener(this);
this.scrollTarget.onScroller = (this.scrollTarget.onChanged = function () {
for (var _local2 in this.scroller) {
this.scroller[_local2]._onChanged(this);
}
});
} else {
delete this.scrollTarget;
return(undefined);
}
}
};
GWScrollerClass.prototype._doScroll = function (d, t) {
this.scrollpos = this.scrollpos || 0;
this.scrollpos = this.scrollpos + d;
this.scrollpos = ((d > 0) ? (Math.min(this.scrollpos, this.maxscroll)) : (Math.max(this.scrollpos, (this.horizontal ? 0 : (((this.scrollTarget instanceof TextField) ? 1 : 0))))));
this._updateThumb();
if (t) {
if (((d > 0) && ((this.scrollbar_mc.thumb_mc._y + this.scrollbar_mc.thumb_mc.height) > t)) || ((d < 0) && (this.scrollbar_mc.thumb_mc._y < t))) {
this.scrollbar_mc.track_mc.onRelease();
}
}
};
GWScrollerClass.prototype._onChanged = function (t) {
if (this.isDragging) {
return(undefined);
}
this.scrollpos = (this.horizontal ? (t.hscroll) : (t.scroll)) || 0;
this.maxscroll = (this.horizontal ? (t.maxhscroll) : (t.maxscroll));
this.pageSize = ((t instanceof TextField) ? ((this.horizontal ? (this.largeScroll) : (t.bottomScroll - t.scroll))) : (t.bottomScroll - (t.scrollpos || 0)));
if (!this.isScrolling) {
if (this.maxscroll > 1) {
this.setEnabled(true);
this._updateThumb();
} else {
this.setEnabled(false);
}
}
};
GWScrollerClass.prototype._onThumbDrag = function () {
var _local2 = this._parent._parent.scrollTarget;
var _local3 = this._parent.track_mc._height - this.height;
if (this._parent._parent.horizontal) {
var _local4 = _local3 / _local2.maxhscroll;
_local2.hscroll = (_local2.hscrollpos = Math.round((this._y - this._parent.track_mc._y) / _local4));
} else {
var _local4 = _local3 / _local2.maxscroll;
_local2.scroll = (_local2.scrollpos = Math.round((this._y - this._parent.track_mc._y) / _local4) + ((_local2 instanceof TextField) ? 1 : 0));
}
};
GWScrollerClass.prototype._updateThumb = function () {
var _local2 = this.scrollbar_mc;
var _local4 = Math.max(this.thumbMinSize, Math.round((this.pageSize / (this.maxscroll + this.pageSize)) * _local2.track_mc._height)) || (this.thumbMinSize);
if (this.scrollTarget) {
this.sizeMe(this.width, _local4, _local2.thumb_mc.base_mc);
_local2.thumb_mc.height = _local4;
}
_local2.thumb_mc.mid_mc._x = Math.floor(((_local2.thumb_mc.width || (_local2.thumb_mc._width)) - _local2.thumb_mc.mid_mc._width) / 2);
_local2.thumb_mc.mid_mc._y = Math.floor(((_local2.thumb_mc.height || (_local2.thumb_mc._height)) - _local2.thumb_mc.mid_mc._height) / 2);
var _local3 = _local2.track_mc._height - _local4;
var _local5 = _local3 / (this.maxscroll - 1);
_local2.thumb_mc._visible = _local3 > 0;
_local2.thumb_mc._y = _local2.track_mc._y + Math.max(0, Math.round(Math.min(_local3, (this.scrollpos - 1) * _local5)));
if (this.horizontal) {
this.scrollTarget.hscroll = (this.scrollTarget.hscrollpos = this.scrollpos);
} else {
this.scrollTarget.scroll = (this.scrollTarget.scrollpos = this.scrollpos);
}
};
#endinitclip
Instance of Symbol 345 MovieClip [GWBaseClass] "baseclass" in Symbol 366 MovieClip [GWScrollerClass] Frame 1
//component parameters
onClipEvent (construct) {
}
Symbol 367 MovieClip [GWScrollBar] Frame 1
#initclip 29
_global.GWScrollBar = function () {
super.init();
this.init();
};
GWScrollBar.prototype = new GWScrollerClass();
Object.registerClass("GWScrollBar", GWScrollBar);
GWScrollBar.prototype.init = function () {
this.face = ((this.face == undefined) ? 13947080 : (this.face));
this.highlight = ((this.highlight == undefined) ? 16777215 : (this.highlight));
this.highlight3D = ((this.highlight3D == undefined) ? 13947080 : (this.highlight3D));
this.shadow = ((this.shadow == undefined) ? 8421504 : (this.shadow));
this.darkshadow = ((this.darkshadow == undefined) ? 4210752 : (this.darkshadow));
this.face_down = ((this.face_down == undefined) ? 13947080 : (this.face_down));
this.highlight_down = ((this.highlight_down == undefined) ? 13947080 : (this.highlight_down));
this.highlight3D_down = ((this.highlight3D_down == undefined) ? 8421504 : (this.highlight3D_down));
this.shadow_down = ((this.shadow_down == undefined) ? 13947080 : (this.shadow_down));
this.darkshadow_down = ((this.darkshadow_down == undefined) ? 8421504 : (this.darkshadow_down));
this.face_off = ((this.face_off == undefined) ? 13947080 : (this.face_off));
this.highlight_off = ((this.highlight_off == undefined) ? 16777215 : (this.highlight_off));
this.highlight3D_off = ((this.highlight3D_off == undefined) ? 13947080 : (this.highlight3D_off));
this.shadow_off = ((this.shadow_off == undefined) ? 8421504 : (this.shadow_off));
this.darkshadow_off = ((this.darkshadow_off == undefined) ? 4210752 : (this.darkshadow_off));
this.arrow_off = ((this.arrow_off == undefined) ? 8421504 : (this.arrow_off));
this.scrollbar_mc.thumb_mc.base_mc.face = this.face;
this.scrollbar_mc.thumb_mc.base_mc.highlight = this.highlight;
this.scrollbar_mc.thumb_mc.base_mc.highlight3D = this.highlight3D;
this.scrollbar_mc.thumb_mc.base_mc.shadow = this.shadow;
this.scrollbar_mc.thumb_mc.base_mc.darkshadow = this.darkshadow;
this.scrollbar_mc.bot_mc.up_mc.base_mc.face = this.face;
this.scrollbar_mc.bot_mc.up_mc.base_mc.highlight = this.highlight;
this.scrollbar_mc.bot_mc.up_mc.base_mc.highlight3D = this.highlight3D;
this.scrollbar_mc.bot_mc.up_mc.base_mc.shadow = this.shadow;
this.scrollbar_mc.bot_mc.up_mc.base_mc.darkshadow = this.darkshadow;
this.scrollbar_mc.top_mc.up_mc.base_mc.face = this.face;
this.scrollbar_mc.top_mc.up_mc.base_mc.highlight = this.highlight;
this.scrollbar_mc.top_mc.up_mc.base_mc.highlight3D = this.highlight3D;
this.scrollbar_mc.top_mc.up_mc.base_mc.shadow = this.shadow;
this.scrollbar_mc.top_mc.up_mc.base_mc.darkshadow = this.darkshadow;
this.scrollbar_mc.bot_mc.down_mc.base_mc.face = this.face_down;
this.scrollbar_mc.bot_mc.down_mc.base_mc.highlight = this.highlight_down;
this.scrollbar_mc.bot_mc.down_mc.base_mc.highlight3D = this.highlight3D_down;
this.scrollbar_mc.bot_mc.down_mc.base_mc.shadow = this.shadow_down;
this.scrollbar_mc.bot_mc.down_mc.base_mc.darkshadow = this.darkshadow_down;
this.scrollbar_mc.top_mc.down_mc.base_mc.face = this.face_down;
this.scrollbar_mc.top_mc.down_mc.base_mc.highlight = this.highlight_down;
this.scrollbar_mc.top_mc.down_mc.base_mc.highlight3D = this.highlight3D_down;
this.scrollbar_mc.top_mc.down_mc.base_mc.shadow = this.shadow_down;
this.scrollbar_mc.top_mc.down_mc.base_mc.darkshadow = this.darkshadow_down;
this.scrollbar_mc.bot_mc.off_mc.base_mc.face = this.face_off;
this.scrollbar_mc.bot_mc.off_mc.base_mc.highlight = this.highlight_off;
this.scrollbar_mc.bot_mc.off_mc.base_mc.highlight3D = this.highlight3D_off;
this.scrollbar_mc.bot_mc.off_mc.base_mc.shadow = this.shadow_off;
this.scrollbar_mc.bot_mc.off_mc.base_mc.darkshadow = this.darkshadow_off;
this.scrollbar_mc.top_mc.off_mc.base_mc.face = this.face_off;
this.scrollbar_mc.top_mc.off_mc.base_mc.highlight = this.highlight_off;
this.scrollbar_mc.top_mc.off_mc.base_mc.highlight3D = this.highlight3D_off;
this.scrollbar_mc.top_mc.off_mc.base_mc.shadow = this.shadow_off;
this.scrollbar_mc.top_mc.off_mc.base_mc.darkshadow = this.darkshadow_off;
this.setColor();
};
GWScrollBar.prototype.setColor = function (o) {
this.face = ((o.face == undefined) ? (this.face) : (o.face));
this.highlight = ((o.highlight == undefined) ? (this.highlight) : (o.highlight));
this.highlight3D = ((o.highlight3D == undefined) ? (this.highlight3D) : (o.highlight3D));
this.shadow = ((o.shadow == undefined) ? (this.shadow) : (o.shadow));
this.darkshadow = ((o.darkshadow == undefined) ? (this.darkshadow) : (o.darkshadow));
this.arrow = ((o.arrow == undefined) ? (this.arrow) : (o.arrow));
this.track = ((o.track == undefined) ? (this.track) : (o.track));
this.face_down = ((o.face_down == undefined) ? (this.face_down) : (o.face_down));
this.highlight_down = ((o.highlight_down == undefined) ? (this.highlight_down) : (o.highlight_down));
this.highlight3D_down = ((o.highlight3D_down == undefined) ? (this.highlight3D_down) : (o.highlight3D_down));
this.shadow_down = ((o.shadow_down == undefined) ? (this.shadow_down) : (o.shadow_down));
this.darkshadow_down = ((o.darkshadow_down == undefined) ? (this.darkshadow_down) : (o.darkshadow_down));
this.arrow_down = ((o.arrow_down == undefined) ? (this.arrow_down) : (o.arrow_down));
this.face_off = ((o.face_off == undefined) ? (this.face_off) : (o.face_off));
this.highlight_off = ((o.highlight_off == undefined) ? (this.highlight_off) : (o.highlight_off));
this.highlight3D_off = ((o.highlight3D_off == undefined) ? (this.highlight3D_off) : (o.highlight3D_off));
this.shadow_off = ((o.shadow_off == undefined) ? (this.shadow_off) : (o.shadow_off));
this.darkshadow_off = ((o.darkshadow_off == undefined) ? (this.darkshadow_off) : (o.darkshadow_off));
this.arrow_off = ((o.arrow_off == undefined) ? (this.arrow_off) : (o.arrow_off));
this.scrollbar_mc.thumb_mc.base_mc.colorObj = (this.scrollbar_mc.bot_mc.up_mc.base_mc.colorObj = (this.scrollbar_mc.top_mc.up_mc.base_mc.colorObj = {face:this.face, highlight:this.highlight, highlight3D:this.highlight3D, shadow:this.shadow, darkshadow:this.darkshadow}));
this.scrollbar_mc.top_mc.down_mc.base_mc.colorObj = (this.scrollbar_mc.bot_mc.down_mc.base_mc.colorObj = {face:this.face_down, highlight:this.highlight_down, highlight3D:this.highlight3D_down, shadow:this.shadow_down, darkshadow:this.darkshadow_down});
this.scrollbar_mc.bot_mc.off_mc.base_mc.colorObj = (this.scrollbar_mc.top_mc.off_mc.base_mc.colorObj = {face:this.face_off, highlight:this.highlight_off, highlight3D:this.highlight3D_off, shadow:this.shadow_off, darkshadow:this.darkshadow_off});
this.scrollbar_mc.thumb_mc.base_mc.setColor();
this.scrollbar_mc.bot_mc.up_mc.base_mc.setColor();
this.scrollbar_mc.top_mc.up_mc.base_mc.setColor();
this.scrollbar_mc.bot_mc.down_mc.base_mc.setColor();
this.scrollbar_mc.top_mc.down_mc.base_mc.setColor();
this.scrollbar_mc.top_mc.off_mc.base_mc.setColor();
this.scrollbar_mc.bot_mc.off_mc.base_mc.setColor();
this.setClipColor(this.scrollbar_mc.bot_mc.up_mc.arrow_mc, this.arrow);
this.setClipColor(this.scrollbar_mc.top_mc.up_mc.arrow_mc, this.arrow);
this.setClipColor(this.scrollbar_mc.bot_mc.down_mc.arrow_mc, this.arrow_down);
this.setClipColor(this.scrollbar_mc.top_mc.down_mc.arrow_mc, this.arrow_down);
this.setClipColor(this.scrollbar_mc.bot_mc.off_mc.arrow_mc, this.arrow_off);
this.setClipColor(this.scrollbar_mc.top_mc.off_mc.arrow_mc, this.arrow_off);
if (this.track != undefined) {
this.setClipColor(this.scrollbar_mc.track_mc, this.track);
}
};
GWScrollBar.prototype.setClipColor = function (m, n) {
var _local1 = new Color(m);
_local1.setRGB(n);
};
#endinitclip
Instance of Symbol 366 MovieClip [GWScrollerClass] in Symbol 367 MovieClip [GWScrollBar] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
}
Symbol 368 MovieClip Frame 1
stop();
Instance of Symbol 367 MovieClip [GWScrollBar] in Symbol 368 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
horizontal = false;
face = 13947080 /* 0xD4D0C8 */;
highlight = 16777215 /* 0xFFFFFF */;
highlight3D = 13947080 /* 0xD4D0C8 */;
shadow = 8421504 /* 0x808080 */;
darkshadow = 4210752 /* 0x404040 */;
face_down = 13947080 /* 0xD4D0C8 */;
highlight_down = 13947080 /* 0xD4D0C8 */;
highlight3D_down = 8421504 /* 0x808080 */;
shadow_down = 13947080 /* 0xD4D0C8 */;
darkshadow_down = 8421504 /* 0x808080 */;
face_off = 13947080 /* 0xD4D0C8 */;
highlight_off = 16777215 /* 0xFFFFFF */;
highlight3D_off = 13947080 /* 0xD4D0C8 */;
shadow_off = 8421504 /* 0x808080 */;
darkshadow_off = 4210752 /* 0x404040 */;
arrow = 0;
arrow_down = 0;
arrow_off = 8421504 /* 0x808080 */;
track = 15527148 /* 0xECECEC */;
}
Symbol 369 MovieClip [GWLabelClass] Frame 1
#initclip 24
function GWLabelClass() {
this.fontcolor_off = 8421504 /* 0x808080 */;
this.fontcolor_shadow = 16777215 /* 0xFFFFFF */;
super.init(GWLabelClass);
}
GWLabelClass.prototype = new GWBaseClass();
Object.registerClass("GWLabelClass", GWLabelClass);
GWLabelClass.prototype.init = function () {
this.padx = this.padx || 0;
this.pady = this.pady || 0;
this.buffer = this.buffer || 2;
};
GWLabelClass.prototype.alignLabel = function (a) {
if (a == "right") {
this.label_mc._x = (this.mask_mc._width - this.label_mc._width) - this.padx;
} else if (a == "center") {
this.label_mc._x = Math.max(0, Math.round((this.width - this.label_mc._width) / 2));
} else {
this.label_mc._x = this.padx;
}
this.label_mc._y = Math.max(0, Math.round((this.height - this.label_mc._height) / 2));
this.label_mc.x = this.label_mc._x;
this.label_mc.y = this.label_mc._y;
};
GWLabelClass.prototype.gethtmlLabel = function () {
return(this.label_mc.label_txt.htmlText);
};
GWLabelClass.prototype.getLabel = function () {
return(this.label_mc.label_txt.text);
};
GWLabelClass.prototype.setLabelFormat = function (f) {
this.myFormat = f;
this.setLabel(this.gethtmlLabel());
};
GWLabelClass.prototype.setLabel = function (t) {
this.width = this.width || (this._width);
this.height = this.height || (this._height);
if (!this.label_mc) {
this.createEmptyMovieClip("label_mc", 500);
this.drawBox("mask_mc", 501, 0, 0, this.width - this.padx, this.height - this.pady, 0, 0);
}
if (!this.myFormat) {
this.myFormat = new TextFormat();
}
this.label_mc.createTextField("label_txt", 2, 0, 0, this.width, this.height);
if (this.useEmbedFonts) {
this.label_mc.label_txt.embedFonts = true;
}
this.label_mc.label_txt.selectable = false;
this.label_mc.label_txt.multiline = true;
this.label_mc.label_txt.html = true;
this.label_mc.label_txt.autoSize = "left";
this.label_mc.label_txt.htmlText = t;
this.myFormat.font = ((this.font == undefined) ? "Tahoma" : (this.font));
this.myFormat.size = this.fontsize || 11;
this.myFormat.color = this.fontcolor;
this.label_mc.label_txt.setTextFormat(this.myFormat);
if (this.fitLabel) {
this.mask_mc._width = (this.width = Math.max(this.width, ((((this.labelpos == "left") || (this.labelpos == "right")) ? (this.icon_mc._width) : 0) + this.label_mc._width) + (this.padx * 2)));
this.mask_mc._height = (this.height = Math.max(this.height, ((((this.labelpos == "top") || (this.labelpos == "bottom")) ? (this.icon_mc._height) : 0) + this.label_mc._height) + (this.pady * 2)));
this.setSize(this.width, this.height);
}
this.alignLabel(this.align);
if (this.labelpos != undefined) {
this.setLabelPlacement(this.labelpos);
}
this.setMask(this.mask_mc);
};
GWLabelClass.prototype.setLabelEnabled = function (f) {
if (f) {
this.setLabelColor(this.fontcolor);
this.label_mc.shadow_txt.text = "";
} else {
this.setLabelColor(this.fontcolor_off);
if (this.fontcolor_shadow != undefined) {
this.label_mc.createTextField("shadow_txt", 1, 1, 1, this.width, this.height);
this.label_mc.shadow_txt.autoSize = "left";
this.label_mc.shadow_txt.selectable = false;
this.label_mc.shadow_txt.html = true;
this.label_mc.shadow_txt.htmlText = this.getLabel();
this.myFormat.color = this.fontcolor_shadow;
this.label_mc.shadow_txt.setTextFormat(this.myFormat);
}
}
};
GWLabelClass.prototype.setLabelColor = function (c) {
this.myFormat.color = c || 0;
this.label_mc.label_txt.setTextFormat(this.myFormat);
};
GWLabelClass.prototype.setLabelPlacement = function (pos) {
this.labelpos = pos;
this.valign = "center";
this.align = "center";
if (pos == "left") {
this.align = "right";
this.width = Math.max(this.width, (this.label_mc._width + this.icon_mc._width) + this.buffer);
if (this.fitLabel) {
this.setSize(this.width, this.height);
}
this.label_mc._x = (this.icon_mc._x - this.label_mc._width) - this.buffer;
this.icon_mc._y = Math.round((this.height - this.icon_mc._height) / 2);
} else if (pos == "right") {
this.align = "left";
this.width = Math.max(this.width, (this.label_mc._width + this.icon_mc._width) + this.buffer);
if (this.fitLabel) {
this.setSize(this.width, this.height);
}
this.label_mc._x = (this.icon_mc._x + this.icon_mc._width) + this.buffer;
this.icon_mc._y = Math.round((this.height - this.icon_mc._height) / 2);
} else if (pos == "top") {
this.valign = "bottom";
this.width = Math.max(this.width, this._width);
this.height = Math.max(this.height, (this.label_mc._height + this.icon_mc._height) + this.buffer);
if (this.fitLabel) {
this.setSize(this.width, this.height);
}
this.label_mc._x = Math.max(0, Math.round((this.width - this.label_mc._width) / 2));
this.label_mc._y = (this.icon_mc._y - this.label_mc._height) - this.buffer;
} else if (pos == "bottom") {
this.valign = "top";
this.width = Math.max(this.width, this._width);
this.height = Math.max(this.height, (this.label_mc._height + this.icon_mc._height) + this.buffer);
if (this.fitLabel) {
this.setSize(this.width, this.height);
}
this.label_mc._x = Math.max(0, Math.round((this.width - this.label_mc._width) / 2));
this.label_mc._y = (this.icon_mc._y + this.icon_mc._height) + this.buffer;
}
};
#endinitclip
Instance of Symbol 345 MovieClip [GWBaseClass] "base" in Symbol 369 MovieClip [GWLabelClass] Frame 1
//component parameters
onClipEvent (construct) {
}
Symbol 370 MovieClip [GWListItemClass] Frame 1
#initclip 26
_global.GWListItemClass = function (o) {
super.init();
this.init();
};
GWListItemClass.prototype = new GWLabelClass();
Object.registerClass("GWListItemClass", GWListItemClass);
GWListItemClass.prototype.init = function () {
this.basecolor_on = ((this.basecolor_on == undefined) ? 664682 : (this.basecolor_on));
this.basecolor_off = ((this.basecolor_off == undefined) ? 16777215 : (this.basecolor_off));
this.basecolor_over = ((this.basecolor_over == undefined) ? 16777215 : (this.basecolor_over));
this.fontcolor_on = ((this.fontcolor_on == undefined) ? 16777215 : (this.fontcolor_on));
this.fontcolor_off = ((this.fontcolor_off == undefined) ? 0 : (this.fontcolor_off));
this.fontcolor_over = ((this.fontcolor_over == undefined) ? 0 : (this.fontcolor_over));
this.width = Math.round(this.width || (this._width));
this.height = Math.round(this.height || (this._height));
this._xscale = (this._yscale = 100);
this.drawBox("base_mc", 2, 0, 0, 1, 1, this.basecolor_off, 100);
this.base_mc._alpha = ((this.alpha == undefined) ? 100 : (this.alpha));
this.setSize(this.width, this.height);
this.setLabel(this.label);
this.setIcon(this.icon);
this.pady = 0;
this.useHandCursor = false;
};
GWListItemClass.prototype.setData = function (d) {
this.data = d;
};
GWListItemClass.prototype.getData = function () {
return(this.data);
};
GWListItemClass.prototype.setIcon = function (i) {
if (i.length) {
this.attachMovie(i, "icon_mc", 3, {_x:4});
if (this.icon_mc._height > this.height) {
this.sizeMe(this.icon_mc._width * (this.height / this.icon_mc._height), this.height, this.icon_mc);
}
this.setLabelPlacement("right");
}
};
GWListItemClass.prototype.setSize = function (w, h) {
if (!this.label_mc) {
this.createEmptyMovieClip("label_mc", 500);
this.drawBox("mask_mc", 501, 0, 0, this.width - this.padx, this.height - this.pady, 0, 0);
}
this.width = (this.base_mc._width = w);
this.height = (this.base_mc._height = h);
this.mask_mc._width = w - (this.padx * 3);
this.mask_mc._height = h - (this.pady * 2);
if (this.labelAlign == "center") {
this.label_mc._x = Math.round((this.width - this.label_mc._width) / 2);
}
};
GWListItemClass.prototype.setBaseColor = function (c) {
var _local2 = new Color(this.base_mc);
_local2.setRGB(c);
};
#endinitclip
Instance of Symbol 369 MovieClip [GWLabelClass] in Symbol 370 MovieClip [GWListItemClass] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
}
Symbol 371 MovieClip [GWListBox] Frame 1
#initclip 27
_global.GWListBox = function () {
this.pad = this.pad || 2;
this.sbSymbol = "GWScrollBar";
this.sbprops = {};
for (var _local3 in this) {
if (_local3.indexOf("sb_") != -1) {
this.sbprops[_local3.substr(3)] = this[_local3];
}
}
super.init();
};
GWListBox.prototype = new GWListBoxClass();
Object.registerClass("GWListBox", GWListBox);
#endinitclip
Instance of Symbol 346 MovieClip [GWListBoxClass] in Symbol 371 MovieClip [GWListBox] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
}
Instance of Symbol 370 MovieClip [GWListItemClass] "item_mc" in Symbol 371 MovieClip [GWListBox] Frame 1
//component parameters
onClipEvent (construct) {
}
Instance of Symbol 351 MovieClip [GWPanel] "frame_mc" in Symbol 371 MovieClip [GWListBox] Frame 1
//component parameters
onClipEvent (construct) {
face = 16777215 /* 0xFFFFFF */;
highlight = 4210752 /* 0x404040 */;
highlight3D = 8421504 /* 0x808080 */;
shadow = 13947080 /* 0xD4D0C8 */;
darkshadow = 16777215 /* 0xFFFFFF */;
}
Symbol 372 MovieClip Frame 1
stop();
Instance of Symbol 371 MovieClip [GWListBox] in Symbol 372 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
selectMultiple = false;
font = "Tahoma";
fontsize = 11;
rowHeight = 18;
checkFocus = false;
fontcolor_on = 16777215 /* 0xFFFFFF */;
fontcolor_off = 0;
fontcolor_out = 0;
itemcolor_on = 664682 /* 0x0A246A */;
itemcolor_off = 16777215 /* 0xFFFFFF */;
itemcolor_out = 14078926 /* 0xD6D3CE */;
face = 16777215 /* 0xFFFFFF */;
highlight = 4210752 /* 0x404040 */;
highlight3D = 8421504 /* 0x808080 */;
shadow = 13947080 /* 0xD4D0C8 */;
darkshadow = 16777215 /* 0xFFFFFF */;
sb_face = 13947080 /* 0xD4D0C8 */;
sb_highlight = 16777215 /* 0xFFFFFF */;
sb_highlight3D = 13947080 /* 0xD4D0C8 */;
sb_shadow = 8421504 /* 0x808080 */;
sb_darkshadow = 4210752 /* 0x404040 */;
sb_face_down = 13947080 /* 0xD4D0C8 */;
sb_highlight_down = 13947080 /* 0xD4D0C8 */;
sb_highlight3D_down = 8421504 /* 0x808080 */;
sb_shadow_down = 13947080 /* 0xD4D0C8 */;
sb_darkshadow_down = 8421504 /* 0x808080 */;
sb_face_off = 13947080 /* 0xD4D0C8 */;
sb_highlight_off = 16777215 /* 0xFFFFFF */;
sb_highlight3D_off = 13947080 /* 0xD4D0C8 */;
sb_shadow_off = 8421504 /* 0x808080 */;
sb_darkshadow_down = 4210752 /* 0x404040 */;
sb_arrow = 0;
sb_arrow_down = 0;
sb_arrow_off = 8421504 /* 0x808080 */;
sb_track = 15527148 /* 0xECECEC */;
pad = 2;
useEmbedFonts = false;
}
Symbol 373 MovieClip [GWComboBox] Frame 1
#initclip 28
_global.GWComboBox = function () {
var _local3 = {sb_face:13947080, sb_highlight:16777215, sb_highlight3D:13947080, sb_shadow:8421504, sb_darkshadow:4210752, sb_face_down:13947080, sb_highlight_down:13947080, sb_highlight3D_down:8421504, sb_shadow_down:13947080, sb_darkshadow_down:8421504, sb_face_off:13947080, sb_highlight_off:16777215, sb_highlight3D_off:13947080, sb_shadow_off:8421504, sb_darkshadow_off:4210752, sb_arrow_off:8421504};
for (var _local5 in _local3) {
if (this[_local5] == undefined) {
this[_local5] = _local3[_local5];
}
}
this.blank_mc._visible = 0;
this.pad = this.pad || 2;
this.listprops = {};
for (var _local5 in this) {
if (_local5.indexOf("sb_") != -1) {
this.listprops[_local5] = this[_local5];
}
}
this.listSymbol = "GWListBox";
super.init();
this.arrow_mc.up_mc.base_mc.colorObj = {face:this.sb_face, highlight:this.sb_highlight, highlight3D:this.sb_highlight3D, shadow:this.sb_shadow, darkshadow:this.sb_darkshadow};
this.arrow_mc.down_mc.base_mc.colorObj = {face:this.sb_face_down, highlight:this.sb_highlight_down, highlight3D:this.sb_highlight3D_down, shadow:this.sb_shadow_down, darkshadow:this.sb_darkshadow_down};
this.arrow_mc.off_mc.base_mc.colorObj = {face:this.sb_face_off, highlight:this.sb_highlight_off, highlight3D:this.sb_highlight3D_off, shadow:this.sb_shadow_off, darkshadow:this.sb_darkshadow_off};
var _local4 = new Color(this.arrow_mc.up_mc.arrow_mc);
_local4.setRGB(this.sb_arrow);
_local4 = new Color(this.arrow_mc.down_mc.arrow_mc);
_local4.setRGB(this.sb_arrow_down);
_local4 = new Color(this.arrow_mc.off_mc.arrow_mc);
_local4.setRGB(this.sb_arrow_off);
};
GWComboBox.prototype = new GWComboBoxClass();
Object.registerClass("GWComboBox", GWComboBox);
#endinitclip
Instance of Symbol 346 MovieClip [GWListBoxClass] in Symbol 373 MovieClip [GWComboBox] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
}
Instance of Symbol 347 MovieClip [GWComboBoxClass] in Symbol 373 MovieClip [GWComboBox] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
}
Instance of Symbol 351 MovieClip [GWPanel] "box_mc" in Symbol 373 MovieClip [GWComboBox] Frame 1
//component parameters
onClipEvent (construct) {
face = 16777215 /* 0xFFFFFF */;
highlight = 4210752 /* 0x404040 */;
highlight3D = 8421504 /* 0x808080 */;
shadow = 13947080 /* 0xD4D0C8 */;
darkshadow = 16777215 /* 0xFFFFFF */;
}
Symbol 374 MovieClip Frame 1
stop();
Instance of Symbol 373 MovieClip [GWComboBox] "my_cb" in Symbol 374 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
idx = "";
font = "Tahoma";
fontsize = 11;
rowHeight = 18;
rowCount = 8;
useEdgeScroll = true;
listPos = "bottom";
listborder = 6710886 /* 0x666666 */;
face = 0;
highlight = 4210752 /* 0x404040 */;
highlight3D = 8421504 /* 0x808080 */;
shadow = 4210752 /* 0x404040 */;
darkshadow = 8421504 /* 0x808080 */;
fontcolor = 16777215 /* 0xFFFFFF */;
fontcolor_on = 16761856 /* 0xFFC400 */;
fontcolor_off = 16777215 /* 0xFFFFFF */;
itemcolor_on = 3355443 /* 0x333333 */;
itemcolor_off = 0;
sb_face = 6710886 /* 0x666666 */;
sb_highlight = 6710886 /* 0x666666 */;
sb_highlight3D = 6710886 /* 0x666666 */;
sb_shadow = 10066329 /* 0x999999 */;
sb_darkshadow = 6710886 /* 0x666666 */;
sb_face_down = 6710886 /* 0x666666 */;
sb_highlight_down = 10066329 /* 0x999999 */;
sb_highlight3D_down = 6710886 /* 0x666666 */;
sb_shadow_down = 6710886 /* 0x666666 */;
sb_darkshadow_down = 8421504 /* 0x808080 */;
sb_face_off = 8421504 /* 0x808080 */;
sb_highlight_off = 8421504 /* 0x808080 */;
sb_highlight3D_off = 8421504 /* 0x808080 */;
sb_shadow_off = 8421504 /* 0x808080 */;
sb_darkshadow_off = 8421504 /* 0x808080 */;
sb_arrow = 16777215 /* 0xFFFFFF */;
sb_arrow_down = 16777215 /* 0xFFFFFF */;
sb_arrow_off = 16777215 /* 0xFFFFFF */;
sb_track = 3355443 /* 0x333333 */;
useEmbedFonts = false;
pad = 2;
listpad = 1;
cbDepth = 17000;
spawnAtRoot = false;
}
Symbol 377 MovieClip Frame 1
txt_info = "YOUR SCORE " + _root.x1025;
Symbol 377 MovieClip Frame 26
function is_Empty(string) {
if (((string == "") || (string == undefined)) || (string == null)) {
return(true);
}
return(false);
}
function makeCountries() {
i = 0;
while (i < countries.length) {
countriesArray.push({data:countries[i][0], label:countries[i][1]});
i++;
}
form.my_cb.setDataProvider(countriesArray);
form.my_cb.select(0);
form.my_cb.onSelect = function (index) {
if (index != 0) {
country = countriesArray[index].data;
}
};
}
function is_null(string) {
if (((string == null) || (string == undefined)) || (string == "")) {
return("null");
}
return(string);
}
function submit(user, email) {
trace("submitting");
trace(_root.x1025);
score = _root.x1025;
score2 = is_null(_root.x1026);
img = country;
user = user.replace("|", "");
user = user.replace(",", "");
rc4_text = email + "|";
rc4_text = rc4_text + (user + "|");
rc4_text = rc4_text + (((score + "|") + score.toString(10).checksum()) + "|");
rc4_text = rc4_text + (((score2 + "|") + score2.toString(10).checksum()) + "|");
rc4_text = rc4_text + (((img + "|") + img.toString(10).checksum()) + "|");
rc4_text = rc4_text + email.checksum();
rc4_key = "topgun";
_root.rc4_hash = com.meychi.ascrypt.RC4.encrypt(rc4_text, rc4_key);
local_data.data.user_name = user;
local_data.data.user_email = email;
local_data.flush();
}
String.prototype.replace = function (pattern, replacement) {
return(this.split(pattern).join(replacement));
};
String.prototype.isEmail = function () {
var _local6 = "Invalid email address";
var _local3 = this;
var _local2 = new Array("@", ".");
var _local4 = new Array();
i = 0;
while (i < 200) {
if (((((((i >= 33) && (i <= 45)) || (i == 47)) || ((i >= 58) && (i <= 63))) || ((i > 91) && (i <= 96))) || ((i >= 123) && (i <= 126))) || ((i >= 161) && (i <= 199))) {
var _local5 = String.fromCharCode(i);
_local4.push(_local5);
}
i++;
}
i = 0;
while (i < _local4.length) {
if (_local3.indexOf(_local4[i]) != -1) {
var _local5 = _local4[i];
return(false);
}
i++;
}
i = 0;
while (i < _local2.length) {
if (_local3.indexOf(_local2[i]) != -1) {
index = _local3.indexOf(_local2[i]);
if ((_local3.indexOf(_local2[i], index + 1) != -1) && (_local2[i] != ".")) {
return(false);
}
} else {
return(false);
}
i++;
}
return(true);
};
String.prototype.checksum = function () {
sum = 0;
i = 0;
while (i < this.length) {
sum = sum + this.charCodeAt(i);
i++;
}
return(sum);
};
_global.countries = [[null, "Select Your Country"], ["AF", "Afghanistan"], ["AL", "Albania"], ["DZ", "Algeria"], ["AS", "American Samoa"], ["AG", "Antigua Barbuda"], ["AR", "Argentina"], ["AU", "Australia"], ["AT", "Austria"], ["AZ", "Azerbaijan"], ["BH", "Bahrain"], ["BD", "Bangladesh"], ["BB", "Barbados"], ["BY", "Belarus"], ["BE", "Belgium"], ["BZ", "Belize"], ["BJ", "Benin"], ["BM", "Bermuda"], ["BT", "Bhutan"], ["BO", "Bolivia"], ["BA", "Bosnia Herzegovina"], ["BW", "Botswana"], ["BR", "Brazil"], ["BN", "Brunei"], ["BG", "Bulgaria"], ["BF", "Burkina Faso"], ["BI", "Burundi"], ["KH", "Cambodia"], ["CM", "Cameroon"], ["CA", "Canada"], ["CV", "Cape Verde"], ["KY", "Cayman Islands"], ["CF", "Cent African Rep"], ["TD", "Chad"], ["JI", "Channel Islands"], ["CL", "Chile"], ["CN", "China"], ["CO", "Columbia"], ["KM", "Comoros"], ["CG", "Congo"], ["CK", "Cook Islands"], ["CR", "Costa Rica"], ["HR", "Croatia"], ["CU", "Cuba"], ["CY", "Cyprus"], ["CZ", "Czech Republic"], ["DK", "Denmark"], ["DM", "Dominica"], ["DO", "Dominican Republic"], ["TL", "East Timor"], ["EC", "Ecuador"], ["EG", "Egypt"], ["SV", "El Salvador"], ["GQ", "Equatorial Guinea"], ["ER", "Eritrea"], ["EE", "Estonia"], ["ET", "Ethiopia"], ["FJ", "Fiji"], ["FI", "Finland"], ["FR", "France"], ["GF", "French Guiana"], ["PF", "French Polynesia"], ["GM", "Gambia"], ["GE", "Georgia"], ["DE", "Germany"], ["GH", "Ghana"], ["GI", "Gibraltar"], ["GR", "Greece"], ["GL", "Greenland"], ["GD", "Grenada"], ["GP", "Guadeloupe"], ["GU", "Guam"], ["GT", "Guatemala"], ["GW", "Guinea Bissau"], ["GY", "Guyana"], ["HT", "Haiti"], ["HW", "Hawaii"], ["HN", "Honduras"], ["HK", "Hong Kong"], ["HU", "Hungary"], ["IS", "Iceland"], ["IN", "India"], ["ID", "Indonesia"], ["IR", "Iran"], ["IQ", "Iraq"], ["IE", "Ireland"], ["IM", "Isle of Man"], ["IL", "Israel"], ["IT", "Italy"], ["CI", "Ivory Coast"], ["JM", "Jamaica"], ["JP", "Japan"], ["JO", "Jordan"], ["KZ", "Kazakhstan"], ["KE", "Kenya"], ["KS", "Korea South"], ["KW", "Kuwait"], ["KG", "Kyrgyzstan"], ["LA", "Laos"], ["LV", "Latvia"], ["LB", "Lebanon"], ["LS", "Lesotho"], ["LR", "Liberia"], ["LY", "Libya"], ["LI", "Liechtenstein"], ["LT", "Lithuania"], ["LU", "Luxembourg"], ["MO", "Macau"], ["MK", "Macedonia"], ["MG", "Madagascar"], ["MW", "Malawi"], ["MY", "Malaysia"], ["MV", "Maldives"], ["ML", "Mali"], ["MT", "Malta"], ["MQ", "Martinique"], ["MU", "Mauritius"], ["YT", "Mayotte"], ["MX", "Mexico"], ["MD", "Moldova"], ["MC", "Monaco"], ["MN", "Mongolia"], ["MS", "Montserrat"], ["MA", "Morocco"], ["MZ", "Mozambique"], ["MM", "Myanmar"], ["NA", "Namibia"], ["NR", "Nauru"], ["NP", "Nepal"], ["NL", "Netherlands"], ["NC", "New Caledonia"], ["NZ", "New Zealand"], ["NI", "Nicaragua"], ["NE", "Niger"], ["NG", "Nigeria"], ["NO", "Norway"], ["OM", "Oman"], ["PK", "Pakistan"], ["PA", "Panama"], ["PG", "Papua New Guinea"], ["PY", "Paraguay"], ["PE", "Peru"], ["PH", "Philippines"], ["PN", "Pitcairn Island"], ["PL", "Poland"], ["PT", "Portugal"], ["PR", "Puerto Rico"], ["QA", "Qatar"], ["RE", "Reunion"], ["RO", "Romania"], ["RU", "Russia"], ["RW", "Rwanda"], ["SM", "San Marino"], ["ST", "Sao Tome Principe"], ["SA", "Saudi Arabia"], ["SN", "Senegal"], ["CS", "Serbia Montenegro"], ["SL", "Sierra Leone"], ["SG", "Singapore"], ["SK", "Slovakia"], ["SI", "Slovenia"], ["SB", "Solomon Islands"], ["SO", "Somalia"], ["ZA", "South Africa"], ["ES", "Spain"], ["LK", "Sri Lanka"], ["SH", "St Helena"], ["KN", "St Kitts-Nevis"], ["LC", "St Lucia"], ["MB", "St Maarten"], ["PM", "St Pierre Miquelon"], ["VC", "St Vincent Grenadines"], ["SD", "Sudan"], ["SR", "Suriname"], ["SZ", "Swaziland"], ["SE", "Sweden"], ["CH", "Switzerland"], ["SY", "Syria"], ["TA", "Tahiti"], ["TW", "Taiwan"], ["TJ", "Tajikistan"], ["TZ", "Tanzania"], ["TH", "Thailand"], ["TG", "Togo"], ["TT", "Trinidad Tobago"], ["TN", "Tunisia"], ["TR", "Turkey"], ["TM", "Turkmenistan"], ["UA", "Ukraine"], ["AE", "UAE"], ["GB", "United Kingdom"], ["US", "USA"], ["UY", "Uruguay"], ["UZ", "Uzbekistan"], ["VU", "Vanuatu"], ["VE", "Venezuela"], ["VN", "Vietnam"], ["VI", "Virgin Islands"], ["EH", "Western Sahara"], ["ZM", "Zambia"], ["ZW", "Zimbabwe"]];
var countriesArray = [];
var country = null;
var defaultTextName = "Enter your name";
var defaultTextEmail = "Enter email (optional)";
form.txtName.text = defaultTextName;
form.txtEmail.text = defaultTextEmail;
trace(form.txtName);
form.txtName.onSetFocus = function () {
if (this.text == defaultTextName) {
this.text = "";
}
};
form.txtEmail.onSetFocus = function () {
if (this.text == defaultTextEmail) {
this.text = "";
}
};
makeCountries();
local_data = SharedObject.getLocal("user_data");
stored_user_name = local_data.data.user_name;
stored_user_email = local_data.data.user_email;
if (!is_Empty(stored_user_name)) {
form.txtName.text = stored_user_name;
}
if (!is_Empty(stored_user_email)) {
form.txtEmail.text = stored_user_email;
}
txt_info = "YOUR SCORE " + _root.x1025;
form.btnSubmit.onRelease = function () {
trace("validating");
trace(form.txtName.text);
if ((form.txtName.text.length > 0) && (form.txtName.text != defaultTextName)) {
if ((form.txtEmail.text.isEmail() || (form.txtEmail.text == defaultTextEmail)) || (form.txtEmail.text.length == 0)) {
if (form.txtEmail.text == defaultTextEmail) {
submitMail = "";
} else {
submitMail = form.txtEmail.text;
}
if (country != null) {
submit(form.txtName.text, submitMail);
gotoAndPlay ("submitdata");
} else {
form.txtWarning.text = "Please select a country";
}
} else {
form.txtWarning.text = "Please enter a valid email";
}
} else {
form.txtWarning.text = "Please enter your name";
}
};
stop();
Symbol 377 MovieClip Frame 27
this.createEmptyMovieClip("xj22", 1);
xj22.xj25 = _root.rc4_hash;
xj22.loadVariables("http://www.markfennell.com/flash/premiere/submit.php", "POST");
xj22.onEnterFrame = function () {
if (this.Loaded == "done") {
if (this.msg != undefined) {
txt_info = this.msg.toUpperCase();
}
accessing._visible = false;
delete this.onEnterFrame;
}
};
stop();