Frame 1
stop();
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
Frame 2
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
current_bytes = this.getBytesLoaded();
tot_bytes = this.getBytesTotal();
percent = int((current_bytes / tot_bytes) * 100) + "% ";
if (current_bytes >= tot_bytes) {
gotoAndStop (21);
}
Frame 3
this.gotoAndPlay("loader");
Frame 8
stop();
Frame 15
c1 = _url.indexOf("://") + 3;
c2 = _url.indexOf("/", c1);
domain = _url.substring(c1, c2);
if (((domain == "www.dreamarcade.com") || (domain == "216.55.181.4")) || (domain == "www.ultimatearcade.com")) {
gotoAndStop (21);
} else {
gotoAndStop (21);
}
Frame 21
stop();
Frame 43
function makeWord() {
trace("No.of letters: " + wordArray[count].length);
var i = 0;
while (i < wordArray[count].length) {
duplicateMovieClip ("letterClip", "letterClip" + i, i);
_root.letterClip[i] = _root["letterClip" + i];
if (i == 0) {
_root.letterClip[i]._x = _root.startX;
} else if (0 < i) {
_root.letterClip[i]._x = _root.letterClip[i - 1]._x + 30;
}
_root.letterArray[i] = _root.wordArray[count].substring(i, i + 1);
i++;
}
_root.jumbleLetters();
}
function jumbleLetters() {
trace("letterArray=" + letterArray.join());
var temp = _root.letterArray.concat();
var tempLength = _root.letterArray.length;
j = 0;
while (j < tempLength) {
randomNum = random(temp.length);
_root.letterArrayJumble[j] = temp[randomNum];
temp.splice(randomNum, 1);
_root.letterClip[j].letter = _root.letterArrayJumble[j];
j++;
}
trace("letterArrayJumble=" + letterArrayJumble.join());
if (letterArray.join() == letterArrayJumble.join()) {
trace("***********************************************************");
trace("Trying again!");
trace("***********************************************************");
jumbleLetters();
}
}
function check() {
var actualWord = _root.letterArray.join();
var jumbleWord = _root.letterArrayJumble.join();
if (actualWord == jumbleWord) {
trace("right");
_root.score = _root.score + _root.displayBonus;
_root.changeWord = true;
gotit = new Sound(this);
gotit.attachSound("gotit");
gotit.start();
}
}
function change() {
_root.letterArray.splice(0, _root.letterArray.length);
_root.letterArrayJumble.splice(0, _root.letterArrayJumble.length);
setProperty("_root.letterClip", _y , _root.startY);
_root.wordArray.splice(_root.count, 1);
_root.wordcounting = _root.wordcounting - 1;
nope = new sound(this);
nope.attachSound("nope");
nope.start();
_root.count = random(_root.wordArray.length);
trace("count " + _root.count);
if (_root.wordArray.length != 0) {
_root.removeWord();
_root.makeWord();
} else {
_root.gotoAndStop("over");
}
}
function removeWord() {
var i = 0;
while (i < 20) {
_root["letterclip" + i].removeMovieClip();
i++;
}
}
stop();
var maxTime = 180000;
var wordcounting = 999999999;
var initialWordBonus = 100;
_root.decrementWordBonus = 0.04;
var startX = 350;
var startY = 100;
var score = 0;
wordArray = ["cold", "table", "glow", "pencil", "case", "image", "plug", "clock", "lamp", "chair", "food", "play", "master", "board", "model", "arcade", "games", "salt", "design", "artist", "color", "hair", "nature", "book", "file", "snake", "wave", "pool", "zebra", "food", "flag", "flash", "truck", "snack", "basket", "mail", "brush", "laptop", "paint", "drink", "spray", "pizza", "pasta", "bread"];
var count = random(_root.wordArray.length);
trace("count = " + _root.count);
letterClip = new Array();
letterArray = new Array();
letterArrayJumble = new Array();
clickedArray = new Array();
makeWord();
setProperty("letterClip", _visible , 0);
Instance of Symbol 98 MovieClip "letterClip" in Frame 43
onClipEvent (load) {
_root.wordBonus = _root.initialWordBonus;
_root.displayBonus = _root.wordBonus;
}
onClipEvent (enterFrame) {
if (_root.move) {
this._y = this._y + 1;
_root.wordBonus = _root.wordBonus - _root.decrementWordBonus;
_root.displayBonus = int(_root.wordBonus);
} else {
this._y = this._y;
}
if (310 < this._y) {
this.removeMovieClip();
_root.change();
}
}
Instance of Symbol 104 MovieClip in Frame 43
onClipEvent (load) {
maxTime = _root.maxTime;
timeStart = getTimer();
}
onClipEvent (enterFrame) {
timeElapsed = maxTime - (getTimer() - timeStart);
timeRealSeconds = Math.floor(timeElapsed / 1000);
timeMinutes = Math.floor(timeRealSeconds / 60);
timeSeconds = timeRealSeconds - (timeMinutes * 60);
if (timeSeconds < 10) {
timeseconds = String("0" + timeseconds);
}
if ((0 >= timeSeconds) && (0 >= timeMinutes)) {
_root.gotoAndStop("over");
}
_root.timer = int(getTimer() / 1000);
if ((_root.timer % 2) == 0) {
_root.move = true;
} else {
_root.move = false;
}
if (_root.changeWord) {
_root.changeWord = false;
var i;
i = 0;
while (i < _root.letterArrayJumble.length) {
eval ("_root.letterClip" + i).gotoAndPlay(2);
this.gotoAndPlay(2);
i++;
}
}
}
Instance of Symbol 111 MovieClip "finalpoints" in Frame 43
onClipEvent (load) {
this._visible = 0;
}
Frame 44
stop();
_root.letterclip.removeMovieClip();
_root.removeWord();
finalpoints._visible = 1;
Frame 45
stop();
Frame 48
getURL ("http://www.ultimatearcade.com/arcade/games/puzzles/letter_switch/reset.html");
Symbol 25 MovieClip Frame 112
_root.gotoAndStop("loader");
Symbol 40 Button
on (release) {
getURL ("http://www.ultimatearcade.com", "_blank");
}
Symbol 57 Button
on (release) {
_root.play();
}
Symbol 69 Button
on (release) {
getURL ("http://wwww.ultimatearcade.com/", "_blank");
}
Symbol 73 Button
on (release) {
getURL ("http://wwww.ultimatearcade.com/downloads", "_blank");
}
Symbol 77 Button
on (release) {
getURL ("http://wwww.ultimatearcade.com/maillist/signup.html", "_blank");
}
Symbol 84 MovieClip Frame 10
stop();
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 2
stop();
Symbol 96 Button
on (release) {
trace(this._name);
var fullName = this._name;
var name = fullName.substr(10, 1);
trace(name);
if (_root.clickedArray[0] == null) {
_root.clickedArray[0] = name;
trace(_root.clickedArray[0]);
trace("yes1");
this.oval.gotoAndPlay(2);
} else if ((_root.clickedArray[0] != null) && (_root.clickedArray[1] == null)) {
_root.clickedArray[1] = name;
trace(_root.clickedArray[1]);
trace("yes2");
var i;
i = 0;
while (i < _root.letterArrayJumble.length) {
eval ("_root.letterClip" + i).oval.gotoAndStop(1);
i++;
}
var letter1 = _root.letterArrayJumble[_root.clickedArray[0]];
var letter2 = _root.letterArrayJumble[_root.clickedArray[1]];
trace("letter1=" + letter1);
trace("letter2=" + letter2);
_root.letterArrayJumble[_root.clickedArray[1]] = letter1;
_root.letterArrayJumble[_root.clickedArray[0]] = letter2;
_root.letterClip[_root.clickedArray[1]].letter = letter1;
_root.letterClip[_root.clickedArray[0]].letter = letter2;
_root.clickedArray.splice(0, 2);
trace("Clicked=" + _root.clickedArray.length);
_root.check();
}
}
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 11
_root.change();
this.removeMovieClip();
Symbol 121 MovieClip Frame 1
stopAllSounds();
Symbol 121 MovieClip Frame 60
stop();
Symbol 128 Button
on (release) {
_root.view_scores = 2;
loadMovieNum ("scores.swf", 25);
gotoAndStop (2);
}
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
stop();
Symbol 133 Button
on (release) {
gotoAndPlay (1);
}