Frame 1
function createStattooz(thisSkin, thisDomain, thisHosted) {
_root.Stattooz = new stattooz(myGameName, myDeveloper, myGenre, myGameType, thisSkin, myPlayer, myThreshold, thisDomain);
_root.Stattooz.reportEvent("load");
}
function createBranditz() {
_root.Branditz = new branditz(myGameName, myGameType, myGameWidth, myGameHeight, createStattooz);
}
function initialize() {
var _local1 = new expressinstall();
if (!_local1.init()) {
createBranditz();
}
}
stop();
var myGameName = "derailed";
var myDeveloper = "3RDsense";
var myGenre = 5;
var myGameType = 1;
var myGameWidth = 640;
var myGameHeight = 480;
var myThreshold = 2000;
_root.score = 0;
_root.startGame = function () {
_root.gotoAndStop("menu");
};
_root.playAgain = function () {
_root.gotoAndStop("menu");
};
System.security.allowDomain("*");
_root.checkPirate = function () {
_root.Branditz.pHosted = ((_root.Branditz.pHosted == undefined) ? (_root.Stattooz.isDomainAllowed()) : (_root.Branditz.pHosted));
if ((System.capabilities.playerType == "External") || (_root.Stattooz.isDomainAllowed())) {
_root.Branditz.pHosted = true;
} else {
((myGameType != 1) ? (getURL ("javascript:if (top.location != location) top.location.href ='http://www.fizzy.com/';")) : null);
}
_root.Branditz.pLinkWindow = (_root.Branditz.pHosted ? "_self" : "_blank");
var _local2 = false;
if (myGameType == 1) {
_local2 = true;
} else {
_local2 = _root.Branditz.pHosted;
}
if (_local2) {
_root.startGame();
} else {
_root.reportEvent("pirate");
_root.gotoAndStop("pirate");
}
};
_root.loadComplete = function () {
_root.gotoAndStop("splash");
};
var myPlayer = System.capabilities.playerType;
initialize();
Frame 9
stop();
Frame 18
stop();
Frame 27
stop();
Frame 40
stop();
Frame 48
stop();
Frame 49
function makeVisible(bool) {
this.start._visible = bool;
this.inlet._visible = bool;
this.outlet._visible = bool;
this.first._visible = bool;
this.second._visible = bool;
this.third._visible = bool;
this.board._visible = bool;
this.diagonal._visible = bool;
this.buttons._visible = bool;
this.scores._visible = bool;
}
function from(str, frame, rotation) {
if (frame == 1) {
return("X");
}
if ((frame == 2) || (frame == 13)) {
if (rotation == 0) {
switch (str) {
case "L" :
return("B");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("L");
if (rotation == 90) {
switch (str) {
case "L" :
return("T");
case "R" :
return("X");
case "T" :
return("L");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("T");
case "R" :
return("X");
case "T" :
return("L");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("B");
case "T" :
return("X");
case "B" :
return("R");
}
return("X");
}
if (((frame == 3) || (frame == 12)) || (frame == 14)) {
if (rotation == 0) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
return("X");
}
if ((frame == 4) || (frame == 11)) {
if (rotation == 0) {
switch (str) {
case "L" :
return("B");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("L");
if (rotation == 90) {
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
if (rotation == 180) {
switch (str) {
case "L" :
return("B");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("L");
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("B");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("L");
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
if (rotation == 180) {
switch (str) {
case "L" :
return("B");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("L");
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("B");
case "R" :
return("T");
case "T" :
return("R");
case "B" :
return("L");
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
}
}
switch (str) {
case "L" :
return("T");
case "R" :
return("B");
case "T" :
return("L");
case "B" :
return("R");
}
return("X");
}
if (frame == 5) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("B");
case "B" :
return("T");
}
return("X");
}
if (frame == 6) {
if (rotation == 0) {
switch (str) {
case "L" :
return("R");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("X");
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
return("X");
}
if (frame == 7) {
if (rotation == 0) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
return("X");
}
if (frame == 8) {
if (rotation == 0) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("R");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("T");
}
return("X");
}
if (frame == 9) {
if (rotation == 0) {
switch (str) {
case "L" :
return("R");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("X");
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
return("X");
}
if (frame == 10) {
if (rotation == 0) {
switch (str) {
case "L" :
return("R");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("X");
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 90) {
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("B");
case "B" :
return("X");
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
if (rotation == 180) {
switch (str) {
case "L" :
return("X");
case "R" :
return("L");
case "T" :
return("X");
case "B" :
return("X");
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
}
}
switch (str) {
case "L" :
return("X");
case "R" :
return("X");
case "T" :
return("X");
case "B" :
return("T");
}
return("X");
}
}
function rotatable(frame) {
switch (frame) {
case 2 :
case 3 :
case 4 :
case 7 :
case 11 :
case 12 :
case 13 :
case 14 :
return(true);
case 5 :
case 6 :
case 8 :
case 9 :
case 10 :
return(false);
}
return(false);
}
makeVisible(false);
Instance of Symbol 309 MovieClip "scores" in Frame 49
onClipEvent (enterFrame) {
this.level.text = _global.level;
this.lives.text = _global.lives;
this.fuel.text = _global.fuel;
this.totalscore.text = _global.score;
this.roundscore.text = _global.roundscore;
}
Frame 50
function showMenu() {
makeVisible(false);
removeMovieClip(this.train1);
removeMovieClip(this.train2);
removeMovieClip(this.train3);
removeMovieClip(this.train);
var _local4 = 1;
while (_local4 <= _global.carriages) {
removeMovieClip(this["carriage" + _local4]);
removeMovieClip(this["carriage1-" + _local4]);
removeMovieClip(this["carriage2-" + _local4]);
removeMovieClip(this["carriage3-" + _local4]);
_local4++;
}
if (!_global.lost) {
destroy_game();
var _local7 = _global.oldcarriages;
var _local9 = _global.oldspeed;
var _local8 = _global.roundscore * _global.multiplier;
_global.score = _global.score + (_global.roundscore * _global.multiplier);
_global.roundscore = 0;
_global.multiplier = 1;
_global.fuel = 100;
_global.level++;
if ((_root.Stattooz.pGameType == 1) && (_global.level > 6)) {
gotoAndPlay ("gameover");
}
switch (_global.level) {
case 1 :
_global.speed = 3;
_global.carriages = 3;
_global.gridX = 3;
_global.gridY = 3;
break;
case 2 :
_global.speed = 3;
_global.carriages = 4;
_global.gridX = 4;
_global.gridY = 4;
break;
case 3 :
_global.speed = 3;
_global.carriages = 4;
_global.gridX = 5;
_global.gridY = 5;
break;
case 4 :
_global.speed = 3;
_global.carriages = 4;
_global.gridX = 6;
_global.gridY = 6;
break;
case 5 :
_global.speed = 6;
_global.carriages = 4;
_global.gridX = 6;
_global.gridY = 6;
break;
case 6 :
_global.speed = 4;
_global.carriages = 5;
_global.gridX = 7;
_global.gridY = 7;
break;
case 7 :
_global.speed = 7;
_global.carriages = 5;
_global.gridX = 7;
_global.gridY = 7;
break;
case 8 :
_global.speed = 5;
_global.carriages = 6;
_global.gridX = 8;
_global.gridY = 8;
break;
case 9 :
_global.speed = 7;
_global.carriages = 6;
_global.gridX = 8;
_global.gridY = 8;
break;
case 10 :
_global.speed = 5;
_global.carriages = 5;
_global.gridX = 9;
_global.gridY = 9;
break;
case 11 :
_global.speed = 5;
_global.carriages = 6;
_global.gridX = 9;
_global.gridY = 9;
break;
case 12 :
_global.speed = 6;
_global.carriages = 6;
_global.gridX = 9;
_global.gridY = 9;
break;
default :
_global.speed = Math.round(_global.level / 2);
_global.carriages = Math.round((_global.level + 1) / 2);
_global.gridX = 10;
_global.gridY = 10;
}
_global.needed = new Array();
_global.maxim = new Array();
_local4 = 1;
while (_local4 < 1000) {
_global.maxim[_local4] = 1000000000 /* 0x3B9ACA00 */;
_local4++;
}
if (_global.level < 4) {
_global.needed[1] = 600;
_global.needed[2] = 300;
_global.needed[3] = 300;
_global.needed[4] = 150;
_global.needed[5] = 50;
_global.needed[6] = 20;
_global.needed[7] = 10;
_global.needed[8] = 2;
_global.needed[9] = 2;
_global.needed[10] = 40;
_global.needed[11] = 0;
_global.needed[12] = 0;
_global.needed[13] = 2;
} else if (_global.level <= 8) {
_global.needed[1] = 600;
_global.needed[2] = 300;
_global.needed[3] = 800;
_global.needed[4] = 150;
_global.needed[5] = 50;
_global.needed[6] = 30;
_global.needed[7] = 10;
_global.needed[8] = 10;
_global.needed[9] = 10;
_global.needed[10] = 20;
_global.needed[11] = 0;
_global.needed[12] = 0;
_global.needed[13] = 5;
} else {
_global.needed[1] = 600;
_global.needed[2] = 300;
_global.needed[3] = 800;
_global.needed[4] = 150;
_global.needed[5] = 50;
_global.needed[6] = 20;
_global.needed[7] = 50;
_global.needed[8] = 30;
_global.needed[9] = 40;
_global.needed[10] = 0;
_global.needed[11] = 10;
_global.needed[12] = 50;
_global.needed[13] = 30;
}
if (_global.level == 1) {
this.themenu.white.title1.text = "Instructions";
this.themenu.white.box1.text = "Rotate the tiles to guide the train to its destination.";
this.themenu.white.title2.text = "First Level";
this.themenu.white.box2.text = ("Level " + _global.level) + newline;
this.themenu.white.box2.text = this.themenu.white.box2.text + (("Carriages: " + _global.carriages) + newline);
this.themenu.white.box2.text = this.themenu.white.box2.text + (("Speed: " + (_global.speed * 10)) + " mph\n");
} else {
this.themenu.white.title1.text = "Last Level";
this.themenu.white.box1.text = ("Level: " + (_global.level - 1)) + newline;
this.themenu.white.box1.text = this.themenu.white.box1.text + (("Level Score: " + _local8) + newline);
this.themenu.white.box1.text = this.themenu.white.box1.text + (("Total Score: " + _global.score) + newline);
this.themenu.white.title2.text = "Next Level";
this.themenu.white.box2.text = ("Level: " + _global.level) + newline;
if (_global.carriages == _global.oldcarriages) {
this.themenu.white.box2.text = this.themenu.white.box2.text + (("Carriages: " + _global.carriages) + newline);
} else {
this.themenu.white.box2.text = this.themenu.white.box2.text + ((((("Carriages: " + _global.carriages) + " (") + (((_global.carriages - _global.oldcarriages) > 0) ? "+" : "")) + (_global.carriages - _local7)) + ")\n");
}
if (_global.speed == _global.oldspeed) {
this.themenu.white.box2.text = this.themenu.white.box2.text + (("Speed: " + (_global.speed * 10)) + " mph\n");
} else {
this.themenu.white.box2.text = this.themenu.white.box2.text + ((((("Speed: " + (_global.speed * 10)) + " mph (") + (((_global.speed - _global.oldspeed) > 0) ? "+" : "")) + ((_global.speed - _global.oldspeed) * 10)) + ")");
}
}
this.themenu.gotoAndPlay("open");
} else {
var _local5 = 0;
while (_local5 < _global.gridY) {
_local4 = 0;
while (_local4 < _global.gridX) {
if (rotatable(this[("tile" + _local4) + _local5]._currentframe)) {
this[("tile" + _local4) + _local5].onPress = function () {
this._rotation = this._rotation + 90;
sound = new Sound(this);
sound.attachSound("lever");
sound.setVolume(10);
sound.start(0, 1);
};
}
this[("tile" + _local4) + _local5]._visible = false;
_local4++;
}
_local5++;
}
var _local6 = _global.fuel;
_global.roundscore = 0;
_global.multiplier = 1;
_global.lives--;
if (_global.lives == 0) {
gotoAndPlay ("gameover");
} else {
_global.fuel = 100;
}
_global.speed = _global.oldspeed;
this.themenu.white.title1.text = "Instructions";
if (_local6 == 0) {
this.themenu.white.box1.text = "Bad luck! You ran out of fuel.";
} else {
this.themenu.white.box1.text = "Bad luck! You derailed the train.";
}
this.themenu.white.title2.text = "Current Level";
this.themenu.white.box2.text = ("Level " + _global.level) + newline;
this.themenu.white.box2.text = this.themenu.white.box2.text + (("Carriages: " + _global.carriages) + newline);
this.themenu.white.box2.text = this.themenu.white.box2.text + (("Speed: " + (_global.speed * 10)) + " mph\n");
this.themenu.gotoAndPlay("open");
}
var _local5 = 0;
while (_local5 < _global.gridY) {
_local4 = 0;
while (_local4 < _global.gridX) {
this[("tile" + _local4) + _local5].used = false;
this[("tile" + _local4) + _local5].pipe.gotoAndStop(1);
this[("tile" + _local4) + _local5].ontop = false;
_local4++;
}
_local5++;
}
_global.pauze = false;
_global.oldspeed = _global.speed;
_global.oldcarriages = _global.carriages;
}
function prepare_train() {
if (_global.lives > 0) {
this.attachMovie("train", "train3", this.getNextHighestDepth(), {_x:Stage.width - 100, _y:(this.start._y - this.start._height) + 8});
this.train3._xscale = this.train3._xscale * -1;
var _local3 = 1;
while (_local3 <= _global.carriages) {
this.attachMovie("carriage", "carriage3-" + _local3, this.getNextHighestDepth(), {_x:(Stage.width - 130) + ((_local3 + 1) * 33), _y:(this.start._y - this.start._height) + 8});
this["carriage3-" + _local3]._xscale = this["carriage3-" + _local3]._xscale * -1;
_local3++;
}
}
if (_global.lives > 1) {
this.attachMovie("train", "train2", this.getNextHighestDepth(), {_x:Stage.width - 100, _y:this.second._y + 6});
this.train2._xscale = this.train2._xscale * -1;
var _local3 = 1;
while (_local3 <= _global.carriages) {
this.attachMovie("carriage", "carriage2-" + _local3, this.getNextHighestDepth(), {_x:(Stage.width - 130) + ((_local3 + 1) * 33), _y:this.second._y + 6});
this["carriage2-" + _local3]._xscale = this["carriage2-" + _local3]._xscale * -1;
_local3++;
}
}
if (_global.lives > 2) {
this.attachMovie("train", "train1", this.getNextHighestDepth(), {_x:Stage.width - 100, _y:this.third._y + 6});
this.train1._xscale = this.train1._xscale * -1;
var _local3 = 1;
while (_local3 <= _global.carriages) {
this.attachMovie("carriage", "carriage1-" + _local3, this.getNextHighestDepth(), {_x:(Stage.width - 130) + ((_local3 + 1) * 33), _y:this.third._y + 6});
this["carriage1-" + _local3]._xscale = this["carriage1-" + _local3]._xscale * -1;
_local3++;
}
}
_global.trainX = new Array();
_global.trainY = new Array();
_global.trainDir = new Array();
var _local3 = 0;
while (_local3 <= _global.carriages) {
_global.trainX[_local3] = 0;
_global.trainY[_local3] = -1;
_global.trainDir[_local3] = "B";
_local3++;
}
if (_global.lives == 3) {
this.train = this.train1;
_local3 = 1;
while (_local3 <= _global.carriages) {
this["carriage" + _local3] = this["carriage1-" + _local3];
this["carriage" + _local3]._xscale = this["carriage" + _local3]._xscale * -1;
this["carriage" + _local3].nr = _local3;
_local3++;
}
}
if (_global.lives == 2) {
this.train = this.train2;
_local3 = 1;
while (_local3 <= _global.carriages) {
this["carriage" + _local3] = this["carriage2-" + _local3];
this["carriage" + _local3]._xscale = this["carriage" + _local3]._xscale * -1;
this["carriage" + _local3].nr = _local3;
_local3++;
}
}
if (_global.lives == 1) {
this.train = this.train3;
_local3 = 1;
while (_local3 <= _global.carriages) {
this["carriage" + _local3] = this["carriage3-" + _local3];
this["carriage" + _local3]._xscale = this["carriage" + _local3]._xscale * -1;
this["carriage" + _local3].nr = _local3;
_local3++;
}
}
if (_global.lives == 0) {
}
this.train._xscale = this.train._xscale * -1;
this.train.nr = 0;
_global.mypath = new Array();
_local3 = 0;
while (_local3 <= _global.carriages) {
if (_local3 == 0) {
_global.mypath[_local3] = new Path(this.train._x, this.train._y);
} else {
_global.mypath[_local3] = new Path((this.train._x - 30) + ((_local3 + 1) * 33), this.train._y);
}
_local3++;
}
if (_global.lives == 1) {
} else if (_global.lives == 2) {
_local3 = 0;
while (_local3 <= _global.carriages) {
_global.mypath[_local3].lineTo(this.second._x, this.train._y);
_global.mypath[_local3].lineTo(this.first._x, (this.start._y - this.start._height) + 8);
_local3++;
}
} else {
_local3 = 0;
while (_local3 <= _global.carriages) {
_global.mypath[_local3].lineTo(this.third._x, this.train._y);
_global.mypath[_local3].lineTo(this.first._x, (this.start._y - this.start._height) + 8);
_local3++;
}
}
_local3 = 0;
while (_local3 <= _global.carriages) {
_global.mypath[_local3].lineTo(this.start._x + 23, (this.start._y - this.start._height) + 8);
_global.mypath[_local3].circleCCWTo(this.start._x + 7, this.start._y, 0.25);
_global.mypath[_local3].lineTo(_global.boardX, this.inlet._y);
_local3++;
}
_global.t = new Array();
_local3 = 0;
while (_local3 <= _global.carriages) {
_global.t[_local3] = 0;
_local3++;
}
this.train.onEnterFrame = function () {
if (!_global.pauze) {
_global.t[0] = _global.t[0] + (_global.speed / (_global.mypath[0]._length * 5));
_global.mypath[0].traverse(this, _global.t[0], true, false);
if (_global.t[0] >= 1) {
_global.mypath[0].traverse(this, 1, true, false);
endOfTile(this.nr);
}
if ((_global.timeout != null) && (_global.timeout >= 1)) {
_global.timeout++;
if (_global.timeout > 50) {
_global.timeout = 0;
end_win();
}
}
}
};
_local3 = 1;
while (_local3 <= _global.carriages) {
this["carriage" + _local3].onEnterFrame = function () {
if (!_global.pauze) {
_global.t[this.nr] = _global.t[this.nr] + (_global.speed / (_global.mypath[this.nr]._length * 5));
_global.mypath[this.nr].traverse(this, _global.t[this.nr], true, false);
if (_global.t[this.nr] >= 1) {
_global.mypath[this.nr].traverse(this, 1, true, false);
endOfTile(this.nr);
}
if ((_global.timeout != null) && (_global.timeout >= 1)) {
_global.timeout++;
if (_global.timeout > 80) {
_global.timeout = 0;
end_win();
}
}
}
};
_local3++;
}
}
function endOfTile(nr) {
var _local4;
var _local5;
var _local7 = _global.trainDir[nr];
switch (_global.trainDir[nr]) {
case "B" :
_global.trainDir[nr] = "T";
_global.trainY[nr]++;
_local4 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._x;
_local5 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._y - 20;
break;
case "T" :
_global.trainDir[nr] = "B";
_global.trainY[nr]--;
_local4 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._x;
_local5 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._y + 20;
break;
case "L" :
_global.trainDir[nr] = "R";
_global.trainX[nr]--;
_local4 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._x + 20;
_local5 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._y;
break;
case "R" :
_global.trainDir[nr] = "L";
_global.trainX[nr]++;
_local4 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._x - 20;
_local5 = this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._y;
}
if (_local4 == null) {
if (nr == 0) {
_local4 = train._x;
_local5 = train._y;
} else {
_local4 = this["carriage" + nr]._x;
_local5 = this["carriage" + nr]._y;
}
}
if (this[("tile" + _global.trainX[nr]) + _global.trainY[nr]] == null) {
if ((_global.trainX[nr] == (_global.gridX - 1)) && (_global.trainY[nr] == _global.gridY)) {
_global.t[nr] = 0;
_global.mypath[nr].clear();
_global.mypath[nr].moveTo(_local4, _local5);
_global.mypath[nr].lineTo(_local4, (this.outlet._y + this.outlet._height) + 10000);
_global.timeout = 1;
} else {
end_crash();
}
} else {
var _local6 = from(_global.trainDir[nr], this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._currentframe, this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._rotation);
if (_local6 == "X") {
end_crash();
} else {
if (nr == 0) {
trace("in1");
if (this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._currentframe == 5) {
trace("in2");
if (this[("tile" + _global.trainX[nr]) + _global.trainY[nr]].ontop) {
trace("crash in CROSS");
end_crash();
}
}
}
if (nr == 0) {
if (!this[("tile" + _global.trainX[nr]) + _global.trainY[nr]].used) {
if (_global.speed != _global.flush_speed) {
show_score(_local4, _local5, 50, _global.level * _global.speed);
} else {
show_score(_local4, _local5, 50, _global.level * (_global.speed / 2));
}
this[("tile" + _global.trainX[nr]) + _global.trainY[nr]].used = true;
}
_global.fuel--;
if (_global.fuel <= 0) {
end_crash();
}
}
check_bonus(nr, _global.trainX[nr], _global.trainY[nr]);
_global.t[nr] = 0;
_global.mypath[nr].clear();
_global.mypath[nr].moveTo(_local4, _local5);
if (_local7 == _local6) {
if (_local6 == "B") {
_global.mypath[nr].lineTo(_local4, _local5 + 40);
} else if (_local6 == "T") {
_global.mypath[nr].lineTo(_local4, _local5 - 40);
} else if (_local6 == "L") {
_global.mypath[nr].lineTo(_local4 - 40, _local5);
} else {
_global.mypath[nr].lineTo(_local4 + 40, _local5);
}
} else {
switch (_global.trainDir[nr]) {
case "T" :
if (_local6 == "L") {
_global.mypath[nr].circleCWTo(_local4 - 20, _local5 + 20, 0.25);
}
if (_local6 == "R") {
_global.mypath[nr].circleCCWTo(_local4 + 20, _local5 + 20, 0.25);
}
break;
case "B" :
if (_local6 == "L") {
_global.mypath[nr].circleCCWTo(_local4 - 20, _local5 - 20, 0.25);
}
if (_local6 == "R") {
_global.mypath[nr].circleCWTo(_local4 + 20, _local5 - 20, 0.25);
}
break;
case "L" :
if (_local6 == "T") {
_global.mypath[nr].circleCCWTo(_local4 + 20, _local5 - 20, 0.25);
}
if (_local6 == "B") {
_global.mypath[nr].circleCWTo(_local4 + 20, _local5 + 20, 0.25);
}
break;
case "R" :
if (_local6 == "T") {
_global.mypath[nr].circleCWTo(_local4 - 20, _local5 - 20, 0.25);
}
if (_local6 != "B") {
break;
}
_global.mypath[nr].circleCCWTo(_local4 - 20, _local5 + 20, 0.25);
}
}
if (nr == 0) {
delete this[("tile" + _global.trainX[nr]) + _global.trainY[nr]].onPress;
this[("tile" + _global.trainX[nr]) + _global.trainY[nr]].ontop = true;
} else if (nr == _global.carriages) {
this[("tile" + _global.trainX[nr]) + _global.trainY[nr]].ontop = false;
if (rotatable(this[("tile" + _global.trainX[nr]) + _global.trainY[nr]]._currentframe)) {
this[("tile" + _global.trainX[nr]) + _global.trainY[nr]].onPress = function () {
this._rotation = this._rotation + 90;
};
}
}
_global.trainDir[nr] = _local6;
}
}
}
function end_crash() {
trace("END CRASH");
delete train.onEnterFrame;
stopSounds();
if (_global.fuel != 0) {
train.inside.gotoAndStop(2);
sound = new Sound(this);
sound.attachSound("explosion");
sound.setVolume(40);
sound.start(0, 1);
}
var _local3 = 1;
while (_local3 <= _global.carriages) {
delete this["carriage" + _local3].onEnterFrame;
if (_global.fuel != 0) {
this["carriage" + _local3].inside.gotoAndStop(2);
}
_local3++;
}
_global.lost = true;
showMenuInFive();
}
function end_win() {
trace("END WIN");
stopSounds();
_global.lost = false;
delete train.onEnterFrame;
var _local3 = 1;
while (_local3 <= _global.carriages) {
delete this["carriage" + _local3].onEnterFrame;
_local3++;
}
showMenu();
}
function closeMenu() {
if (!_global.lost) {
init_game();
new_game();
var _local5 = 0;
while (check_win()) {
_local5++;
if (_local5 > 10) {
destroy_game();
init_game();
new_game();
_local5 = 0;
randomize();
}
}
} else {
var _local4 = 0;
while (_local4 < _global.gridY) {
var _local3 = 0;
while (_local3 < _global.gridX) {
this[("tile" + _local3) + _local4]._visible = true;
_local3++;
}
_local4++;
}
randomize();
}
prepare_train();
sound = new Sound(this);
sound.attachSound("woohoo");
sound.setVolume(80);
sound.start(0, 1);
playSound();
makeVisible(true);
}
function init_game() {
this.board._width = _global.gridX * 40;
this.board._height = _global.gridY * 40;
_global.boardX = (this.board._x + 20) - (this.board._width / 2);
_global.boardY = (this.board._y + 20) - (this.board._height / 2);
this.inlet._x = _global.boardX - 6.5;
this.inlet._y = _global.boardY - 20;
this.start._x = this.inlet._x;
this.outlet._x = (_global.boardX + this.board._width) - 49;
this.outlet._y = (_global.boardY + this.board._height) - 20;
var _local4 = 0;
while (_local4 < _global.gridY) {
var _local3 = 0;
while (_local3 < _global.gridX) {
this.attachMovie("tile", ("tile" + _local3) + _local4, this.getNextHighestDepth());
this[("tile" + _local3) + _local4]._x = _global.boardX + (40 * _local3);
this[("tile" + _local3) + _local4]._y = _global.boardY + (40 * _local4);
_local3++;
}
_local4++;
}
}
function destroy_game() {
var _local4 = 0;
while (_local4 < _global.gridY) {
var _local3 = 0;
while (_local3 < _global.gridX) {
removeMovieClip(this[("tile" + _local3) + _local4]);
_local3++;
}
_local4++;
}
removeMovieClip(this.train1);
removeMovieClip(this.train2);
removeMovieClip(this.train3);
removeMovieClip(this.train);
var _local3 = 1;
while (_local3 <= _global.carriages) {
removeMovieClip(this["carriage" + _local3]);
removeMovieClip(this["carriage1-" + _local3]);
removeMovieClip(this["carriage2-" + _local3]);
removeMovieClip(this["carriage3-" + _local3]);
_local3++;
}
}
function new_game() {
var _local4 = 0;
while (_local4 < _global.gridY) {
var _local3 = 0;
while (_local3 < _global.gridX) {
this[("tile" + _local3) + _local4].gotoAndStop(1);
_local3++;
}
_local4++;
}
var _local15 = 0;
_global.used = new Array();
var _local3 = 0;
while (_local3 <= 10) {
_global.used[_local3] = 0;
_local3++;
}
var _local13 = null;
var _local12 = 0;
_local3 = 0;
while (_local3 < 5) {
var _local11 = createPath();
if (_local12 < _local11[0].length) {
_local12 = _local11[0].length;
_local13 = _local11;
}
_local3++;
}
_global.path = _local13;
var _local7 = "B";
var _local10;
_local3 = 0;
while (_local3 < _global.path[0].length) {
switch (_local7) {
case "B" :
_local10 = "T";
break;
case "T" :
_local10 = "B";
break;
case "L" :
_local10 = "R";
break;
case "R" :
_local10 = "L";
}
if (_local3 == (_global.path[0].length - 1)) {
_local7 = "B";
} else if (_global.path[0][_local3] == _global.path[0][_local3 + 1]) {
if (_global.path[1][_local3] < _global.path[1][_local3 + 1]) {
_local7 = "B";
} else {
_local7 = "T";
}
} else if (_global.path[0][_local3] < _global.path[0][_local3 + 1]) {
_local7 = "R";
} else {
_local7 = "L";
}
var _local9 = this[("tile" + _global.path[0][_local3]) + _global.path[1][_local3]];
var _local8 = false;
var _local5;
var _local14;
while (!_local8) {
_local5 = randomType();
if (_global.maxim[_local5 - 1] > 0) {
_local9.gotoAndStop(_local5);
_local9._rotation = _local9._rotation + (90 * random(4));
if (from(_local10, _local5, _local9._rotation) == _local7) {
_local8 = true;
_global.maxim[_local5 - 1]--;
break;
}
} else {
_local8 = false;
}
}
_global.used[_local5]++;
_local3++;
}
_local4 = 0;
while (_local4 < _global.gridY) {
_local3 = 0;
while (_local3 < _global.gridX) {
if (this[("tile" + _local3) + _local4]._currentframe == 1) {
var _local6 = false;
while (!_local6) {
var _local5 = randomType();
if (_global.maxim[_local5 - 1] > 0) {
this[("tile" + _local3) + _local4].gotoAndStop(_local5);
this[("tile" + _local3) + _local4]._rotation = 90 * random(4);
_local6 = true;
_global.maxim[_local5 - 1]--;
}
}
}
if (rotatable(this[("tile" + _local3) + _local4]._currentframe)) {
this[("tile" + _local3) + _local4].onPress = function () {
this._rotation = this._rotation + 90;
sound = new Sound(this);
sound.attachSound("lever");
sound.setVolume(10);
sound.start(0, 1);
};
}
this[("tile" + _local3) + _local4].onRollOver = function () {
this.onEnterFrame = function () {
if (this.onPress != null) {
this.canvas.gotoAndStop("black");
} else {
this.canvas.gotoAndStop("red");
}
};
};
this[("tile" + _local3) + _local4].onRollOut = function () {
this.onEnterFrame = null;
this.canvas.gotoAndStop("off");
};
_local3++;
}
_local4++;
}
}
function randomize() {
var _local4 = 0;
while (_local4 < _global.gridY) {
var _local3 = 0;
while (_local3 < _global.gridX) {
if (rotatable(this[("tile" + _local3) + _local4]._currentframe)) {
this[("tile" + _local3) + _local4]._rotation = 90 * random(4);
}
_local3++;
}
_local4++;
}
}
function do_flush() {
if ((_global.speed != _global.flush_speed) && (this.train.onEnterFrame != null)) {
_global.speed = _global.flush_speed;
_global.pauze = false;
sound = new Sound(this);
sound.attachSound("FF");
sound.setVolume(30);
sound.start(0, 1);
stopSounds();
playSoundFast();
}
}
function check_win() {
var _local9 = 0;
var _local7 = false;
var _local8 = false;
var _local4 = 0;
var _local3 = 0;
var _local5 = "T";
while (!_local7) {
var _local6 = from(_local5, this[("tile" + _local4) + _local3]._currentframe, this[("tile" + _local4) + _local3]._rotation);
if (this[("tile" + _local4) + _local3] == null) {
_local6 = "X";
}
if (_local6 == "X") {
if ((_local4 == (_global.gridX - 1)) && (_local3 == _global.gridY)) {
_local7 = true;
_local8 = true;
_local9++;
} else {
_local7 = true;
_local8 = false;
}
}
switch (_local6) {
case "B" :
_local3++;
_local5 = "T";
break;
case "T" :
_local3--;
_local5 = "B";
break;
case "L" :
_local4--;
_local5 = "R";
break;
case "R" :
_local4++;
_local5 = "L";
}
}
_global.pathLength = _local9;
return(_local8);
}
function randomType() {
var _local3 = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var _local5;
var _local2 = 0;
while (_local2 <= (_local3.length - 1)) {
if (_local2 == 0) {
_local5 = 0;
_global.needed[_local2] = 0;
} else {
_local5 = _local3[_local2 - 1];
}
_local3[_local2] = _local5 + _global.needed[_local2];
_local2++;
}
var _local6 = false;
while (!_local6) {
trace("max " + _local3[_global.needed.length - 1]);
var _local4 = 1 + random(_local3[_global.needed.length - 1]);
_local2 = 1;
while (_local3[_local2] < _local4) {
_local2++;
}
_local2++;
trace((_local4 + " ") + _local2);
_local6 = true;
}
return(_local2);
}
function createPath() {
var _local16 = false;
while (!_local16) {
var _local13 = 0;
while (_local13 < _global.gridY) {
var _local5 = 0;
while (_local5 < _global.gridX) {
this[("tile" + _local5) + _local13].occupied = false;
_local5++;
}
_local13++;
}
var _local11 = new Array();
var _local12 = new Array();
var _local8 = 0;
var _local7 = 0;
_local11[0] = _local8;
_local12[0] = _local7;
this[("tile" + _local8) + _local7].occupied = true;
var _local14 = true;
var _local15 = false;
while (_local14) {
var _local6 = new Array();
var _local9 = new Array();
var _local5 = 0;
while (_local5 < 4) {
var _local4;
var _local3;
if (_local5 == 0) {
_local4 = _local8;
_local3 = _local7 - 1;
} else if (_local5 == 1) {
_local4 = _local8 + 1;
_local3 = _local7;
} else if (_local5 == 2) {
_local4 = _local8;
_local3 = _local7 + 1;
} else {
_local4 = _local8 - 1;
_local3 = _local7;
}
if ((this[("tile" + _local4) + _local3] != null) && (!this[("tile" + _local4) + _local3].occupied)) {
_local6[_local6.length] = _local4;
_local9[_local9.length] = _local3;
}
_local5++;
}
if (_local6.length == 0) {
_local14 = false;
_local15 = false;
} else {
var _local10 = random(_local6.length);
_local11[_local11.length] = _local6[_local10];
_local12[_local12.length] = _local9[_local10];
_local8 = _local6[_local10];
_local7 = _local9[_local10];
this[("tile" + _local6[_local10]) + _local9[_local10]].occupied = true;
}
if ((_local11[_local11.length - 1] == (_global.gridX - 1)) && (_local12[_local12.length - 1] == (_global.gridY - 1))) {
_local14 = false;
_local15 = true;
}
}
if (_local15) {
_local16 = true;
return(new Array(_local11, _local12));
}
}
}
function show_score(posX, posY, len, amount) {
amount = Math.round(amount);
var _local3 = random(1000000);
this.attachMovie("score", "score" + _local3, this.getNextHighestDepth(), {_x:posX, _y:posY, _visible:false});
this["score" + _local3].len = len;
this["score" + _local3].inside.text = amount;
this["score" + _local3].onEnterFrame = function () {
if (this.life == null) {
this.life = 0;
}
this.life++;
this._width++;
this._height++;
if (this.life == this.len) {
removeMovieClip(this);
}
};
this["score" + _local3]._visible = true;
_global.roundscore = _global.roundscore + amount;
}
function show_bonus(posX, posY, len, str, amount) {
amount = Math.round(amount);
var _local3 = random(1000000);
this.attachMovie("bonus", "bonus" + _local3, this.getNextHighestDepth(), {_x:posX, _y:posY + 10, _visible:false});
this["bonus" + _local3].len = len;
this["bonus" + _local3].inside.text = (str + newline) + amount;
this["bonus" + _local3].onEnterFrame = function () {
if (this.life == null) {
this.life = 0;
}
this.life++;
this._width = this._width + 0.5;
this._height = this._height + 0.5;
this._y++;
if (this.life == this.len) {
removeMovieClip(this);
}
};
this["bonus" + _local3]._visible = true;
_global.roundscore = _global.roundscore + amount;
}
function show_multi(posX, posY, len, str, amount) {
amount = Math.round(amount);
var _local2 = random(1000000);
this.attachMovie("multi", "multi" + _local2, this.getNextHighestDepth(), {_x:posX, _y:posY + 10, _visible:false});
this["multi" + _local2].len = len;
this["multi" + _local2].inside.text = (str + newline) + amount;
this["multi" + _local2].onEnterFrame = function () {
if (this.life == null) {
this.life = 0;
}
this.life++;
this._width = this._width + 0.5;
this._height = this._height + 0.5;
this._y++;
if (this.life == this.len) {
removeMovieClip(this);
}
};
this["multi" + _local2]._visible = true;
}
function check_bonus(nr, posX, posY) {
if (this[("tile" + posX) + posY]._currentframe == 7) {
if (nr == 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
if (_global.speed != _global.flush_speed) {
_global.pauze = true;
this.timer.wait = 100;
this.timer.life = 0;
this.timer.posX = posX;
this.timer.posY = posY;
volumeDown();
this.timer.onEnterFrame = function () {
this.life++;
trace(this.life);
if (this.life >= this.wait) {
trace("GO");
this.onEnterFrame = null;
_global.pauze = false;
this._parent[("tile" + this.posX) + this.posY].pipe.gotoAndStop(2);
this.wait = null;
this.life = null;
sound = new Sound(this);
sound.attachSound("wissle");
sound.setVolume(50);
sound.start(0, 1);
volumeUp();
}
};
} else {
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
}
}
}
} else if (this[("tile" + posX) + posY]._currentframe == 8) {
if (nr != 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
if (_global.speed != _global.flush_speed) {
_global.pauze = true;
this.timer.wait = 400 / _global.speed;
this.timer.life = 0;
this.timer.posX = posX;
this.timer.posY = posY;
this.timer.nr = nr;
volumeDown();
sound = new Sound(this._parent);
sound.attachSound("cash");
sound.setVolume(50);
sound.start(0, 1);
this.timer.onEnterFrame = function () {
this.life++;
if (((this.life >= this.wait) || (this.life == null)) || (this.wait == null)) {
this.onEnterFrame = null;
_global.pauze = false;
volumeUp();
if (nr == _global.carriages) {
this._parent[("tile" + this.posX) + this.posY].pipe.gotoAndStop(2);
sound = new Sound(this);
sound.attachSound("wissle");
sound.setVolume(50);
sound.start(0, 1);
}
this.wait = null;
this.life = null;
}
};
}
if (nr == _global.carriages) {
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
}
show_bonus(this["carriage" + nr]._x, this["carriage" + nr]._y, 30, "Passenger Pick Up Bonus!", (1000 * _global.level) / (2 * _global.carriages));
}
}
} else if (this[("tile" + posX) + posY]._currentframe == 9) {
if (nr == 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
if (_global.speed != _global.flush_speed) {
_global.speed = _global.speed * 1.5;
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
}
}
}
} else if (this[("tile" + posX) + posY]._currentframe == 10) {
if (nr == 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
if (_global.speed != _global.flush_speed) {
_global.speed = _global.speed / 1.5;
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
}
}
}
} else if (this[("tile" + posX) + posY]._currentframe == 11) {
if (nr == 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
_global.roundscore = _global.roundscore + 1000;
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
show_multi(this.train._x, this.train._y, 30, "Bonus!", 1000);
sound = new Sound(this._parent);
sound.attachSound("cash");
sound.setVolume(50);
sound.start(0, 1);
}
}
} else if (this[("tile" + posX) + posY]._currentframe == 12) {
if (nr == 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
_global.roundscore = _global.roundscore + 5000;
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
show_multi(this.train._x, this.train._y, 30, "Bonus", 5000);
sound = new Sound(this._parent);
sound.attachSound("cash");
sound.setVolume(50);
sound.start(0, 1);
}
}
} else if (this[("tile" + posX) + posY]._currentframe == 13) {
if (nr == 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
_global.roundscore = _global.roundscore + 10000;
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
show_multi(this.train._x, this.train._y, 30, "Bonus", 10000);
sound = new Sound(this._parent);
sound.attachSound("cash");
sound.setVolume(50);
sound.start(0, 1);
}
}
} else if (this[("tile" + posX) + posY]._currentframe == 14) {
if (nr == 0) {
if (this[("tile" + posX) + posY].pipe._currentframe == 1) {
_global.fuel = 100;
this[("tile" + posX) + posY].pipe.gotoAndStop(2);
}
}
}
}
function showMenuInFive() {
this.timer.wait = 100;
this.timer.life = 0;
this.timer.onEnterFrame = function () {
this.life++;
if (((this.life >= this.wait) || (this.life == null)) || (this.wait == null)) {
this.onEnterFrame = null;
showMenu();
}
};
}
function playSound() {
_global.sound1 = new Sound(this.timer);
_global.sound1.attachSound("slow");
_global.sound1.setVolume(20);
_global.sound1.start(0, 9999);
}
function playSoundFast() {
_global.sound2 = new Sound(this.timer);
_global.sound2.attachSound("fast");
_global.sound2.setVolume(20);
_global.sound2.start(0, 9999);
}
function stopSounds() {
_global.sound1.stop();
_global.sound2.stop();
}
function volumeDown() {
_global.sound1.setVolume(10);
}
function volumeUp() {
_global.sound1.setVolume(20);
}
Path = function () {
this.init.apply(this, arguments);
};
Path.prototype.init = function (start_x, start_y) {
this._segments = [];
this._length = 0;
if (arguments.length) {
this.moveTo(start_x, start_y);
} else {
this.moveTo(0, 0);
}
};
Path.prototype.curveToAccuracy = 10;
Path.prototype.clear = function () {
this.init(0, 0);
};
Path.prototype.moveTo = function (start_x, start_y) {
this._segments[this._segments.length] = {d:0, start:{_x:this._position._x, _y:this._position._y}, end:{_x:start_x, _y:start_y}, type:"M"};
this._position = {_x:start_x, _y:start_y};
return(this);
};
Path.prototype.lineTo = function (end_x, end_y) {
var _local3 = end_x - this._position._x;
var _local2 = end_y - this._position._y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
this._segments[this._segments.length] = {d:_local4, start:this._position, end:{_x:end_x, _y:end_y}, type:"L"};
this._length = this._length + _local4;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.circleTo = (Path.prototype.circleCWTo = function (end_x, end_y, arc, dir) {
if (dir == undefined) {
dir = "CW";
}
if (arc == undefined) {
arc = 0.5;
}
if (arc > 1) {
arc = 1;
} else if (arc <= 0) {
return(this.lineTo(end_x, end_y));
}
if (dir == "CCW") {
arc = 1 - arc;
}
var _local13 = {_x:(this._position._x + end_x) / 2, _y:(this._position._y + end_y) / 2};
var _local4 = end_x - this._position._x;
var _local3 = end_y - this._position._y;
var _local11 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = _local11 / 2;
var _local8 = _local7 / Math.tan(arc * Math.PI);
var _local10 = _local7 / Math.sin(arc * Math.PI);
var _local9 = Math.atan2(_local3, _local4) + (Math.PI/2);
_local13._x = _local13._x + (Math.cos(_local9) * _local8);
_local13._y = _local13._y + (Math.sin(_local9) * _local8);
var _local17 = Math.atan2(this._position._y - _local13._y, this._position._x - _local13._x);
var _local15 = Math.atan2(end_y - _local13._y, end_x - _local13._x);
if (dir == "CW") {
if (_local15 < _local17) {
_local15 = _local15 + (Math.PI*2);
}
} else if (_local17 < _local15) {
_local17 = _local17 + (Math.PI*2);
}
_local11 = _local10 * Math.abs(_local15 - _local17);
this._segments[this._segments.length] = {d:_local11, r:_local10, a1:_local17, a2:_local15, o:_local13, dir:dir, type:"C"};
this._length = this._length + _local11;
this._position = {_x:end_x, _y:end_y};
return(this);
});
Path.prototype.circleCCWTo = function (end_x, end_y, arc) {
return(this.circleTo.call(this, end_x, end_y, arc, "CCW"));
};
Path.prototype.curveTo = function (con_x, con_y, end_x, end_y) {
var _local3 = this.divideBezier(this._position._x, this._position._y, con_x, con_y, end_x, end_y);
this._segments[this._segments.length] = {d:_local3.d, start:this._position, con:{_x:con_x, _y:con_y}, end:{_x:end_x, _y:end_y}, segs:_local3, type:"B"};
this._length = this._length + _local3.d;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.divideBezier = function (x1, y1, x2, y2, x3, y3) {
var _local2;
var _local15;
var _local14;
var _local12;
var _local11;
var _local9;
var _local8;
var _local7;
var _local6;
var _local29;
var _local13 = [];
var _local5 = {_x:x1, _y:y1};
var _local22 = x2 - x1;
var _local20 = y2 - y1;
var _local21 = x3 - x2;
var _local19 = y3 - y2;
var _local16 = Math.atan2;
var _local18 = Math.sqrt;
var _local17 = 0;
var _local36;
var _local3;
var _local10;
var _local30 = _local16(_local20, _local22);
var _local4 = 1;
while (_local4 < this.curveToAccuracy) {
_local2 = _local4 / this.curveToAccuracy;
_local15 = x1 + (_local22 * _local2);
_local12 = (x2 + (_local21 * _local2)) - _local15;
_local14 = y1 + (_local20 * _local2);
_local11 = (y2 + (_local19 * _local2)) - _local14;
_local7 = _local15 + (_local12 * _local2);
_local6 = _local14 + (_local11 * _local2);
_local9 = _local7 - _local5._x;
_local8 = _local6 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local11, _local12);
_local3 = _local10 - _local30;
if (_local3 > Math.PI) {
_local3 = _local3 - (Math.PI*2);
} else if (_local3 < -3.14159265358979) {
_local3 = _local3 + (Math.PI*2);
}
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:_local7, _y:_local6}, a:{base:_local30, d:_local3}};
_local30 = _local10;
_local5 = {_x:_local7, _y:_local6};
_local4++;
}
_local9 = x3 - _local5._x;
_local8 = y3 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local19, _local21);
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:x3, _y:y3}, a:{base:_local30, d:_local10 - _local30}};
_local13.d = _local17;
return(_local13);
};
Path.prototype.setInBezier = function (obj, t, segments, orient, extra) {
if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
var _local2 = segments[0];
var _local8 = segments.d * t;
var _local3 = 0;
var _local7 = 0;
var _local4 = segments.length + 1;
var _local1 = 1;
while (_local1 < _local4) {
_local7 = _local1 - 1;
_local2 = segments[_local7];
if ((_local1 == _local4) || ((_local3 + _local2.d) >= _local8)) {
break;
}
_local3 = _local3 + _local2.d;
_local1++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local3) / _local2.d;
}
var _local11 = _local2.end._x - _local2.start._x;
var _local10 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local11 * t);
obj._y = _local2.start._y + (_local10 * t);
if (extra) {
obj.t = t;
obj.n = _local7;
obj.divs = segments.length;
}
if (orient) {
obj._rotation = ((_local2.a.base + (_local2.a.d * t)) * 180) / Math.PI;
}
};
Path.prototype.reverse = function () {
var _local3 = this._segments;
var _local2 = _local3.length;
var _local4 = new Path(_local3[_local2 - 1].end._x, _local3[_local2 - 1].end._y);
while (_local2--) {
if (_local3[_local2].type == "M") {
_local4._segments[_local4._segments.length] = {d:0, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"M"};
} else if (_local3[_local2].type == "L") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"L"};
} else if (_local3[_local2].type == "C") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, r:_local3[_local2].r, a1:_local3[_local2].a2, a2:_local3[_local2].a1, o:{_x:_local3[_local2].o._x, _y:_local3[_local2].o._y}, dir:((_local3[_local2].dir == "CW") ? "CCW" : "CW"), type:"C"};
} else if (_local3[_local2].type == "B") {
var _local9 = this.divideBezier(_local3[_local2].end._x, _local3[_local2].end._y, _local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].start._x, _local3[_local2].start._y);
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, con:{_x:_local3[_local2].con._x, _y:_local3[_local2].con._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, segs:_local9, type:"B"};
}
}
_local4._length = this._length;
if (this.hasOwnProperty("curveToAccuracy")) {
_local4.curveToAccuracy = this.curveToAccuracy;
}
return(_local4);
};
Path.prototype.traverse = function (obj, t, orient, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local8 = this._length * t;
var _local5 = 0;
var _local6 = 0;
var _local7 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local7) {
_local6 = _local3 - 1;
_local2 = this._segments[_local6];
if ((_local3 == _local7) || ((_local5 + _local2.d) >= _local8)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
while (_local2.type == "M") {
_local6++;
_local2 = this._segments[_local6];
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local5) / _local2.d;
}
if (_local2.type == "L") {
var _local12 = _local2.end._x - _local2.start._x;
var _local11 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local12 * t);
obj._y = _local2.start._y + (_local11 * t);
if (orient) {
obj._rotation = (Math.atan2(_local11, _local12) * 180) / Math.PI;
}
} else if (_local2.type == "C") {
var _local13 = _local2.a1;
var _local14 = _local2.a2;
var _local10 = _local13 + ((_local14 - _local13) * t);
obj._x = _local2.o._x + (Math.cos(_local10) * _local2.r);
obj._y = _local2.o._y + (Math.sin(_local10) * _local2.r);
if (orient) {
obj._rotation = ((_local2.dir == "CW") ? (((_local10 * 180) / Math.PI) + 90) : (((_local10 * 180) / Math.PI) - 90));
}
} else if (_local2.type == "B") {
this.setInBezier(obj, t, _local2.segs, orient);
}
return(this);
};
Path.prototype.mcCircleTo = function (cen_x, cen_y, a1, a2, r, dir) {
dir = ((dir == "CCW") ? -1 : 1);
var _local6 = Math.cos;
var _local7 = Math.sin;
var _local13 = Math.abs(a2 - a1);
var _local12 = Math.floor(_local13 / (Math.PI/4)) + 1;
var _local5 = (dir * _local13) / (2 * _local12);
var _local8 = r / _local6(_local5);
var _local4 = 0;
while (_local4 < _local12) {
a2 = a1 + _local5;
a1 = a2 + _local5;
this.curveTo(cen_x + (_local6(a2) * _local8), cen_y + (_local7(a2) * _local8), cen_x + (_local6(a1) * r), cen_y + (_local7(a1) * r));
_local4++;
}
return(this);
};
Path.prototype.draw = function (mc, n) {
var _local3 = this._segments;
if (n == undefined) {
n = _local3.length;
}
var _local2 = 0;
while (_local2 < n) {
if (_local3[_local2].type == "M") {
mc.moveTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "L") {
mc.lineTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "C") {
this.mcCircleTo.call(mc, _local3[_local2].o._x, _local3[_local2].o._y, _local3[_local2].a1, _local3[_local2].a2, _local3[_local2].r, _local3[_local2].dir);
} else if (_local3[_local2].type == "B") {
mc.curveTo(_local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].end._x, _local3[_local2].end._y);
}
_local2++;
}
return(this);
};
Path.prototype.drawUpTo = function (mc, t, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local9 = this._length * t;
var _local5 = 0;
var _local7 = 0;
var _local6 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local6) {
_local7 = _local3 - 1;
_local2 = this._segments[_local7];
if ((_local3 == _local6) || ((_local5 + _local2.d) >= _local9)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local9 - _local5) / _local2.d;
}
this.draw(mc, _local7);
if (_local2.type == "M") {
mc.moveTo(_local2.end._x, _local2.end._y);
} else if (_local2.type == "L") {
mc.lineTo(_local2.start._x + ((_local2.end._x - _local2.start._x) * t), _local2.start._y + ((_local2.end._y - _local2.start._y) * t));
} else if (_local2.type == "C") {
this.mcCircleTo.call(mc, _local2.o._x, _local2.o._y, _local2.a1, _local2.a1 + ((_local2.a2 - _local2.a1) * t), _local2.r, _local2.dir);
} else if (_local2.type == "B") {
var _local8 = {};
this.setInBezier(_local8, t, _local2.segs, false, true);
var _local11 = (_local8.n / _local8.divs) + (_local8.t / _local8.divs);
mc.curveTo(_local2.start._x + ((_local2.con._x - _local2.start._x) * _local11), _local2.start._y + ((_local2.con._y - _local2.start._y) * _local11), _local8._x, _local8._y);
}
return(this);
};
_global.level = 0;
_global.score = 0;
_global.roundscore = 0;
_global.lives = 3;
_global.lost = false;
_global.carriages = 3;
_global.pauze = false;
_global.flush_speed = 50;
_global.multiplier = 1;
_global.fuel = 100;
showMenu();
Frame 51
stop();
Frame 58
gotoAndPlay (2);
Frame 59
_root.score = _global.score;
sound = new Sound(this);
sound.attachSound("song");
sound.setVolume(50);
sound.start(0, 1);
Instance of Symbol 339 MovieClip in Frame 59
onClipEvent (enterFrame) {
this.pointsBox.text = _global.score;
if (_global.fuel == 0) {
this.textBox.text = "You ran out of fuel!\nYour final score is:";
} else if ((_root.Stattooz.pGameType == 1) && (_global.level > 6)) {
this.textBox.text = "You're at the end of the demo!\nYour final score is:";
} else {
this.textBox.text = "You derailed the train!\nYour final score is:";
}
}
Frame 66
stop();
stop();
Symbol 13 MovieClip [derailed] Frame 35
stop();
removeMovieClip(this);
Symbol 20 MovieClip Frame 1
this.gotoAndStop(random(9) + 1);
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 2
stop();
Symbol 23 MovieClip Frame 3
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 1
this.gotoAndStop(random(8) + 1);
Symbol 33 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
this.gotoAndStop(random(9) + 1);
Instance of Symbol 42 MovieClip in Symbol 44 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(250000);
}
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 9
stop();
Symbol 59 MovieClip Frame 60
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 2
stop();
gate.gotoAndPlay(2);
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 1
stop();
Instance of Symbol 73 MovieClip in Symbol 74 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = -1 * this._parent._parent._rotation;
}
Symbol 74 MovieClip Frame 2
stop();
Symbol 78 MovieClip Frame 1
stop();
Instance of Symbol 77 MovieClip in Symbol 78 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = -1 * this._parent._parent._rotation;
}
Symbol 78 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 1
stop();
Instance of Symbol 81 MovieClip in Symbol 82 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = -1 * this._parent._parent._rotation;
}
Symbol 82 MovieClip Frame 2
stop();
Symbol 86 MovieClip Frame 1
stop();
Instance of Symbol 85 MovieClip in Symbol 86 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = -1 * this._parent._parent._rotation;
}
Symbol 86 MovieClip Frame 2
stop();
Symbol 87 MovieClip [tile] Frame 1
stop();
Symbol 87 MovieClip [tile] Frame 2
stop();
Symbol 87 MovieClip [tile] Frame 3
stop();
Symbol 87 MovieClip [tile] Frame 4
stop();
Symbol 87 MovieClip [tile] Frame 5
stop();
Symbol 87 MovieClip [tile] Frame 6
stop();
Symbol 87 MovieClip [tile] Frame 7
stop();
Symbol 87 MovieClip [tile] Frame 8
stop();
Symbol 87 MovieClip [tile] Frame 9
stop();
Symbol 87 MovieClip [tile] Frame 10
stop();
Symbol 87 MovieClip [tile] Frame 11
stop();
Symbol 87 MovieClip [tile] Frame 12
stop();
Symbol 87 MovieClip [tile] Frame 13
stop();
Symbol 87 MovieClip [tile] Frame 14
stop();
Symbol 97 MovieClip Frame 56
stop();
Symbol 135 MovieClip Frame 1
this.gotoAndStop(random(4) + 1);
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 2
this.gotoAndStop(random(7) + 2);
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 2
stop();
var nr = random(1000000);
_root.attachMovie("derailed", "derailed" + nr, _root.getNextHighestDepth(), {_x:320, _y:240});
Symbol 161 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 2
function loadFinished() {
clearInterval(myStartInterval);
this.preloader.myBarAnim.gotoAndStop(100);
this.preloader.percentage.text = "100%";
_parent.play();
}
var myMinLength = 10000;
var myStartTime = getTimer();
var myStartInterval;
this.onEnterFrame = function () {
var _local8 = _root.getBytesTotal();
var _local5 = _root.getBytesLoaded();
var _local7 = (_local5 / _local8) * 100;
var _local4 = getTimer() - myStartTime;
var _local6 = (_local4 / myMinLength) * 100;
var _local3 = Math.min(_local6, _local7);
if (_local3 < 98) {
this.preloader.bar.gotoAndStop(Math.ceil(_local3));
this.preloader.percentage.text = Math.ceil(_local3) + "%";
this.preloader.myBarAnim.gotoAndStop(Math.round(_local3));
iLastBytes = _local3;
} else if (_root.Branditz.pAdDone) {
myStartInterval = setInterval(this, "loadFinished", 2000);
this.onEnterFrame = undefined;
} else if (_local4 > 30000) {
_root.Branditz.pAdDone = true;
}
};
stop();
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 2
stop();
Symbol 174 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
this.onRelease = function () {
_root.doAffiliates();
};
stop();
Symbol 174 MovieClip Frame 2
stop();
Symbol 182 MovieClip [Preloader] Frame 1
_root.Branditz.activateElement("intro", this);
Symbol 182 MovieClip [Preloader] Frame 2
function getPromoPaths(thisPromo) {
var _local5 = _root.Branditz.pDomain + "/branditz/promo/";
if (_root.Stattooz.pGameType == 1) {
_local5 = "http://skins.branditz.com/promo/";
}
var _local3 = new LoadVars();
var _local4 = new LoadVars();
_local4.pController = this;
_local4.pHolder = thisPromo;
_local4.onLoad = function (success) {
_root.myFeedback.text = _root.myFeedback.text + ((" SUCCESS = " + success) + newline);
if (success) {
trace("my promo file location internal = " + this.promourl);
this.pController.attachPromotion(this.promourl, this.pHolder);
} else {
trace("my error finding promo file location internal");
_root.Branditz.pAdDone = true;
pController.gotoAndStop("show");
}
};
_local3.version = _root.Stattooz.pVersion;
_local3.url = _root._url;
_local3.gamename = _root.Stattooz.pGameName;
_local3.gametype = _root.Stattooz.pGameType;
_local3.sendAndLoad(_local5, _local4, "POST");
}
function attachPromotion(thisFile, thisHolder) {
var _local3 = new Object();
_local3.X = thisHolder._x;
_local3.Y = thisHolder._y;
_local3.pController = this;
_local3.onLoadInit = function (target_mc) {
target_mc.myX = this.X;
target_mc.myY = this.Y;
target_mc.gotoAndStop("show");
};
_local3.onLoadError = function (target_mc, errorCode, httpStatus) {
trace(">> loadListener.onLoadError()");
trace(">> ==========================");
trace(">> errorCode: " + errorCode);
trace(">> httpStatus: " + httpStatus);
_root.Branditz.pAdDone = true;
this.pController.gotoAndStop("show");
};
var _local4 = new MovieClipLoader();
_local4.addListener(_local3);
_local4.loadClip(thisFile, thisHolder);
}
_root.Branditz.pSkipIntro = true;
_root.Branditz.pLinkWindow = (_root.Branditz.pHosted ? "_self" : "_blank");
myCanvas._alpha = 100;
myCanvas._width = Stage.width;
myCanvas._height = Stage.height;
_root.Affiliateid = _level0.affiliateId;
((((_root.Affiliateid == undefined) || (_root.Affiliateid == null)) || (_root.Affiliateid == "")) ? ((_root.Affiliateid = "9ffc8f4")) : null);
_root.AffiliateProgram = _level0.aProgram;
((((_root.AffiliateProgram == undefined) || (_root.AffiliateProgram == null)) || (_root.AffiliateProgram == "")) ? ((_root.AffiliateProgram = "fizzy")) : null);
_root.MoreGamesLink = _level0.aLink;
((((_root.MoreGamesLink == undefined) || (_root.MoreGamesLink == null)) || (_root.MoreGamesLink == "")) ? ((_root.MoreGamesLink = "http://www.fizzy.com?a_aid=" + _root.Affiliateid)) : (_root.MoreGamesLink));
_root.BuyGameLink = (_root.Branditz.pHosted ? ((_root.Branditz.pDomain + "games/") + _root.Branditz.pGameName) : ("http://www.fizzy.com/games/" + _root.Branditz.pGameName));
_root.doMoreGames = function () {
if (!_root.MoreGamesClicked) {
_root.MoreGamesClicked = true;
_root.Stattooz.reportEvent("moregames");
}
_root.getURL(_root.MoreGamesLink, _root.Branditz.pLinkWindow);
};
_root.doBuyGame = function () {
_root.Stattooz.reportEvent("moregames");
_root.getURL(_root.BuyGameLink, _root.Branditz.pLinkWindow);
};
_root.doAffiliates = function () {
_root.Stattooz.reportEvent("moregames");
var _local2 = "http://www.fizzy.com/affiliates?a_aid=" + _root.Affiliateid;
_root.getURL(_local2, _root.Branditz.pLinkWindow);
};
stop();
Instance of Symbol 166 MovieClip in Symbol 182 MovieClip [Preloader] Frame 2
on (release) {
_root.doMoreGames();
}
Instance of Symbol 171 MovieClip "myPromotionHolder" in Symbol 182 MovieClip [Preloader] Frame 2
on (rollOver) {
_parent.myPromotionTile.gotoAndStop(2);
}
on (rollOut) {
_parent.myPromotionTile.gotoAndStop(1);
}
on (release) {
_root.doMoreGames();
}
Instance of Symbol 174 MovieClip in Symbol 182 MovieClip [Preloader] Frame 2
onClipEvent (load) {
if (_root.AffiliateProgram != "fizzy") {
this._visible = false;
}
}
Symbol 182 MovieClip [Preloader] Frame 27
stop();
_root.checkPirate();
Symbol 366 MovieClip [__Packages.branditz] Frame 0
class branditz
{
var pPreLoadCount, pVersion, pGameName, pGameType, pGameWidth, pGameHeight, pStartFunction, pLoadedList, pLoaded, pLoadWhenCached, pCacheKiller, pBreak, pBreakID, pDomain, pRequestAddress, pElements, pPreLoadingHolder, pPreloadComments, pSkinPath;
function branditz (thisGameName, thisGameType, thisGameWidth, thisGameHeight, thisStartFunction) {
function itemHandler1(obj, item) {
getURL (("http://www.fizzy.com/games/" + _root.Stattooz.pGameName) + "/play");
}
trace("INSTANCE CREATED - BRANDITZ");
_root.mySandbox.text = "Sandbox = " + System.security.sandboxType;
pPreLoadCount = 0;
pVersion = 2;
pGameName = thisGameName;
pGameType = thisGameType;
pGameWidth = thisGameWidth;
pGameHeight = thisGameHeight;
pStartFunction = thisStartFunction;
System.security.allowDomain("*");
pLoadedList = [];
pLoaded = false;
pLoadWhenCached = false;
pCacheKiller = "";
pBreak = false;
pBreakID = setInterval(this, "serverTimer", 20000);
pDomain = getDomain(_root._url);
createLoadComments();
if (Number(thisGameType) == 1) {
pRequestAddress = "http://skins.branditz.com";
} else if (pDomain != "default") {
pRequestAddress = pDomain + "branditz/";
} else {
pRequestAddress = "http://skins.branditz.com";
}
if (_root._url.slice(0, 4) != "file") {
pCacheKiller = "?cache=" + Math.random();
}
var _local3 = new ContextMenu();
_local3.hideBuiltInItems();
if (Number(thisGameType) == 1) {
var _local4 = new ContextMenuItem("Play the full version of this game!", itemHandler1);
_local3.customItems.push(_local4);
}
_root.menu = _local3;
getRemotePaths();
}
function getRemotePaths() {
trace("GET REMOTE PATHS");
var _local3 = new LoadVars();
var _local5 = new LoadVars();
_local5.pController = this;
var _local6 = pRequestAddress;
_root.myFeedback.text = _root.myFeedback.text + (("OPENING: " + pRequestAddress) + newline);
_local5.onLoad = function (success) {
_root.myFeedback.text = _root.myFeedback.text + ((" SUCCESS = " + success) + newline);
if (success) {
trace("RETURN PROPS: ");
for (var _local3 in this) {
trace((("REURN PROPERTY " + _local3) + " = ") + this[_local3]);
}
this.pController.pSkinPath = this.skinurl;
this.pController.pElements = this.elements.split(",");
this.pController.pHosted = Boolean(Number(this.hosted));
this.pController.pBuy = Boolean(Number(this.buy));
_root.myFeedback.text = _root.myFeedback.text + ((" LOADED " + this) + newline);
this.pController.pStartFunction(this.pController.pSkinPath, this.pController.pDomain);
if (((this.pController.pSkinPath == undefined) || (this.pController.pSkinPath == "noskin")) || (this.pController.pElements.length < 1)) {
_root.skin_loading_text.removeTextField();
_root.gotoAndStop("preloader");
} else {
this.pController.preloadElements();
}
} else {
_root.myFeedback.text = _root.myFeedback.text + " ERROR - \r";
this.pController.pStartFunction(this.pController.pSkinPath, this.pController.pDomain);
_root.pStattooz.reportEvent("patherror");
_root.skin_loading_text.removeTextField();
_root.gotoAndStop("preloader");
}
};
trace("REQUEST LOCATION = " + pRequestAddress);
_local3.version = pVersion;
_local3.url = _root._url;
_local3.gamename = pGameName;
_local3.gametype = pGameType;
trace("PROPS SENT :");
for (var _local4 in _local3) {
trace((("DATA TO SEND " + _local4) + " = ") + _local3[_local4]);
}
_local3.sendAndLoad(_local6, _local5, "POST");
}
function preloadElements() {
if ((pElements.length > 0) && (!pBreak)) {
var _local3 = (pPreLoadingHolder = _root.createEmptyMovieClip("myBrandingLoader", _root.getNextHighestDepth()));
_local3._xscale = 1;
_local3._yscale = 1;
_local3._x = -1000;
_local3._y = -1000;
_local3._alpha = 0;
preloadNext(pPreLoadingHolder);
} else {
trace((("I AM NOT PRELOADING! - Elements = " + pElements.length) + ". pBreak = ") + pBreak);
_root.skin_loading_text.removeTextField();
_root.gotoAndStop("preloader");
}
}
function preloadElement(thisElement, thisContainer) {
trace("LOAD ELEMENT - " + thisElement);
_root.skin_loading_text.text = pPreloadComments[pPreLoadCount];
var _local5 = thisContainer.createEmptyMovieClip(thisElement + "Holder", thisContainer.getNextHighestDepth());
var _local3 = new Object();
_local3.myController = this;
_local3.myElement = thisElement;
_local3.myContainer = thisContainer;
_local3.onLoadProgress = function (target, bytesLoaded, bytesTotal) {
_root.myLoadingText.text = "LOADING:" + thisElement;
};
_local3.onLoadInit = function (thisClip) {
trace("BRANDING ELEMENT PRELOADED: " + thisClip);
this.myController.addToLoaded(this.myElement);
this.myController.preloadNext(this.myContainer);
};
_local3.onLoadError = function (thisClip) {
trace("PRELOAD ERROR - " + this.myElement);
this.myController.preloadNext(this.myContainer);
};
var _local4 = new MovieClipLoader();
_local4.addListener(_local3);
var _local6 = (pSkinPath + thisElement) + ".swf";
_local4.loadClip(_local6, _local5);
pPreLoadCount++;
}
function preloadNext(thisContainer) {
if ((pElements.length > 0) && (!pBreak)) {
var _local3 = pElements.splice(0, 1)[0];
preloadElement(_local3, pPreLoadingHolder);
} else {
_root.skin_loading_text.removeTextField();
pPreLoadingHolder.removeMovieClip();
pLoaded = true;
_root.gotoAndStop("preloader");
}
}
function reportHttpStatus(thisStatusNumber) {
var _local1;
if (thisStatusNumber < 100) {
_local1 = "flashError";
} else if (thisStatusNumber < 200) {
_local1 = "informational";
} else if (thisStatusNumber < 300) {
_local1 = "successful";
} else if (thisStatusNumber < 400) {
_local1 = "redirection";
} else if (thisStatusNumber < 500) {
_local1 = "clientError";
} else if (thisStatusNumber < 600) {
_local1 = "serverError";
} else if (thisStatusNumber == undefined) {
_local1 = "File Not found";
}
return(_local1);
}
function addToLoaded(thisElement) {
pLoadedList.push(thisElement);
}
function serverTimer() {
trace("TIMER FINISHED");
if (!pLoaded) {
trace("NOT LOADED");
pBreak = true;
}
clearInterval(pBreak);
}
function createLoadComments() {
var _local5 = 25;
var _local4 = _root.createTextField("skin_loading_text", _root.getNextHighestDepth(), 0, (pGameHeight / 2) - (_local5 / 2), pGameWidth, _local5);
_local4.selectable = false;
var _local3 = new TextFormat();
_local3.font = "Arial";
_local3.size = 18;
_local3.color = 16737843 /* 0xFF6633 */;
_local3.align = "center";
_local4.setNewTextFormat(_local3);
_local4.text = "preparing fizzy game...";
pPreloadComments = new Array();
pPreloadComments.push("Harnessing the gas");
pPreloadComments.push("Inflating the bubbles");
pPreloadComments.push("Adding the juice");
pPreloadComments.push("Starting the mixer");
pPreloadComments.push("Shaking, not stirring");
pPreloadComments.push("Getting ready to serve...");
}
function activateElement(thisElement, thisHolder, thisForce) {
if (isInArray(thisElement, pLoadedList) || (thisForce)) {
var _local3 = new Object();
_local3.myController = this;
_local3.myElement = thisElement;
_local3.X = thisHolder._x;
_local3.Y = thisHolder._y;
_local3.onLoadInit = function (thisClip) {
_root.myFeedback.text = "Load success - " + this.myElement;
thisClip.myX = this.X;
thisClip.myY = this.Y;
thisClip.gotoAndStop("show");
};
var _local5 = new MovieClipLoader();
_local5.addListener(_local3);
trace((((thisElement + " PATH = ") + pSkinPath) + thisElement) + ".swf");
_local5.loadClip(((pSkinPath + thisElement) + ".swf") + pCacheKiller, thisHolder);
}
}
function isInArray(thisItem, thisArray) {
var _local2 = false;
for (var _local3 in thisArray) {
if (thisArray[_local3] == thisItem) {
_local2 = true;
break;
}
}
return(_local2);
}
function getDomain(thisUrl) {
var _local2;
var _local3 = thisUrl.split(":")[0];
switch (_local3) {
case "http" :
case "https" :
var _local1 = thisUrl.split("/");
_local2 = ((((_local1[0] + "/") + _local1[1]) + "/") + _local1[2]) + "/";
break;
default :
_local2 = "default";
}
return(_local2);
}
}
Symbol 367 MovieClip [__Packages.expressinstall] Frame 0
class expressinstall
{
var needsUpdate, updater, hold;
function expressinstall () {
needsUpdate = ((_root.MMplayerType == undefined) ? false : true);
}
function init() {
if (needsUpdate) {
loadUpdater();
return(true);
}
return(false);
}
function loadUpdater() {
System.security.allowDomain("fpdownload.macromedia.com");
updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
var _self = this;
updater.installStatus = _self.onInstallStatus;
hold = updater.createEmptyMovieClip("hold", 1);
updater.onEnterFrame = function () {
if (typeof(this.hold.startUpdate) == "function") {
_self.initUpdater();
this.onEnterFrame = null;
}
};
var _local3 = Math.random();
hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + _local3);
}
function initUpdater() {
hold.redirectURL = _root.MMredirectURL;
hold.MMplayerType = _root.MMplayerType;
hold.MMdoctitle = _root.MMdoctitle;
hold.startUpdate();
}
function onInstallStatus(msg) {
if (msg == "Download.Complete") {
} else if (msg == "Download.Cancelled") {
getURL ("javascript:alert('This content requires a more recent version of the Macromedia Flash Player.')");
} else if (msg == "Download.Failed") {
getURL ("javascript:alert('There was an error downloading the Flash Player update. Please try again later, or visit macromedia.com to download the latest version of the Flash plugin.')");
}
}
}
Symbol 368 MovieClip [__Packages.stattooz] Frame 0
class stattooz
{
var pGameName, pDeveloper, pGenre, pGameType, pGameSkin, pThreshold, pDomain, pAllowedDomains, pPlayer, pGameUrl, pStatsPath;
function stattooz (thisGameName, thisDeveloper, thisGenre, thisGameType, thisGameSkin, thisPlayer, thisThreshold, thisDomain) {
trace("INSTANCE CREATED - STATTOOZ");
pGameName = thisGameName;
pDeveloper = thisDeveloper;
pGenre = thisGenre;
pGameType = thisGameType;
pGameSkin = thisGameSkin;
pThreshold = thisThreshold;
pDomain = thisDomain;
pAllowedDomains = getAllowedDomains();
if (pGameSkin == undefined) {
pGameSkin = "noskin";
}
pPlayer = thisPlayer;
if ((thisPlayer != "activate") && (thisPlayer != "nopirate")) {
pPlayer = System.capabilities.playerType;
}
pGameUrl = _root._url;
pStatsPath = "http://log.stattooz.com";
}
function getAllowedDomains() {
var _local1 = new Array();
_local1.push("http://developer.fizzy.jonathan.3rdsense.local/");
_local1.push("http://developer.fizzy.steve.3rdsense.local/");
_local1.push("http://developer.fizzy.3rdsense.local/");
_local1.push("http://developer.fizzy.deej.3rdsense.local/");
_local1.push("http://developers.fizzy.com/");
_local1.push("http://www.fizzy.com/");
_local1.push("http://www.3rdsense.com/");
_local1.push("http://admin.3rdsense.com/");
_local1.push("http://fizzy.deej.3rdsense.local/");
_local1.push("http://fizzy.steve.3rdsense.local/");
_local1.push("http://fizzy.jonathan.3rdsense.local/");
_local1.push("http://fizzy.3rdsense.local/");
_local1.push("http://fizzy.gamedev.3rdsense.local/");
_local1.push("http://localhost/");
return(_local1);
}
function isDomainAllowed() {
trace("MY DOMAIN = " + _url);
var _local3 = false;
for (var _local4 in pAllowedDomains) {
var _local2 = pAllowedDomains[_local4];
if (_url.indexOf(_local2, 0) == 0) {
_local3 = true;
}
}
trace("DOMAIN ALLOWED = " + _local3);
return(_local3);
}
function reportEvent(thisEventName) {
if (pPlayer != "External") {
var _local2 = getEventId(thisEventName);
sendStat(_local2);
}
}
function sendStat(thisEventID) {
var _local3 = new LoadVars();
var _local4 = new LoadVars();
_local4.pEvent = thisEventID;
_local4.pController = this;
_local4.onLoad = function (success) {
var _local3;
if (success) {
if (this.done == "true") {
_local3 = (("SUCCESS - Stat Reporting - Event: " + this.pEvent) + " Done = ") + this.done;
} else {
_local3 = (("ERROR - Stat Reporting - Event: " + this.pEvent) + " Done = ") + this.done;
}
} else {
_local3 = (("ERROR - Stat Reporting - Event: " + this.pEvent) + " Log file not located: ") + this.pStatsPath;
}
_root.myFeedback.text = _root.myFeedback.text + (_local3 + newline);
};
_local3.skin = pGameSkin;
_local3.gamename = pGameName;
_local3.genre = pGenre;
_local3.developer = pDeveloper;
_local3.url = pGameUrl;
_local3.event = thisEventID;
_local3.type = pGameType;
_local3.sendAndLoad(pStatsPath, _local4, "POST");
}
function getEventId(thisEventName) {
var _local1;
if (!isNaN(Number(thisEventName))) {
_local1 = thisEventName;
} else {
switch (thisEventName) {
case "load" :
_local1 = 1;
break;
case "play" :
_local1 = 2;
break;
case "endpass" :
_local1 = 3;
break;
case "endfail" :
_local1 = 4;
break;
case "submit" :
_local1 = 5;
break;
case "moregames" :
_local1 = 6;
break;
case "creditsview" :
_local1 = 7;
break;
case "creditsthrough" :
_local1 = 8;
break;
case "pirate" :
_local1 = 9;
break;
case "patherror" :
_local1 = 10;
break;
case "skinerror" :
_local1 = 11;
break;
default :
_local1 = 0;
}
}
return(_local1);
}
}
Symbol 192 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
stop();
Symbol 192 MovieClip Frame 2
stop();
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 2
stop();
Symbol 200 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
stop();
Symbol 200 MovieClip Frame 2
stop();
Symbol 202 MovieClip Frame 1
_root.Branditz.activateElement("pirate", this);
stop();
Instance of Symbol 192 MovieClip in Symbol 202 MovieClip Frame 1
on (release) {
_root.doMoreGames();
}
Instance of Symbol 193 MovieClip in Symbol 202 MovieClip Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.doMoreGames();
}
Instance of Symbol 200 MovieClip in Symbol 202 MovieClip Frame 1
on (release) {
_root.doMoreGames();
}
Symbol 208 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
stop();
Symbol 208 MovieClip Frame 2
stop();
Symbol 218 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
stop();
Symbol 218 MovieClip Frame 2
stop();
Symbol 219 MovieClip Frame 1
_root.Stattooz.reportEvent("creditsview");
_root.Branditz.activateElement("credits", this);
myCanvas._width = Stage.width;
myCanvas._height = Stage.height;
myDeveloperName.text = _root.Stattooz.pDeveloper;
myDeveloperButton.onRelease = function () {
var _local2 = "http://www.fizzy.com/developers/profile/" + _root.Stattooz.pDeveloperMachineName;
_root.getURL(_local2, "_blank");
_root.Stattooz.reportEvent("creditsthrough");
};
Instance of Symbol 208 MovieClip "myBackButton" in Symbol 219 MovieClip Frame 1
on (release) {
_root.playAgain();
}
Instance of Symbol 218 MovieClip in Symbol 219 MovieClip Frame 1
on (release) {
_root.doMoreGames();
}
Symbol 223 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 2
stop();
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 2
stop();
Symbol 227 MovieClip Frame 3
stop();
Symbol 228 MovieClip Frame 1
_root.pSound = "on";
_root.toggleSound = function () {
var _local2 = new Sound();
if (_root.pSound == "on") {
_local2.setVolume(0);
_root.pSound = "off";
} else {
_local2.setVolume(100);
_root.pSound = "on";
}
return(_root.pSound);
};
_root.pGraphics = "med";
_root.toggleGraphics = function () {
switch (_root.pGraphics) {
case "high" :
_root.pGraphics = "low";
_root._quality = "LOW";
break;
case "med" :
_root.pGraphics = "high";
_root._quality = "BEST";
break;
case "low" :
_root.pGraphics = "med";
_root._quality = "MEDIUM";
break;
}
return(_root.pGraphics);
};
Instance of Symbol 223 MovieClip in Symbol 228 MovieClip Frame 1
onClipEvent (load) {
var myFrame = _root.pSound;
trace("graphics load = " + myFrame);
this.gotoAndStop(myFrame);
}
on (release) {
var myFrame = _root.toggleSound();
trace(myFrame);
this.gotoAndStop(myFrame);
}
Instance of Symbol 227 MovieClip in Symbol 228 MovieClip Frame 1
onClipEvent (load) {
var myFrame = _root.pGraphics;
trace("graphics load = " + myFrame);
this.gotoAndStop(myFrame);
}
on (release) {
var myFrame = _root.toggleGraphics();
trace(myFrame);
this.gotoAndStop(myFrame);
}
Symbol 235 Button
on (press) {
_root.Stattooz.reportEvent("play");
gotoAndPlay ("game");
sound = new Sound(this);
sound.attachSound("lever");
sound.setVolume(10);
sound.start(0, 1);
}
Symbol 238 Button
on (press) {
gotoAndPlay ("howto");
sound = new Sound(this);
sound.attachSound("lever");
sound.setVolume(10);
sound.start(0, 1);
}
Instance of Symbol 208 MovieClip in Symbol 241 MovieClip Frame 1
on (release) {
_root.gotoAndStop("credits");
}
Symbol 246 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
stop();
Symbol 246 MovieClip Frame 2
stop();
Symbol 248 MovieClip Frame 1
_root.Branditz.activateElement("moregames", this);
if (_root.Branditz.pBuy) {
this.myButtonText.text = "BUY THIS GAME";
}
Instance of Symbol 246 MovieClip in Symbol 248 MovieClip Frame 1
on (rollOver) {
gotoAndStop (1);
}
on (release) {
if (!this.clicked) {
if (_root.Branditz.pBuy) {
_root.doMoreGames();
} else {
_root.doBuyGame();
}
this.clicked = true;
}
}
on (rollOut) {
gotoAndPlay (2);
}
Symbol 256 Button
on (press) {
play();
sound = new Sound(this._parent);
sound.attachSound("lever");
sound.setVolume(10);
sound.start(0, 1);
}
Symbol 261 Button
on (press) {
play();
sound = new Sound(this._parent);
sound.attachSound("lever");
sound.setVolume(10);
sound.start(0, 1);
}
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 273 MovieClip Frame 3
stop();
Symbol 275 Button
on (press) {
gotoAndPlay ("menu");
sound = new Sound(this);
sound.attachSound("lever");
sound.setVolume(10);
sound.start(0, 1);
}
Symbol 282 MovieClip Frame 1
this.gotoAndStop(random(9) + 1);
Symbol 318 Button
on (press) {
_parent.do_flush();
}
Symbol 326 Button
on (press) {
_parent.play();
}
Symbol 334 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 2
sound = new Sound(this);
sound.attachSound("song");
sound.setVolume(50);
sound.start(0, 1);
Symbol 334 MovieClip Frame 17
stop();
Symbol 334 MovieClip Frame 33
_parent.closeMenu();
Symbol 348 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
stop();
Symbol 348 MovieClip Frame 2
stop();
Symbol 349 MovieClip Frame 1
stop();
Symbol 349 MovieClip Frame 2
stop();
Symbol 355 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop (2);
};
this.onRollOut = function () {
gotoAndStop (1);
};
stop();
Symbol 355 MovieClip Frame 2
stop();
Symbol 358 MovieClip Frame 1
stop();
Instance of Symbol 355 MovieClip in Symbol 358 MovieClip Frame 1
on (release) {
_root.playAgain();
}
Instance of Symbol 355 MovieClip in Symbol 358 MovieClip Frame 1
on (release) {
_root.doMoreGames();
}
Instance of Symbol 355 MovieClip in Symbol 362 MovieClip Frame 1
on (release) {
_root.playAgain();
}
Instance of Symbol 355 MovieClip in Symbol 362 MovieClip Frame 1
on (release) {
getURL ((("https://www.fizzy.com/buy/start/" + _root.Stattooz.pGameName) + "?a_aid=") + _root.Affiliateid);
}
Symbol 364 MovieClip Frame 1
stop();
Instance of Symbol 355 MovieClip in Symbol 364 MovieClip Frame 1
on (release) {
_root.playAgain();
}
Symbol 365 MovieClip Frame 1
_root.Branditz.activateElement("gameover", this);
if (_root.score >= _root.Stattooz.pThreshold) {
_root.Stattooz.reportEvent("endpass");
} else {
_root.Stattooz.reportEvent("endfail");
}
switch (Number(_root.Stattooz.pGameType)) {
case 1 :
this.gotoAndStop("promo");
break;
case 2 :
this.gotoAndStop("ftp");
break;
case 4 :
this.gotoAndStop("demo");
}
stop();
Instance of Symbol 348 MovieClip in Symbol 365 MovieClip Frame 1
onClipEvent (load) {
if (_root.AffiliateProgram != "fizzy") {
this._visible = false;
}
}
on (release) {
_root.doAffiliates();
}
Instance of Symbol 349 MovieClip in Symbol 365 MovieClip Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.doMoreGames();
}
Symbol 365 MovieClip Frame 10
stop();
Symbol 365 MovieClip Frame 20
stop();