Frame 1
b1 = _root.getBytesLoaded();
b2 = _root.getBytesTotal();
tgPrel = 1 + Math.round((b1 * 100) / b2);
prel.gotoAndStop(tgPrel);
if (b1 >= b2) {
gotoAndPlay ("intro");
}
Frame 4
if (Math.round(b1 / 1024) <= 35) {
gotoAndPlay ("loop1");
}
Frame 5
_root.b1 = _root.getBytesLoaded();
_root.b2 = _root.getBytesTotal();
_root.tgPrel = 1 + Math.round((b1 * 100) / b2);
_root.tg = _root.tgPrel - 2;
trace("_root.tg: " + _root.tg);
if (_root.tg <= 9) {
_root.procent = "0" + _root.tg;
} else {
_root.procent = _root.tg;
}
_root.prel.gotoAndStop(_root.tgPrel);
Frame 9
if (Math.round(b1 / 1024) <= 100) {
gotoAndPlay ("loop2");
}
Frame 11
_root.b1 = _root.getBytesLoaded();
_root.b2 = _root.getBytesTotal();
_root.tgPrel = 1 + Math.round((b1 * 100) / b2);
_root.tg = _root.tgPrel - 2;
trace("_root.TG: " + tgPrel);
if (_root.tgPrel <= 9) {
_root.procent = "0" + tg;
trace(_root.procent);
} else {
_root.procent = tg;
}
_root.prel.gotoAndStop(_root.tgPrel);
Frame 14
if (b1 < b2) {
gotoAndPlay ("loop3");
}
Frame 15
_root.procent = "--";
prel.gotoAndStop(100);
Frame 166
Frame 174
Frame 175
_root.instructions._visible = false;
stopAllSounds();
_root.timp = 60;
_root.totalScoreTxt = 0;
_root.gameover.removeMovieClip();
_root.gameclear.removeMovieClip();
_root.getready.removeMovieClip();
game.score = 0;
game.selected = [];
game.flagStart = false;
game.firstStart = true;
game.GAME_TIME = 60;
game.timer = 0;
stop();
Instance of Symbol 133 MovieClip "butoane" in Frame 175
//component parameters
onClipEvent (initialize) {
wynume = "CosmicSwich";
wyculoare = 4280447 /* 0x41507F */;
wyasezare = "Vertical";
wyaliniere = "Stanga";
wypozitie = "Jos";
wyinstructions = true;
}
Frame 176
function DispatchGameData() {
var _local1 = _root;
if (_local1.pauza == false) {
_local1.score = _local1.scoreTxt + 969696;
this.loadVariables((_local1.dir + "game_record.") + _local1.scripttype, "POST");
}
}
System.useCodepage = true;
var score = 0;
_root.pauza = false;
_root.pau._visible = false;
_root.goalScore = 300;
cell._visible = false;
game = {};
game.board = _root.gameBoard;
game.board.game = game;
game.width = 8;
game.height = 8;
game.middle = Math.ceil(game.width / 2);
game.pixelwidth = 300;
game.pixelheight = 300;
game.xspacing = game.pixelwidth / game.width;
game.yspacing = game.pixelheight / game.height;
game.types = 5;
game.depth = 100;
game.speed = 12;
game.score = 0;
game.selected = [];
game.flagStart = false;
game.firstStart = true;
game.GAME_TIME = 60;
game.timer = 0;
game.selectItem = function (xm, ym) {
var _local1 = this;
var x = Math.ceil(xm / _local1.xspacing);
var _local3 = Math.ceil(ym / _local1.yspacing);
var cellClicked = ((("cell" + x) + "_") + _local3);
var _local2 = _local1[cellClicked];
if (!_local1.locked) {
if ((_local1.selected[0].x == x) && (_local1.selected[0].y == _local3)) {
_local1.selected[0].clip.select._visible = false;
_local1.selected = [];
} else {
_local2.clip.select._visible = true;
_local1.selected.push(_local2);
if (_local1.selected.length == 2) {
_local1.locked = true;
_local1.swapPlaces();
}
}
}
};
game.doneSlidingBack = function () {
var _local1 = this;
_local1.slid++;
if (_local1.slid == 2) {
_local1.locked = false;
}
};
game.addNewItems = function () {
var _local1 = this;
delete _local1.matched;
_local1.totalMoving = 0;
_local1.totalDoneMoving = 0;
var tempFunction = function () {
var _local1 = this;
if (!_local1.game.pause) {
_local1._x = _local1._x + _local1.speed;
_local1.x = (_local1.me.x - 0.5) * _local1.game.xspacing;
if (Math.abs(_local1._x - _local1.x) <= Math.abs(_local1.speed)) {
_local1._x = _local1.x;
_local1.game.doneMoving();
_local1.onEnterFrame = null;
}
}
};
if (_local1.left.length > 0) {
_local1.left.sortOn("x");
var _local2 = [];
var i = 0;
while (i < _local1.left.length) {
var keepGoing = true;
var j = 0;
while (keepGoing) {
if ((_local1.left[i].y == _local2[j][0].y) || (_local2[j] == undefined)) {
if (_local2[j][0] == undefined) {
_local2[j] = [];
}
_local1.totalmoving++;
_local2[j].push(_local1.left[i]);
var keepGoing = false;
}
j++;
}
i++;
}
var i = 0;
while (i < _local2.length) {
var xshift = 1;
var stayHere = true;
var rowTotal = _local2[i].length;
var tempOb = {};
while ((_local2[i].length > 0) && (stayHere)) {
var ob = _local2[i].pop();
var nextHole = _local2[i][_local2[i].length - xshift];
var beginX = (ob.x - 1);
var x = beginX;
var y = ob.y;
var keepGoing = true;
while (keepGoing) {
var tempName = ((("cell" + x) + "_") + y);
if (_local1[tempName].name != nextHole.name) {
var _local3 = ob.name;
delete _local1[_local3];
_local1[_local3] = {};
newCell = _local1[_local3];
newCell.x = x + xshift;
newCell.y = y;
newCell.name = _local3;
newCell.clip = _local1[tempName].clip;
newCell.type = _local1[tempName].type;
newCell.clip.onEnterFrame = tempFunction;
newCell.clip.speed = _local1.speed;
newCell.clip.game = _local1;
newCell.clip.me = newCell;
newCell.clip.x = (newCell.x - 0.5) * _local1.xspacing;
newCell.clip.y = (newCell.y - 0.5) * _local1.yspacing;
_local2[i].unshift(_local1[tempname]);
if (!tempOb[_local3].moving) {
tempOb[_local3].moving = true;
}
var xshift = 1;
var keepGoing = false;
} else if (_local1[tempName].name == nextHole.name) {
if (x > 1) {
x--;
xshift++;
var nextHole = _local2[i][_local2[i].length - xshift];
} else {
var numToAdd = rowTotal;
var n = 1;
while (n <= numToAdd) {
var stayHere = false;
var keepGoing = false;
var type = (random(_local1.types) + 1);
var x = n;
var name = ((("cell" + x) + "_") + y);
_local1[name] = {x:x, y:y, name:name, type:type};
_local1.addNewLeftClip(_local1[name], numToAdd);
_local1[name].clip.onEnterFrame = tempFunction;
_local1[name].clip.gotoAndStop(type);
n++;
}
}
}
}
}
i++;
}
}
if (_local1.right.length > 0) {
_local1.right.sortOn("x");
var _local2 = [];
var i = 0;
while (i < _local1.right.length) {
var keepGoing = true;
var j = 0;
while (keepGoing) {
if ((_local1.right[i].y == _local2[j][0].y) || (_local2[j] == undefined)) {
if (_local2[j][0] == undefined) {
_local2[j] = [];
}
_local2[j].push(_local1.right[i]);
_local1.totalmoving++;
var keepGoing = false;
}
j++;
}
i++;
}
now = getTimer();
var i = 0;
while (i < _local2.length) {
if ((getTimer() - now) > 2000) {
trace("break 1");
break;
}
var xshift = 1;
var stayHere = true;
var rowTotal = _local2[i].length;
var tempOb = {};
while ((_local2[i].length > 0) && (stayHere)) {
if ((getTimer() - now) > 2000) {
trace("break 2");
break;
}
var ob = _local2[i].shift();
var nextHole = _local2[i][xshift - 1];
var beginX = (ob.x + 1);
var x = beginX;
var y = ob.y;
var keepGoing = true;
while (keepGoing) {
if ((getTimer() - now) > 2000) {
trace("break 3");
break;
}
var tempName = ((("cell" + x) + "_") + y);
if (_local1[tempName].name != nextHole.name) {
var _local3 = ob.name;
delete _local1[_local3];
_local1[_local3] = {};
newCell = _local1[_local3];
newCell.x = x - xshift;
newCell.y = y;
newCell.name = _local3;
newCell.clip = _local1[tempName].clip;
newCell.type = _local1[tempName].type;
newCell.clip.onEnterFrame = tempFunction;
newCell.clip.speed = -_local1.speed;
newCell.clip.game = _local1;
newCell.clip.me = newCell;
newCell.clip.x = (newCell.x - 0.5) * _local1.xspacing;
newCell.clip.y = (newCell.y - 0.5) * _local1.yspacing;
_local2[i].push(_local1[tempname]);
if (!tempOb[_local3].moving) {
tempOb[_local3].moving = true;
}
var xshift = 1;
var keepGoing = false;
} else if (_local1[tempName].name == nextHole.name) {
if (x < _local1.width) {
x++;
xshift++;
var nextHole = _local2[i][xshift - 1];
} else {
var numToAdd = rowTotal;
var n = 1;
while (n <= numToAdd) {
var stayHere = false;
var keepGoing = false;
var type = (random(_local1.types) + 1);
var x = ((_local1.width - n) + 1);
var name = ((("cell" + x) + "_") + y);
_local1[name] = {x:x, y:y, name:name, type:type};
_local1.addNewRightClip(_local1[name], (rowTotal - n) + 0.5);
_local1[name].clip.onEnterFrame = tempFunction;
_local1[name].clip.gotoAndStop(type);
n++;
}
}
}
}
}
i++;
}
}
delete _local1.right;
delete _local1.left;
};
game.doneMoving = function () {
var _local1 = this;
_local1.totalDoneMoving++;
if (_local1.totalDoneMoving == _local1.totalMoving) {
var _local2 = _local1.checkForMatches();
if (_local2) {
_local1.playSquish();
_local1.removeItems();
} else {
_local1.selected = [];
_local1.locked = false;
_local1.displayPatch();
}
}
};
game.displayPatch = function () {
var _local3 = this;
var i = 1;
while (i <= _local3.width) {
var _local2 = 1;
while (_local2 <= _local3.height) {
var name = ((("cell" + i) + "_") + _local2);
var _local1 = _local3[name];
_local1.clip._x = (_local1.x - 0.5) * _local3.xspacing;
_local1.clip._y = (_local1.y - 0.5) * _local3.yspacing;
_local1.clip.onEnterFrame = null;
_local2++;
}
i++;
}
};
game.addNewRightClip = function (who, num) {
var _local1 = who;
var _local2 = this;
var newDepth = (++_local2.depth);
var _local3 = "fruit" + newDepth;
_local2.board.attachMovie("fruit", _local3, newDepth);
var tempx = ((_local1.x - 0.5) * _local2.xspacing);
var tempy = ((_local1.y - 0.5) * _local2.yspacing);
_local1.clip = _local2.board[_local3];
var a = (_local2.width + num);
var placex = (a * _local2.xspacing);
_local1.clip.me = _local1;
_local1.clip.dir = "right";
_local1.clip.x = tempx;
_local1.clip.y = tempy;
_local1.clip._x = placex;
_local1.clip._y = tempy;
_local1.clip.speed = -_local2.speed;
_local1.clip.game = _local2;
_local1.clip.gotoAndStop(_local1.type);
};
game.addNewLeftClip = function (who, num) {
var _local1 = who;
var _local2 = this;
var newDepth = (++_local2.depth);
var _local3 = "fruit" + newDepth;
_local2.board.attachMovie("fruit", _local3, newDepth);
var tempx = ((_local1.x - 0.5) * _local2.xspacing);
var placex = ((((num + 1) - _local1.x) - 0.5) * _local2.xspacing);
var tempy = ((_local1.y - 0.5) * _local2.yspacing);
_local1.clip = _local2.board[_local3];
_local1.clip.me = _local1;
_local1.clip.dir = "left";
_local1.clip.x = tempx;
_local1.clip.y = tempy;
_local1.clip._x = -placex;
_local1.clip._y = tempy;
_local1.clip.speed = _local2.speed;
_local1.clip.game = _local2;
_local1.clip.gotoAndStop(_local1.type);
};
game.premove = function () {
var _local1 = this;
_local1.left = [];
_local1.right = [];
var _local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local1.matched[_local2].x <= _local1.middle) {
_local1.left.push(_local1.matched[_local2]);
} else {
_local1.right.push(_local1.matched[_local2]);
}
_local2++;
}
_local1.addNewItems();
};
game.removed = function (who) {
var _local1 = this;
who.removeMovieClip();
_local1.removedSoFar++;
if (_local1.removedSoFar == _local1.itemsToRemove) {
_local1.premove();
}
};
game.removeItems = function () {
var _local2 = this;
_local2.itemsToRemove = _local2.matched.length;
_local2.removedSoFar = 0;
var _local1 = 0;
while (_local1 < _local2.matched.length) {
_local2.matched[_local1].clip.fruit.game = _local2;
_local2.matched[_local1].clip.fruit.play();
_local1++;
}
};
game.playSquish = function () {
var _local1 = _root;
_local1.squish = new Sound();
_local1.squish.attachSound("squish");
_local1.squish.setVolume(100);
if (_local1.sunet == true) {
_local1.squish.start();
}
};
game.playSwapBack = function () {
var _local1 = _root;
_local1.swapback = new Sound();
_local1.swapback.attachSound("nomatch");
_local1.swapback.setVolume(100);
if (_local1.sunet == true) {
_local1.swapback.start();
}
};
game.playSelect = function () {
var _local1 = _root;
_local1.select = new Sound();
_local1.select.attachSound("select");
_local1.select.setVolume(100);
if (_local1.sunet == true) {
_local1.select.start();
}
};
game.playBegin = function () {
var _local1 = _root;
_local1.begin = new Sound();
_local1.begin.attachSound("start");
_local1.begin.setVolume(100);
if (_local1.sunet == true) {
_local1.begin.start();
}
};
game.playWin = function () {
var _local1 = _root;
_local1.win = new Sound();
_local1.win.attachSound("cong");
_local1.win.setVolume(70);
if (_local1.sunet == true) {
_local1.win.start();
}
};
game.playEnding = function () {
var _local1 = _root;
_local1.ending = new Sound();
_local1.ending.attachSound("ending");
_local1.ending.setVolume(60);
if (_local1.sunet == true) {
_local1.ending.start();
}
};
game.playBackground = function () {
var _local1 = _root;
_local1.playBackground = new Sound();
_local1.playBackground.attachSound("backgroundSound");
_local1.playBackground.setVolume(50);
if (_local1.sunet == true) {
_local1.playBackground.start(0, 1000);
}
};
game.doneSliding = function () {
var _local1 = this;
_local1.slid++;
if (_local1.slid == 2) {
var _local2 = _local1.verifySelections();
if (_local2) {
_local1.playSquish();
_local1.removeItems();
} else {
_local1.playSwapBack();
_local1.swapBack();
_local1.selected = [];
}
}
};
game.swapBack = function () {
var _local1 = this;
_local1.slid = 0;
var cell1 = _local1.selected[0];
var _local3 = _local1.selected[1];
var _local2 = function () {
var _local1 = this;
_local1.xmov = (_local1.homex - _local1._x) * _local1.k;
_local1.ymov = (_local1.homey - _local1._y) * _local1.k;
_local1._x = _local1._x + _local1.xmov;
_local1._y = _local1._y + _local1.ymov;
if ((Math.abs(_local1.xmov) < 1) && (Math.abs(_local1.ymov) < 1)) {
_local1._x = _local1.homex;
_local1._y = _local1.homey;
_local1.game.doneSlidingBack();
_local1.onEnterFrame = null;
}
};
cell1.clip.onEnterFrame = _local2;
_local3.clip.onEnterFrame = _local2;
};
game.swapPlaces = function () {
var _local1 = this;
_local1.slid = 0;
var _local3 = _local1.selected[0];
var _local2 = _local1.selected[1];
_local3.clip.select._visible = false;
_local2.clip.select._visible = false;
_local3.clip.x = _local2.clip._x;
_local3.clip.homex = _local3.clip._x;
_local2.clip.homex = _local2.clip._x;
_local3.clip.homey = _local3.clip._y;
_local2.clip.homey = _local2.clip._y;
_local3.clip.y = _local2.clip._y;
_local3.clip.k = 0.3;
_local2.clip.k = 0.3;
_local2.clip.x = _local3.clip._x;
_local2.clip.y = _local3.clip._y;
_local3.clip.go = true;
_local2.clip.go = true;
_local3.clip.game = _local1;
_local2.clip.game = _local1;
var tempFunction = function () {
var _local1 = this;
if (_local1.go) {
_local1.xmov = (_local1.x - _local1._x) * _local1.k;
_local1.ymov = (_local1.y - _local1._y) * _local1.k;
_local1._x = _local1._x + _local1.xmov;
_local1._y = _local1._y + _local1.ymov;
if ((Math.abs(_local1.xmov) < 1) && (Math.abs(_local1.ymov) < 1)) {
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.game.doneSliding();
_local1.go = false;
}
}
};
_local3.clip.onEnterFrame = tempFunction;
_local2.clip.onEnterFrame = tempFunction;
};
game.addToMatch = function (which) {
var _local2 = this;
var okToInsert = true;
var _local3 = which;
var _local1 = 0;
while (_local1 < _local2.matched.length) {
if ((_local2.matched[_local1].x == _local3.x) && (_local2.matched[_local1].y == _local3.y)) {
var okToInsert = false;
}
_local1++;
}
if (okToInsert) {
_local2.matched.push(which);
}
};
game.checkForMatches = function () {
var _local1 = this;
var returnVal = false;
_local1.matched = [];
var i = 1;
while (i <= _local1.width) {
var _local3 = 1;
while (_local3 <= _local1.height) {
var matchFound = false;
var _local2 = _local1[(("cell" + i) + "_") + _local3];
var rightCell1 = _local1[(("cell" + (i + 1)) + "_") + _local3];
var rightCell2 = _local1[(("cell" + (i + 2)) + "_") + _local3];
var rightCell3 = _local1[(("cell" + (i + 3)) + "_") + _local3];
var rightCell4 = _local1[(("cell" + (i + 4)) + "_") + _local3];
var bottomCell1 = _local1[(("cell" + i) + "_") + (_local3 + 1)];
var bottomCell2 = _local1[(("cell" + i) + "_") + (_local3 + 2)];
var bottomCell3 = _local1[(("cell" + i) + "_") + (_local3 + 3)];
var bottomCell4 = _local1[(("cell" + i) + "_") + (_local3 + 4)];
if ((_local2.type == rightCell1.type) && (_local2.type == rightCell2.type)) {
var matchFound = true;
_local1.addToMatch(_local2);
_local1.addToMatch(rightCell1);
_local1.addToMatch(rightCell2);
_local1.score = _local1.score + 30;
if (_local2.type == rightCell3.type) {
_local1.addToMatch(rightCell3);
_local1.score = _local1.score + 10;
}
if ((_local2.type == rightCell3.type) && (_local2.type == rightCell4.type)) {
_local1.addToMatch(rightCell4);
_local1.score = _local1.score + 10;
}
_root.scoreTxt = _local1.score;
returnVal = true;
}
if ((_local2.type == bottomCell1.type) && (_local2.type == bottomCell2.type)) {
var matchFound = true;
_local1.addToMatch(_local2);
_local1.addToMatch(bottomCell1);
_local1.addToMatch(bottomCell2);
_local1.score = _local1.score + 30;
if (_local2.type == bottomCell3.type) {
_local1.addToMatch(bottomCell3);
_local1.score = _local1.score + 10;
}
if ((_local2.type == bottomCell3.type) && (_local2.type == bottomCell4.type)) {
_local1.addToMatch(bottomCell4);
_local1.score = _local1.score + 10;
}
_root.scoreTxt = _local1.score;
trace(_local1.score);
returnVal = true;
}
_local3++;
}
i++;
}
return(returnVal);
};
game.areThereMatches = function () {
var _local1 = this;
var valid = false;
var b = 0;
while (b < 2) {
var m = 1;
while (m <= _local1.height) {
var n = 1;
while (n <= _local1.width) {
if (b == 0) {
var tempx1 = n;
var tempy1 = m;
var tempx2 = (tempx1 + 1);
var tempy2 = tempy1;
} else {
var tempx1 = n;
var tempy1 = m;
var tempx2 = tempx1;
var tempy2 = (tempy1 + 1);
}
var _local3 = _local1[(("cell" + tempx1) + "_") + tempy1];
var _local2 = _local1[(("cell" + tempx2) + "_") + tempy2];
var valid = false;
var oldCell1 = _local3;
var oldCell2 = _local2;
var cell1Name = _local3.name;
var cell2Name = _local2.name;
if ((_local3.x == _local2.x) && (((_local3.y - 1) == _local2.y) || ((_local3.y + 1) == _local2.y))) {
_local1[oldCell1.name] = oldCell2;
_local1[oldCell2.name] = oldCell1;
var valid = _local1.checkForMatches();
}
if ((_local3.y == _local2.y) && (((_local3.x - 1) == _local2.x) || ((_local3.x + 1) == _local2.x))) {
_local1[oldCell1.name] = oldCell2;
_local1[oldCell2.name] = oldCell1;
var valid = _local1.checkForMatches();
}
_local1[oldCell1.name] = oldCell1;
_local1[oldCell2.name] = oldCell2;
if (valid) {
break;
}
n++;
}
if (valid) {
break;
}
m++;
}
if (valid) {
break;
}
b++;
}
trace(valid);
if (valid) {
trace("x1=" + tempx1);
trace("y1=" + tempy1);
trace("x2=" + tempx2);
trace("y2=" + tempy2);
}
};
game.verifySelections = function () {
var _local1 = this;
var _local3 = _local1.selected[0];
var _local2 = _local1.selected[1];
var valid = false;
var oldCell1 = _local3;
var oldCell2 = _local2;
var cell1Name = _local3.name;
var cell2Name = _local2.name;
if ((_local3.x == _local2.x) && (((_local3.y - 1) == _local2.y) || ((_local3.y + 1) == _local2.y))) {
_local1[oldCell1.name] = oldCell2;
_local1[oldCell2.name] = oldCell1;
var valid = _local1.checkForMatches();
}
if ((_local3.y == _local2.y) && (((_local3.x - 1) == _local2.x) || ((_local3.x + 1) == _local2.x))) {
_local1[oldCell1.name] = oldCell2;
_local1[oldCell2.name] = oldCell1;
var valid = _local1.checkForMatches();
}
if (!valid) {
_local1[oldCell1.name] = oldCell1;
_local1[oldCell2.name] = oldCell2;
_local3.clip.select._visible = false;
_local2.clip.select._visible = false;
} else {
var x1 = _local1[cell1Name].x;
var y1 = _local1[cell1Name].y;
var x2 = _local1[cell2Name].x;
var y2 = _local1[cell2Name].y;
_local1[cell1Name].x = x2;
_local1[cell1Name].y = y2;
_local1[cell2Name].x = x1;
_local1[cell2Name].y = y1;
_local1[cell1Name].name = cell1Name;
_local1[cell2Name].name = cell2Name;
}
return(valid);
};
game.board.onMouseDown = function () {
var _local1 = this;
if (_root.pauza == false) {
if (_local1.hitTest(_local1._parent._xmouse, _local1._parent._ymouse) && (_root.game.flagStart == true)) {
_local1.game.playSelect();
_local1.game.selectItem(_local1._xmouse, _local1._ymouse);
}
}
};
game.addClip = function (who) {
var _local1 = who;
var _local2 = this;
if (_root.pauza == false) {
var newDepth = (++_local2.depth);
var _local3 = "fruit" + newDepth;
_local2.board.attachMovie("fruit", _local3, newDepth);
_local1.clip = _local2.board[_local3];
_local1.clip._x = (_local1.x - 0.5) * _local2.xspacing;
_local1.clip._y = (_local1.y - 0.5) * _local2.yspacing;
_local1.clip.gotoAndStop(_local1.type);
}
};
game.generateBoard = function () {
var _local1 = this;
if (_root.pauza == false) {
var _local3 = 1;
while (_local3 <= _local1.width) {
var _local2 = 1;
while (_local2 <= _local1.height) {
var name = ((("cell" + _local3) + "_") + _local2);
var leftCell = ((("cell" + (_local3 - 1)) + "_") + _local2);
var farLeftCell = ((("cell" + (_local3 - 2)) + "_") + _local2);
var topCell = ((("cell" + _local3) + "_") + (_local2 - 1));
var farTopCell = ((("cell" + _local3) + "_") + (_local2 - 2));
var keepLooking = true;
while (keepLooking) {
var keepLooking = false;
var type = (random(_local1.types) + 1);
if (((_local1[leftCell].type == type) && (_local1[farLeftCell].type == type)) || ((_local1[topCell].type == type) && (_local1[farTopCell].type == type))) {
var keepLooking = true;
}
}
_local1[name] = {x:_local3, y:_local2, name:name, type:type};
_local1.addClip(_local1[name]);
_local2++;
}
_local3++;
}
}
};
start_btn.onPress = function () {
var _local1 = _root;
if (_local1.pauza == false) {
if ((_local1.game.flagStart == false) && (_local1.game.firstStart == true)) {
_local1.game.playBegin();
_local1.game.score = 0;
_local1.scoreTxt = _local1.game.score;
_local1.game.flagStart = true;
_local1.game.firstStart = false;
if (_local1.getready) {
_local1.getready.removeMovieClip();
}
if (_local1.gameover) {
_local1.ending.stop();
_local1.gameover.removeMovieClip();
}
if (_local1.gameclear) {
_local1.win.stop();
_local1.gameclear.removeMovieClip();
}
}
}
};
_root.onLoad = function () {
var _local1 = _root;
if (_local1.pauza == false) {
_local1.attachMovie("ready_mc", "getready", "1");
_local1.getready._x = 188;
_local1.getready._y = 190;
}
};
_root.onEnterFrame = function () {
var _local1 = _root;
if (_local1.game.flagStart == true) {
if (_local1.timp <= 0) {
if (_local1.game.score >= _local1.goalScore) {
trace(_local1.goalScore);
_local1.attachMovie("clear_mc", "gameclear", "1");
_local1.gameclear._x = 188;
_local1.gameclear._y = 190;
_local1.game.playWin();
} else {
_local1.attachMovie("over_mc", "gameover", "1");
_local1.theMeniu._visible = false;
_local1.gameover._x = 188;
_local1.gameover._y = 190;
_local1.game.playEnding();
}
_local1.game.firstStart = true;
_local1.game.flagStart = false;
if (_local1.dbconnect == "yes") {
DispatchGameData();
}
}
}
};
game.generateBoard();
Instance of Symbol 314 MovieClip "theMeniu" in Frame 176
//component parameters
onClipEvent (initialize) {
wxnume = "CosmicSwich";
wxaliniere = "Dreapta-Jos";
wxculoare = 7420439 /* 0x713A17 */;
wxdownload = true;
wxpause = true;
wxsound = true;
}
Frame 177
if ((_root.game.flagStart == false) && (_root.game.firstStart == true)) {
_root.game.playBegin();
_root.game.score = 0;
_root.scoreTxt = _root.game.score;
_root.game.flagStart = true;
_root.game.firstStart = false;
if (_root.getready) {
_root.getready.removeMovieClip();
}
if (_root.gameover) {
_root.ending.stop();
_root.gameover.removeMovieClip();
}
if (_root.gameclear) {
_root.win.stop();
_root.gameclear.removeMovieClip();
}
}
this.stop();
Frame 178
removeMovieClip(_root.xxc1);
removeMovieClip(_root.xxc2);
removeMovieClip(_root.xxc3);
removeMovieClip(_root.xxc4);
_root.gameover.removeMovieClip();
_root.gameclear.removeMovieClip();
_root.getready.removeMovieClip();
Frame 179
_root.menu.removeMovieClip();
_root.gameid = "SwapCats";
_root.best = totalScoreTxt;
totalScoreTxt = 0;
_root.updated = 0;
_root.done = 0;
done = 0;
i = 1;
while (i <= 100) {
_root["score" + i] = null;
_root["name" + i] = null;
_root["escore" + i] = null;
_root["ename" + i] = null;
i++;
}
Frame 181
cale = "http://www.freeonlinegames.com/scoreboard/score.php?game=" + _root.gameid;
loadVariablesNum (cale, 0, "POST");
Frame 182
if (false) {
}
Frame 189
if (done != 1) {
gotoAndPlay ("loopLoad");
} else {
gotoAndPlay ("scoreTable");
}
Frame 193
monthnume = new Array();
monthscor = new Array();
i = 1;
while (i <= 100) {
monthnume[i] = _root["name" + i];
monthscor[i] = Number(_root["score" + i].slice(0, _root["score" + i].length - 1));
i++;
}
evernume = new Array();
everscor = new Array();
i = 1;
while (i <= 100) {
evernume[i] = _root["ename" + i];
everscor[i] = Number(_root["escore" + i].slice(0, _root["escore" + i].length - 1));
i++;
}
Frame 194
stop();
if (_root.best > everscor[100]) {
scoreWind.gotoAndStop("submitScoreYes");
} else {
scoreWind.gotoAndStop("submitScoreNo");
}
if (_root.xdada == 1) {
scoreWind.gotoAndStop("topEver");
}
Symbol 8 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
var _local1 = this;
var _local3 = _global;
_local1.enable = true;
_local1.focused = false;
_local1.useHandCursor = false;
_local1._accImpl = new Object();
_local1._accImpl.stub = true;
_local1.styleTable = new Array();
if (_local3.globalStyleFormat == undefined) {
_local3.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_local3._focusControl = new Object();
_local3._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_local3._focusControl);
}
if (_local1._name != undefined) {
_local1._focusrect = false;
_local1.tabEnabled = true;
_local1.focusEnabled = true;
_local1.tabChildren = false;
_local1.tabFocused = true;
if (_local1.hostStyle == undefined) {
globalStyleFormat.addListener(_local1);
} else {
_local1.styleTable = _local1.hostStyle;
}
_local1.deadPreview._visible = false;
_local1.deadPreview._width = (_local1.deadPreview._height = 1);
_local1.methodTable = new Object();
_local1.keyListener = new Object();
_local1.keyListener.controller = _local1;
_local1.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
_local1.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local2 in _local1.styleFormat_prm) {
_local1.setStyleProperty(_local2, _local1.styleFormat_prm[_local2]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
_local1.enable = ((arguments.length > 0) ? (enabledFlag) : true);
_local1.tabEnabled = (_local1.focusEnabled = enabledFlag);
if ((!_local1.enable) && (_local1.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
var _local1 = this;
_local1.width = w;
_local1.height = h;
_local1.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
var _local1 = this;
_local1.handlerObj = ((obj == undefined) ? (_local1._parent) : (obj));
_local1.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
var _local1 = this;
_local1.methodTable[methodName] = true;
_local1.onEnterFrame = _local1.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
var _local1 = this;
if (_local1.methodTable.setSize) {
_local1.setSize(_local1.width, _local1.height);
} else {
_local1.cleanUINotSize();
}
_local1.methodTable = new Object();
delete _local1.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
var _local1 = this;
for (var _local2 in _local1.methodTable) {
_local1[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
var inner = _local1.styleTable.focusRectInner.value;
var outer = _local1.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
_local1.createEmptyMovieClip("focusRect", 1000);
_local1.focusRect.controller = _local1;
_local1.focusRect.lineStyle(1, outer);
_local1.focusRect.moveTo(_local3, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2);
_local1.focusRect.lineStyle(1, inner);
_local1.focusRect.moveTo(_local3 + 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, _local2 + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
var _local1 = this;
_local1.tabFocused = false;
_local1.focusRect.removeMovieClip();
Selection.setFocus(_local1);
};
FUIComponentClass.prototype.drawFocusRect = function () {
var _local1 = this;
_local1.drawRect(-2, -2, _local1.width + 4, _local1.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
var _local1 = this;
_local1.focused = true;
Key.addListener(_local1.keyListener);
if (_local1.tabFocused) {
_local1.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
var _local1 = this;
_local1.tabFocused = true;
_local1.focused = false;
_local1.focusRect.removeMovieClip();
Key.removeListener(_local1.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
var _local1 = this;
_local1.handlerObj[_local1.changeHandler](_local1);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
var _local1 = this;
var _local2 = propName;
if (value == "") {
} else {
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].useGlobal || (!global)) {
_local1.styleTable[_local2].value = value;
if (_local1.setCustomStyleProperty(_local2, value)) {
} else if (_local2 == "embedFonts") {
_local1.invalidate("setSize");
} else if (_local2.subString(0, 4) == "text") {
if (_local1.textStyle == undefined) {
_local1.textStyle = new TextFormat();
}
var textProp = _local2.subString(4, _local2.length);
_local1.textStyle[textProp] = value;
_local1.invalidate("setSize");
} else {
for (var j in _local1.styleTable[_local2].coloredMCs) {
var _local3 = new Color(_local1.styleTable[_local2].coloredMCs[j]);
if (_local1.styleTable[_local2].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local3.setTransform(myTObj);
} else {
_local3.setRGB(value);
}
}
}
_local1.styleTable[_local2].useGlobal = global;
}
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
var _local1 = this;
var _local2 = propName;
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].coloredMCs == undefined) {
_local1.styleTable[_local2].coloredMCs = new Object();
}
_local1.styleTable[_local2].coloredMCs[skinMCRef] = skinMCRef;
if (_local1.styleTable[_local2].value != undefined) {
var _local3 = new Color(skinMCRef);
_local3.setRGB(_local1.styleTable[_local2].value);
}
};
_global.FStyleFormat = function () {
var _local1 = arguments;
var _local2 = this;
_local2.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
_local2.listeners = new Object();
_local2.isGlobal = false;
if (_local1.length > 0) {
for (var _local3 in _local1[0]) {
_local2[_local3] = _local1[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local1 = this;
var _local2 = 0;
while (_local2 < arguments.length) {
var _local3 = arguments[_local2];
_local1.listeners[arguments[_local2]] = _local3;
for (var i in _local1) {
if (_local1.isAStyle(i)) {
_local3.updateStyleProperty(_local1, i.toString());
}
}
_local2++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
var _local1 = this;
var _local2 = component;
_local1.listeners[_local2] = undefined;
for (var prop in _local1) {
if (_local1.isAStyle(prop)) {
if (_local2.styleTable[prop].useGlobal == _local1.isGlobal) {
_local2.styleTable[prop].useGlobal = true;
var _local3 = (_local1.isGlobal ? undefined : (globalStyleFormat[prop]));
_local2.setStyleProperty(prop, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local1 = this;
var _local2 = arguments;
var count = 0;
for (var i in _local1.listeners) {
var _local3 = _local1.listeners[i];
if (_local2.length > 0) {
var j = 0;
while (j < _local2.length) {
if (_local1.isAStyle(_local2[j])) {
_local3.updateStyleProperty(_local1, _local2[j]);
}
j++;
}
} else {
for (var j in _local1) {
if (_local1.isAStyle(j)) {
_local3.updateStyleProperty(_local1, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 21 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 30 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 39 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 40 MovieClip [UpArrow] Frame 1
stop();
Symbol 40 MovieClip [UpArrow] Frame 2
stop();
Symbol 40 MovieClip [UpArrow] Frame 3
stop();
Symbol 46 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 55 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 60 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 61 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 69 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 77 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 85 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 86 MovieClip [DownArrow] Frame 1
stop();
Symbol 86 MovieClip [DownArrow] Frame 2
stop();
Symbol 86 MovieClip [DownArrow] Frame 3
stop();
Symbol 92 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wynume) + ".exe";
getURL (targetul1);
}
Symbol 100 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 100 MovieClip Frame 2
wxculoarea2 = new Color(but1);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 100 MovieClip Frame 3
wxculoarea2 = new Color(but1);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 101 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wynume;
getURL (targetul2, "_blank");
}
Symbol 108 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 108 MovieClip Frame 2
wxculoarea2 = new Color(but2);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 108 MovieClip Frame 3
wxculoarea2 = new Color(but2);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 109 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?" + _parent.wynume;
getURL (targetul3, "_blank");
}
Symbol 112 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 112 MovieClip Frame 2
wxculoarea2 = new Color(but3);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 112 MovieClip Frame 3
wxculoarea2 = new Color(but3);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 117 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wynume) + ".exe";
getURL (targetul1);
}
Symbol 118 MovieClip Frame 1
stop();
Symbol 121 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wynume;
getURL (targetul2, "_blank");
}
Symbol 122 MovieClip Frame 1
stop();
Symbol 123 Button
on (release, keyPress "p") {
_parent.instructionsFunction();
}
Symbol 130 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 130 MovieClip Frame 2
wxculoarea2 = new Color(but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 130 MovieClip Frame 3
wxculoarea2 = new Color(but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 131 Button
on (release, keyPress "p") {
_parent.instructionsFunction();
}
Symbol 132 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
function instructionsFunction() {
var _local1 = _root;
_local1.instructions._visible = true;
_local1.start_btn._visible = false;
_local1.butoane._visible = false;
}
stop();
if ((wyasezare == "Orizontal") && (wyinstructions == false)) {
this.gotoAndStop(2);
}
if (((wyasezare == "Vertical") && (wyinstructions == true)) && (wypozitie == "Sus")) {
this.gotoAndStop(3);
}
if (((wyasezare == "Vertical") && (wyinstructions == true)) && (wypozitie == "Jos")) {
this.gotoAndStop(4);
}
if (((wyasezare == "Orizontal") && (wyinstructions == true)) && (wypozitie == "Sus")) {
this.gotoAndStop(5);
}
if (((wyasezare == "Orizontal") && (wyinstructions == true)) && (wypozitie == "Jos")) {
this.gotoAndStop(6);
}
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 133 MovieClip Frame 2
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 133 MovieClip Frame 3
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 133 MovieClip Frame 4
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 133 MovieClip Frame 5
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 133 MovieClip Frame 6
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 136 Button
on (release) {
_root.xdada = 0;
_root.gotoAndPlay("submitScore");
}
Instance of Symbol 133 MovieClip in Symbol 139 MovieClip [ready_mc] Frame 1
//component parameters
onClipEvent (initialize) {
wynume = "CosmicSwich";
wyculoare = 4924929 /* 0x4B2601 */;
wyasezare = "Vertical";
wyaliniere = "Stanga";
wypozitie = "Sus";
wyinstructions = true;
}
Symbol 139 MovieClip [ready_mc] Frame 15
this.stop();
Symbol 141 Button
on (release) {
_root.gotoAndPlay("coperta");
}
Instance of Symbol 133 MovieClip in Symbol 144 MovieClip [over_mc] Frame 1
//component parameters
onClipEvent (initialize) {
wynume = "CosmicSwich";
wyculoare = 4924929 /* 0x4B2601 */;
wyasezare = "Vertical";
wyaliniere = "Centru";
wypozitie = "Sus";
wyinstructions = false;
}
Symbol 144 MovieClip [over_mc] Frame 15
this.stop();
_root.totalScoreTxt = _root.totalScoreTxt + _root.scoreTxt;
Symbol 146 Button
on (release) {
_root.timp = 60;
_root.goalScore = _root.goalScore + 150;
if ((_root.game.flagStart == false) && (_root.game.firstStart == true)) {
_root.game.playBegin();
_root.game.score = 0;
_root.scoreTxt = _root.game.score;
_root.game.flagStart = true;
_root.game.firstStart = false;
if (_root.getready) {
_root.getready.removeMovieClip();
}
if (_root.gameover) {
_root.ending.stop();
_root.gameover.removeMovieClip();
}
if (_root.gameclear) {
_root.win.stop();
_root.gameclear.removeMovieClip();
}
}
}
Instance of Symbol 133 MovieClip in Symbol 150 MovieClip [clear_mc] Frame 1
//component parameters
onClipEvent (initialize) {
wynume = "CosmicSwich";
wyculoare = 4924929 /* 0x4B2601 */;
wyasezare = "Vertical";
wyaliniere = "Centru";
wypozitie = "Sus";
wyinstructions = false;
}
Symbol 150 MovieClip [clear_mc] Frame 15
this.stop();
_root.totalScoreTxt = _root.totalScoreTxt + _root.scoreTxt;
Symbol 152 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 153 MovieClip [FScrollBarSymbol] Frame 1
#initclip 2
FScrollBarClass = function () {
var _local1 = this;
if (_local1._height == 4) {
} else {
_local1.init();
_local1.minPos = (_local1.maxPos = (_local1.pageSize = (_local1.largeScroll = 0)));
_local1.smallScroll = 1;
_local1.width = (_local1.horizontal ? (_local1._width) : (_local1._height));
_local1._xscale = (_local1._yscale = 100);
_local1.setScrollPosition(0);
_local1.tabEnabled = false;
if (_local1._targetInstanceName.length > 0) {
_local1.setScrollTarget(_local1._parent[_local1._targetInstanceName]);
}
_local1.tabChildren = false;
_local1.setSize(_local1.width);
}
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
var _local1 = this;
var _local2 = flag;
if (_local1.horizontal && (!_local2)) {
_local1._xscale = 100;
_local1._rotation = 0;
} else if (_local2 && (!_local1.horizontal)) {
_local1._xscale = -100;
_local1._rotation = -90;
}
_local1.horizontal = _local2;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
var _local1 = this;
if (!_local1.enable) {
} else {
_local1.pageSize = pSize;
_local1.minPos = Math.max(mnPos, 0);
_local1.maxPos = Math.max(mxPos, 0);
_local1.scrollPosition = Math.max(_local1.minPos, _local1.scrollPosition);
_local1.scrollPosition = Math.min(_local1.maxPos, _local1.scrollPosition);
if ((_local1.maxPos - _local1.minPos) <= 0) {
_local1.scrollThumb_mc.removeMovieClip();
_local1.upArrow_mc.gotoAndStop(3);
_local1.downArrow_mc.gotoAndStop(3);
_local1.downArrow_mc.onPress = (_local1.downArrow_mc.onRelease = (_local1.downArrow_mc.onDragOut = null));
_local1.upArrow_mc.onPress = (_local1.upArrow_mc.onRelease = (_local1.upArrow_mc.onDragOut = null));
_local1.scrollTrack_mc.onPress = (_local1.scrollTrack_mc.onRelease = null);
_local1.scrollTrack_mc.onDragOut = (_local1.scrollTrack_mc.onRollOut = null);
_local1.scrollTrack_mc.useHandCursor = false;
} else {
var _local2 = _local1.getScrollPosition();
_local1.upArrow_mc.gotoAndStop(1);
_local1.downArrow_mc.gotoAndStop(1);
_local1.upArrow_mc.onPress = (_local1.upArrow_mc.onDragOver = _local1.startUpScroller);
_local1.upArrow_mc.onRelease = (_local1.upArrow_mc.onDragOut = _local1.stopScrolling);
_local1.downArrow_mc.onPress = (_local1.downArrow_mc.onDragOver = _local1.startDownScroller);
_local1.downArrow_mc.onRelease = (_local1.downArrow_mc.onDragOut = _local1.stopScrolling);
_local1.scrollTrack_mc.onPress = (_local1.scrollTrack_mc.onDragOver = _local1.startTrackScroller);
_local1.scrollTrack_mc.onRelease = _local1.stopScrolling;
_local1.scrollTrack_mc.onDragOut = _local1.stopScrolling;
_local1.scrollTrack_mc.onRollOut = _local1.stopScrolling;
_local1.scrollTrack_mc.useHandCursor = false;
_local1.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
_local1.scrollThumb_mc._x = 0;
_local1.scrollThumb_mc._y = _local1.upArrow_mc._height;
_local1.scrollThumb_mc.onPress = _local1.startDragThumb;
_local1.scrollThumb_mc.controller = _local1;
_local1.scrollThumb_mc.onRelease = (_local1.scrollThumb_mc.onReleaseOutside = _local1.stopDragThumb);
_local1.scrollThumb_mc.useHandCursor = false;
_local1.thumbHeight = (_local1.pageSize / ((_local1.maxPos - _local1.minPos) + _local1.pageSize)) * _local1.trackSize;
_local1.thumbMid_mc = _local1.scrollThumb_mc.mc_sliderMid;
_local1.thumbTop_mc = _local1.scrollThumb_mc.mc_sliderTop;
_local1.thumbBot_mc = _local1.scrollThumb_mc.mc_sliderBot;
_local1.thumbHeight = Math.max(_local1.thumbHeight, 6);
_local1.midHeight = (_local1.thumbHeight - _local1.thumbTop_mc._height) - _local1.thumbBot_mc._height;
_local1.thumbMid_mc._yScale = (_local1.midHeight * 100) / _local1.thumbMid_mc._height;
_local1.thumbMid_mc._y = _local1.thumbTop_mc._height;
_local1.thumbBot_mc._y = _local1.thumbTop_mc._height + _local1.midHeight;
_local1.scrollTop = _local1.scrollThumb_mc._y;
_local1.trackHeight = _local1.trackSize - _local1.thumbHeight;
_local1.scrollBot = _local1.trackHeight + _local1.scrollTop;
_local2 = Math.min(_local2, _local1.maxPos);
_local1.setScrollPosition(Math.max(_local2, _local1.minPos));
}
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
var _local1 = this;
var _local2 = pos;
_local1.scrollPosition = _local2;
if (_local1.scrollThumb_mc != undefined) {
_local2 = Math.min(_local2, _local1.maxPos);
_local2 = Math.max(_local2, _local1.minPos);
}
_local1.scrollThumb_mc._y = (((_local2 - _local1.minPos) * _local1.trackHeight) / (_local1.maxPos - _local1.minPos)) + _local1.scrollTop;
_local1.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
var _local2 = enabledFlag;
var _local3 = _local1.enable;
if (_local2 && (!_local3)) {
_local1.enable = _local2;
if (_local1.textField != undefined) {
_local1.setScrollTarget(_local1.textField);
} else {
_local1.setScrollProperties(_local1.pageSize, _local1.cachedMinPos, _local1.cachedMaxPos);
_local1.setScrollPosition(_local1.cachedPos);
}
_local1.clickFilter = undefined;
} else if ((!_local2) && (_local3)) {
_local1.textField.removeListener(_local1);
_local1.cachedPos = _local1.getScrollPosition();
_local1.cachedMinPos = _local1.minPos;
_local1.cachedMaxPos = _local1.maxPos;
if (_local1.clickFilter == undefined) {
_local1.setScrollProperties(_local1.pageSize, 0, 0);
} else {
_local1.clickFilter = true;
}
_local1.enable = _local2;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
var _local1 = this;
if (_local1._height == 1) {
} else {
_local1.width = hgt;
_local1.scrollTrack_mc._yscale = 100;
_local1.scrollTrack_mc._yscale = (100 * _local1.width) / _local1.scrollTrack_mc._height;
if (_local1.upArrow_mc == undefined) {
_local1.attachMovie("UpArrow", "upArrow_mc", 1);
_local1.attachMovie("DownArrow", "downArrow_mc", 2);
_local1.downArrow_mc.controller = (_local1.upArrow_mc.controller = _local1);
_local1.upArrow_mc.useHandCursor = (_local1.downArrow_mc.useHandCursor = false);
_local1.upArrow_mc._x = (_local1.upArrow_mc._y = 0);
_local1.downArrow_mc._x = 0;
}
_local1.scrollTrack_mc.controller = _local1;
_local1.downArrow_mc._y = _local1.width - _local1.downArrow_mc._height;
_local1.trackSize = _local1.width - (2 * _local1.downArrow_mc._height);
if (_local1.textField != undefined) {
_local1.onTextChanged();
} else {
_local1.setScrollProperties(_local1.pageSize, _local1.minPos, _local1.maxPos);
}
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var _local1 = this;
var _local3 = _local1.smallScroll;
if (inc != "one") {
_local3 = ((_local1.largeScroll == 0) ? (_local1.pageSize) : (_local1.largeScroll));
}
var _local2 = _local1.getScrollPosition() + (mode * _local3);
if (_local2 > _local1.maxPos) {
_local2 = _local1.maxPos;
} else if (_local2 < _local1.minPos) {
_local2 = _local1.minPos;
}
_local1.setScrollPosition(_local2);
};
FScrollBarClass.prototype.startDragThumb = function () {
var _local1 = this;
_local1.lastY = _local1._ymouse;
_local1.onMouseMove = _local1.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
var _local1 = this;
_local1.scrollMove = _local1._ymouse - _local1.lastY;
_local1.scrollMove = _local1.scrollMove + _local1._y;
if (_local1.scrollMove < _local1.controller.scrollTop) {
_local1.scrollMove = _local1.controller.scrollTop;
} else if (_local1.scrollMove > _local1.controller.scrollBot) {
_local1.scrollMove = _local1.controller.scrollBot;
}
_local1._y = _local1.scrollMove;
var _local2 = _local1.controller;
_local2.scrollPosition = Math.round(((_local2.maxPos - _local2.minPos) * (_local1._y - _local2.scrollTop)) / _local2.trackHeight) + _local2.minPos;
_local1.controller.isScrolling = true;
updateAfterEvent();
_local1.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
var _local1 = this;
_local1.controller.trackScroller();
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
var _local1 = this;
var _local2 = inc;
clearInterval(_local1.scrolling);
if (_local2 == "page") {
_local1.trackScroller();
} else {
_local1.scrollIt(_local2, mode);
}
_local1.scrolling = setInterval(_local1, "scrollInterval", 35, _local2, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
var _local1 = this;
if ((_local1.scrollThumb_mc._y + _local1.thumbHeight) < _local1._ymouse) {
_local1.scrollIt("page", 1);
} else if (_local1.scrollThumb_mc._y > _local1._ymouse) {
_local1.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
var _local1 = this;
_local1.controller.downArrow_mc.gotoAndStop(1);
_local1.controller.upArrow_mc.gotoAndStop(1);
clearInterval(_local1.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
var _local1 = this;
_local1.controller.upArrow_mc.gotoAndStop(2);
_local1.controller.scrollIt("one", -1);
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
var _local1 = this;
_local1.controller.downArrow_mc.gotoAndStop(2);
_local1.controller.scrollIt("one", 1);
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
var _local1 = this;
var _local2 = tF;
if (_local2 == undefined) {
_local1.textField.removeListener(_local1);
delete _local1.textField[(_local1.horizontal ? "hScroller" : "vScroller")];
if ((_local1.textField.hScroller != undefined) && (_local1.textField.vScroller != undefined)) {
_local1.textField.unwatch("text");
_local1.textField.unwatch("htmltext");
}
}
_local1.textField = undefined;
if (!(_local2 instanceof TextField)) {
} else {
_local1.textField = _local2;
_local1.textField[(_local1.horizontal ? "hScroller" : "vScroller")] = _local1;
_local1.onTextChanged();
_local1.onChanged = function () {
this.onTextChanged();
};
_local1.onScroller = function () {
var _local1 = this;
if (!_local1.isScrolling) {
if (!_local1.horizontal) {
_local1.setScrollPosition(_local1.textField.scroll);
} else {
_local1.setScrollPosition(_local1.textField.hscroll);
}
}
};
_local1.textField.addListener(_local1);
_local1.textField.watch("text", _local1.callback);
_local1.textField.watch("htmlText", _local1.callback);
}
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
var _local1 = this;
clearInterval(_local1.hScroller.synchScroll);
clearInterval(_local1.vScroller.synchScroll);
_local1.hScroller.synchScroll = setInterval(_local1.hScroller, "onTextChanged", 50);
_local1.vScroller.synchScroll = setInterval(_local1.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
var _local1 = this;
if ((!_local1.enable) || (_local1.textField == undefined)) {
} else {
clearInterval(_local1.synchScroll);
if (_local1.horizontal) {
var _local2 = _local1.textField.hscroll;
_local1.setScrollProperties(_local1.textField._width, 0, _local1.textField.maxhscroll);
_local1.setScrollPosition(Math.min(_local2, _local1.textField.maxhscroll));
} else {
var _local2 = _local1.textField.scroll;
var _local3 = _local1.textField.bottomScroll - _local1.textField.scroll;
_local1.setScrollProperties(_local3, 1, _local1.textField.maxscroll);
_local1.setScrollPosition(Math.min(_local2, _local1.textField.maxscroll));
}
}
};
FScrollBarClass.prototype.executeCallBack = function () {
var _local1 = this;
if (_local1.textField == undefined) {
super.executeCallBack();
} else if (_local1.horizontal) {
_local1.textField.hscroll = _local1.getScrollPosition();
} else {
_local1.textField.scroll = _local1.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 155 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?CosmicSwich", "_blank");
}
Symbol 159 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 50
stop();
_parent.play();
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 28
gotoAndPlay ("loop");
Symbol 210 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?CosmicSwich", "_blank");
}
Symbol 216 Button
on (release) {
_root.instructions._visible = false;
_root.start_btn._visible = true;
_root.butoane._visible = true;
}
Symbol 224 Button
on (release) {
_root.game.playBegin();
_root.game.score = 0;
_root.scoreTxt = _root.game.score;
_root.game.flagStart = true;
_root.game.firstStart = false;
_root.gotoAndPlay("game");
}
Symbol 231 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 10
game.removed(this._parent);
stop();
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 10
game.removed(this._parent);
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 10
game.removed(this._parent);
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 10
game.removed(this._parent);
stop();
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 10
game.removed(this._parent);
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 4
game.removed(this._parent);
stop();
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 4
game.removed(this._parent);
stop();
Symbol 251 MovieClip [fruit] Frame 1
stop();
select._visible = false;
Symbol 263 MovieClip Frame 24
if (_root.pauza == false) {
if (_root.timp > 0) {
_root.timp--;
trace("timp: " + _root.timp);
}
}
Symbol 269 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?" + _parent.wxnume;
getURL (targetul3, "_blank");
}
Symbol 270 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wxnume;
getURL (targetul2, "_blank");
}
Symbol 271 Button
on (release) {
_parent.mainMenuFunction();
}
Symbol 272 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wxnume) + ".exe";
getURL (targetul1);
}
Symbol 273 Button
on (release, keyPress "p") {
_parent.pauseFunction();
}
Symbol 274 Button
on (release, keyPress "s") {
_parent.soundFunction();
}
Symbol 285 MovieClip Frame 1
stop();
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
_parent.wxbutno = 6;
if (((_parent.wxdownload == false) && (_parent.wxpause == true)) && (_parent.wxsound == true)) {
this.gotoAndStop(2);
_parent.wxbutno = 5;
}
if (((_parent.wxdownload == true) && (_parent.wxpause == false)) && (_parent.wxsound == true)) {
this.gotoAndStop(3);
_parent.wxbutno = 5;
}
if (((_parent.wxdownload == true) && (_parent.wxpause == true)) && (_parent.wxsound == false)) {
this.gotoAndStop(4);
_parent.wxbutno = 5;
}
if (((_parent.wxdownload == false) && (_parent.wxpause == false)) && (_parent.wxsound == true)) {
this.gotoAndStop(5);
_parent.wxbutno = 4;
}
if (((_parent.wxdownload == false) && (_parent.wxpause == true)) && (_parent.wxsound == false)) {
this.gotoAndStop(6);
_parent.wxbutno = 4;
}
if (((_parent.wxdownload == true) && (_parent.wxpause == false)) && (_parent.wxsound == false)) {
this.gotoAndStop(7);
_parent.wxbutno = 4;
}
if (((_parent.wxdownload == false) && (_parent.wxpause == false)) && (_parent.wxsound == false)) {
this.gotoAndStop(8);
_parent.wxbutno = 3;
}
Symbol 285 MovieClip Frame 2
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 285 MovieClip Frame 3
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 285 MovieClip Frame 4
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 285 MovieClip Frame 5
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 285 MovieClip Frame 6
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 285 MovieClip Frame 7
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 285 MovieClip Frame 8
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 290 Button
on (press) {
_parent.play();
}
Symbol 293 MovieClip Frame 1
stop();
if (_parent.wxaliniere == "Dreapta-Jos") {
this.gotoAndStop(2);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 6)) {
this.gotoAndStop(3);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 5)) {
this.gotoAndStop(5);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 4)) {
this.gotoAndStop(6);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 3)) {
this.gotoAndStop(7);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 6)) {
this.gotoAndStop(4);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 5)) {
this.gotoAndStop(8);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 4)) {
this.gotoAndStop(9);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 3)) {
this.gotoAndStop(10);
}
Symbol 293 MovieClip Frame 2
tg._x = 147;
tg._y = 1.1;
Symbol 293 MovieClip Frame 3
tg._x = 147;
tg._y = -174.9;
Symbol 293 MovieClip Frame 4
tg._x = 1.5;
tg._y = -174.9;
Symbol 293 MovieClip Frame 5
tg._x = 147;
tg._y = -152.4;
Symbol 293 MovieClip Frame 6
tg._x = 147;
tg._y = -128.9;
Symbol 293 MovieClip Frame 7
tg._x = 147;
tg._y = -104.9;
Symbol 293 MovieClip Frame 8
tg._x = 1.5;
tg._y = -151.4;
Symbol 293 MovieClip Frame 9
tg._x = 1.5;
tg._y = -128.4;
Symbol 293 MovieClip Frame 10
tg._x = 1.5;
tg._y = -104.9;
Symbol 312 MovieClip Frame 1
stop();
this.onRollOver = function () {
if (_parent._parent._currentframe <= 10) {
_parent._parent.gotoAndPlay(11);
}
};
if (_parent._parent.wxbutno == 5) {
this.gotoAndStop(2);
}
if (_parent._parent.wxbutno == 4) {
this.gotoAndStop(3);
}
if (_parent._parent.wxbutno == 3) {
this.gotoAndStop(4);
}
Symbol 313 MovieClip Frame 1
stop();
if ((_parent.wxaliniere == "Stanga-Sus") || (_parent.wxaliniere == "Dreapta-Sus")) {
this.gotoAndStop(2);
}
Symbol 314 MovieClip Frame 1
function pauseFunction() {
var _local1 = _root;
_local1.theMeniu.gotoAndStop("deskis");
if (_local1.pauza == false) {
_local1.pauza = true;
_local1.pau._visible = 1;
_local1.freeOn._visible = false;
_local1.cosmic._visible = false;
} else {
_local1.theMeniu.gotoAndStop("inkis");
_local1.pauza = false;
_local1.pau._visible = 0;
_local1.freeOn._visible = true;
_local1.cosmic._visible = true;
}
}
function soundFunction() {
var _local1 = _root;
if (_local1.sunet == true) {
_local1.sunet = false;
_global.engine.stop();
} else {
_local1.sunet = true;
if ((_local1.plane._currentframe != 59) && (_local1.plane._currentframe != 61)) {
if ((_local1.boom._currentframe == 1) && (_local1.boom2._currentframe == 1)) {
_global.engine.start(0, 9999);
}
}
}
trace("sunet: " + _local1.sunet);
}
function mainMenuFunction() {
var _local1 = _root;
_local1.pau.removeMovieClip();
_global.engine.stop();
_local1.secondptak.removeMovieClip();
_local1.plane.removeMovieClip();
_local1.gotoAndStop("coperta");
}
stop();
wxnguides._alpha = 0;
my_color = new Color(my_mc);
my_color.setRGB(wxculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wxnmenu.tg);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3 = new Color(wxnfer);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
Symbol 314 MovieClip Frame 10
stop();
Symbol 314 MovieClip Frame 20
gotoAndStop (1);
Symbol 316 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?CosmicSwich", "_blank");
}
Symbol 323 MovieClip Frame 1
scroll1.setScrollProperties(130, 0, 220);
this.chHand1 = function () {
scoresScroll._y = -(scroll1.getScrollPosition() * 2);
};
scroll1.setChangeHandler("chHand1");
i = 1;
while (i <= 30) {
scoresScroll["n" + i].text = _root.monthnume[i];
scoresScroll["s" + i].text = _root.monthscor[i];
i++;
}
Symbol 330 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 635 MovieClip Frame 1
scroll1.setScrollProperties(130, 0, 915);
this.chHand1 = function () {
scoresScroll._y = -(scroll1.getScrollPosition() * 2);
};
scroll1.setChangeHandler("chHand1");
q = 1;
while (q <= 100) {
scoresScroll["n" + q].text = _root.evernume[q];
scoresScroll["s" + q].text = _root.everscor[q];
q++;
}
Instance of Symbol 153 MovieClip [FScrollBarSymbol] "scroll1" in Symbol 635 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "";
horizontal = false;
}
Symbol 641 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 657 Button
on (release) {
i = 1;
while (i <= 100) {
if (_root.best > _root.monthscor[i]) {
k = 100;
while (k >= (i + 1)) {
_root.monthscor[k] = _root.monthscor[k - 1];
_root.monthnume[k] = _root.monthnume[k - 1];
k--;
}
_root.monthscor[i] = _root.best;
_root.monthnume[i] = _root.nickname;
i = 31;
}
i++;
}
i = 1;
while (i <= 100) {
if (_root.best > _root.everscor[i]) {
k = 100;
while (k >= (i + 1)) {
_root.everscor[k] = _root.everscor[k - 1];
_root.evernume[k] = _root.evernume[k - 1];
k--;
}
_root.everscor[i] = _root.best;
_root.evernume[i] = _root.nickname;
i = 31;
}
i++;
}
gotoAndPlay ("submit");
}
Symbol 663 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 667 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 9
stop();
Symbol 667 MovieClip Frame 22
stop();
Symbol 667 MovieClip Frame 34
var my_date:Date = new Date();
codul = Math.round(my_date.getTime() / 1000) * _root.best;
cale = (((((("http://www.freeonlinegames.com/scoreboard/update.php?game=" + _root.gameid) + "&name=") + _root.nickname) + "&score=") + _root.best) + "&code=") + codul;
loadVariablesNum (cale, 0, "GET");
gotoAndPlay ("loop");
Symbol 667 MovieClip Frame 45
if (_root.updated != 1) {
gotoAndPlay ("loop");
} else {
_root.best = 0;
_root.score = 0;
_root.xdada = 1;
_root.gotoAndPlay("submitScore");
}