Frame 1
_quality = "MEDIUM";
Frame 2
function randomizeItems() {
slide_items1 = new Array(nr_items + 1);
slide_items2 = new Array(nr_items + 1);
slide_items3 = new Array(nr_items + 1);
i = 1;
while (i < (nr_items + 1)) {
slide_items1[i] = 1 + random(max_items_tip);
slide_items2[i] = 1 + random(max_items_tip);
slide_items3[i] = 1 + random(max_items_tip);
i++;
}
}
max_items_tip = 7;
nr_items = 14;
item_height = 50;
item_width = 150;
initialMove = 50;
latencyTime = 1;
useHighscore = true;
maxScores = 10;
writeHighscoresPath = "slotswrite.php";
readHighscoresPath = "slotsread.php";
readWriteTimeout = 63;
highScores._visible = false;
win = new Array(_root.max_items_tip);
win_amount = new Array(_root.max_items_tip);
maxBet = 5;
i = 0;
while (i < _root.max_items_tip) {
win[i] = new Array(i + 1, i + 1, i + 1);
i++;
}
win_amount[1] = 200;
win_amount[2] = 300;
win_amount[3] = 400;
win_amount[4] = 500;
win_amount[5] = 750;
win_amount[6] = 1000;
win.push(new Array(1, 0, 0));
win.push(new Array(0, 1, 0));
win.push(new Array(0, 0, 1));
win_amount.push(1);
win_amount.push(1);
win_amount.push(1);
win.push(new Array(1, 1, 0));
win.push(new Array(0, 1, 1));
win.push(new Array(1, 0, 1));
win_amount.push(8);
win_amount.push(8);
win_amount.push(8);
win_amount[0] = 73;
slide_items1 = new Array(1, 2, 4, 7, 1, 2, 3, 6, 5, 1, 4, 3, 2, 5, 1);
slide_items2 = new Array(1, 6, 5, 2, 2, 1, 4, 1, 3, 3, 7, 4, 1, 5, 2);
slide_items3 = new Array(1, 7, 6, 3, 1, 4, 6, 2, 3, 4, 5, 2, 1, 3, 1);
Frame 3
highScores.initHighscoreTable(10);
stop();
Frame 5
stop();
Symbol 11 MovieClip [litem] Frame 1
function getTip() {
return(tip);
}
function setUp(num) {
pic.removeMovieClip();
tip = num;
this.attachMovie("lpic" + tip, pic, 10);
}
stop();
Symbol 22 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 1
_root.stop();
movieSize = _root.getBytesTotal();
Symbol 26 MovieClip Frame 2
movieLoaded = _root.getBytesLoaded();
percent = Math.round((movieLoaded / movieSize) * 100);
loadbar.gotoAndStop(percent);
Symbol 26 MovieClip Frame 3
if (movieLoaded < movieSize) {
gotoAndPlay(_currentframe - 1);
}
Symbol 26 MovieClip Frame 4
_root.play();
Symbol 29 Button
on (press) {
_root.slide1.d = 0;
_root.slide2.d = 0;
_root.slide3.d = 0;
}
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 2
loadVariables (_parent.pathToWrite, this, "POST");
Symbol 33 Button
on (release) {
clearHighscores();
_root.gotoAndPlay(2);
}
Symbol 44 Button
on (release) {
if (isScoreAccepted(_root.scorController.scor)) {
enterScore(_root.scorController.scor);
}
}
Symbol 47 Button
on (release) {
insertNewScore(inputName, inputMail, inputScore);
writeHighScores(_parent.writeHighscoresPath, _parent.readWriteTimeout);
}
Symbol 57 MovieClip Frame 1
function initHighscoreTable(scores) {
if (status != "error") {
var i;
if (scores < 2) {
scores = 2;
}
if (50 < scores) {
scores = 10;
}
scoresToKeep = scores;
i = 1;
while (scoresToKeep >= i) {
highscoreData["name" + i] = "none";
highscoreData["email" + i] = "none";
highscoreData["score" + i] = 0;
i++;
}
gotoAndStop (1);
}
}
function listHighscores() {
gotoAndStop (2);
}
function getStatus() {
return(status);
}
function clearHighscores() {
if (status != "error") {
var i;
i = 1;
while (scoresToKeep >= i) {
removeMovieClip("highscoreLine" + i);
i++;
}
}
}
function enterScore(score) {
if (status != "error") {
if (score < 0) {
score = 0;
}
inputScore = score;
gotoAndStop (3);
}
}
function isScoreAccepted(score) {
if (status != "error") {
if (score >= Number(highscoreData["score" + scoresToKeep])) {
return(true);
}
return(false);
}
return(false);
}
function insertNewScore(name, mail, score) {
var i;
var j;
var rank;
scor = Number(score);
i = 1;
while (scoresToKeep >= i) {
if (scor >= Number(highscoreData["score" + i])) {
rank = i;
break;
}
i++;
}
i = scoresToKeep - 1;
while (i >= rank) {
j = i + 1;
highscoreData["name" + j] = highscoreData["name" + i];
highscoreData["email" + j] = highscoreData["email" + i];
highscoreData["score" + j] = highscoreData["score" + i];
i--;
}
highscoreData["name" + rank] = name;
highscoreData["email" + rank] = mail;
highscoreData["score" + rank] = scor;
}
function readHighscores(path, timeout, local) {
if (status != "error") {
if (timeout < 2) {
timeout = 2;
}
if ((local != true) && (local != false)) {
local = true;
}
if (local == false) {
var randomNo = random(getTimer() * 1000);
pathToRead = (path + "?requestID=") + randomNo;
} else {
pathToRead = path;
}
timeToWait = timeout * 1000;
gotoAndPlay (4);
}
}
function writeHighScores(path, timeout) {
if (status != "error") {
if (timeout < 2) {
timeout = 2;
}
pathToWrite = path;
timeToWait = timeout * 1000;
gotoAndPlay (7);
}
}
function highscoreDisable() {
if ((status != "list") && (status != "enter")) {
gotoAndStop (21);
}
}
function errorOverride() {
if ((status == "error") || (status == "disable")) {
gotoAndStop (1);
}
}
highscoreLine._visible = false;
status = "idle";
inputScore = 0;
stop();
Symbol 57 MovieClip Frame 2
highscoreLine._visible = false;
if (status != "error") {
var i;
lineHeight = highscoreLine._height - 3;
i = 1;
while (scoresToKeep >= i) {
duplicateMovieClip (highscoreLine, "highscoreLine" + i, i);
this["highscoreLine" + i].index = i;
this["highscoreLine" + i].name = highscoreData["name" + i];
this["highscoreLine" + i].mail = highscoreData["email" + i];
this["highscoreLine" + i].scor = highscoreData["score" + i];
this["highscoreLine" + i]._y = this["highscoreLine" + i]._y + ((i - 1) * lineHeight);
i++;
}
}
status = "list";
stop();
Symbol 57 MovieClip Frame 3
status = "enter";
clearHighscores();
stop();
Symbol 57 MovieClip Frame 4
status = "read";
highscoreData.done = 0;
loadVariables (pathToRead, highscoreData);
startTime = getTimer();
Symbol 57 MovieClip Frame 6
currentTime = getTimer();
elapsedTime = currentTime - startTime;
remainTime = timeToWait - elapsedTime;
if ((highscoreData.done != 1) && (remainTime < 100)) {
gotoAndPlay (10);
} else if (highscoreData.done != 1) {
gotoAndPlay(_currentframe - 1);
} else {
gotoAndPlay (2);
}
Symbol 57 MovieClip Frame 7
status = "write";
highscoreData.done = 0;
highscoreData.gotoAndPlay("sendvars");
startTime = getTimer();
Symbol 57 MovieClip Frame 9
currentTime = getTimer();
elapsedTime = currentTime - startTime;
remainTime = timeToWait - elapsedTime;
if ((highscoreData.done != 1) && (remainTime < 100)) {
gotoAndPlay (10);
} else if (highscoreData.done != 1) {
gotoAndPlay(_currentframe - 1);
} else {
gotoAndStop (1);
}
Symbol 57 MovieClip Frame 10
status = "error";
Symbol 57 MovieClip Frame 20
_root.prizes._visible = true;
stop();
Symbol 57 MovieClip Frame 21
status = "disable";
stop();
Symbol 62 MovieClip Frame 1
function playSound(www) {
if (sound_on) {
gotoAndPlay(www);
}
}
sound_on = true;
stop();
Symbol 62 MovieClip Frame 3
stop();
Symbol 62 MovieClip Frame 5
stop();
Symbol 62 MovieClip Frame 7
stop();
Symbol 62 MovieClip Frame 9
stop();
Symbol 64 Button
on (release) {
this.play();
_root.sound.sound_on = !_root.sound.sound_on;
}
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 68 Button
on (press) {
prizes._visible = true;
highScores._visible = false;
maneta.released = false;
if (((_root.scorController.bet != 0) && ((_root.scorController.scor + _root.scorController.win) >= _root.scorController.bet)) && (maneta.resting)) {
if (((!_root.slide1.rolling) && (!_root.slide1.rolling)) && (!_root.slide1.rolling)) {
maneta.play();
maneta.resting = false;
sound.playSound("maneta");
}
} else {
_root.statusController.setStatus("Try to bet before!");
}
}
on (release) {
maneta.released = true;
}
Symbol 69 MovieClip Frame 1
function equalsArr(a, b) {
if ((a[0] == 0) || (a[0] == b[0])) {
if ((a[1] == 0) || (a[1] == b[1])) {
if ((a[2] == 0) || (a[2] == b[2])) {
return(true);
}
}
}
return(false);
}
function check() {
wining = false;
if ((_root.slide1.win_check && (_root.slide2.win_check)) && (_root.slide3.win_check)) {
result = new Array(_root.slide1.result, _root.slide2.result, _root.slide3.result);
i = 0;
while (i < win.length) {
if (equalsArr(win[i], result)) {
_root.scorController.updateScor(win_amount[i]);
wining = true;
}
i++;
}
_root.slide1.win_check = false;
_root.slide2.win_check = false;
_root.slide3.win_check = false;
if (wining) {
_root.sound.playSound("win");
} else if ((_root.scorController.win == 0) && (_root.scorController.scor == 0)) {
_root.gotoAndPlay("gameOver");
}
}
}
win = _root.win;
win_amount = _root.win_amount;
Symbol 69 MovieClip Frame 2
check();
Symbol 69 MovieClip Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 71 MovieClip Frame 1
function setUp() {
i = 1;
while (i < (nr_items + 1)) {
this.attachMovie("litem", "item" + i, 300 + i);
z = eval ("_root.slide_items" + index)[i];
eval ("item" + i).tip = z;
eval ("item" + i).attachMovie("lpic" + z, "pic", 10);
setProperty("item" + i, _y , height);
height = height + _root.item_height;
i++;
}
setProperty("item0", _y , -_root.item_height);
}
function roll() {
this.gotoAndPlay(2);
}
index = substring(this._name, length(this._name), -1);
nr_items = _root.nr_items;
height = 0;
altitude = this._y;
win_check = false;
rolling = false;
this.attachMovie("litem", "item0", 300);
z = eval ("_root.slide_items" + index)[nr_items];
item0.tip = z;
item0.attachMovie("lpic" + z, "pic", 10);
item_height = item0._height;
setUp();
stop();
Symbol 71 MovieClip Frame 2
win_check = false;
d = _root.initialMove + random(10);
time = _root.latencyTime + random(3);
Symbol 71 MovieClip Frame 3
if (!rol) {
rolling = true;
}
first_time = getTimer();
Symbol 71 MovieClip Frame 5
second_time = getTimer();
if (time < (second_time - first_time)) {
first_time = second_time;
this._y = this._y + d;
if ((altitude + _root.item_height) < this._y) {
this._y = this._y - height;
}
if (d == 0) {
i = Math.floor((altitude - this._y) / _root.item_height);
if ((i + 1) != 0) {
result = eval ("_root.slide_items" + index)[i + 1];
final = i + 1;
} else {
result = eval ("_root.slide_items" + index)[nr_items];
final = nr_items;
}
if ((0 < ((altitude - this._y) - (i * _root.item_height))) && ((_root.item_height / 2) >= ((altitude - this._y) - (i * _root.item_height)))) {
this._y++;
gotoAndPlay(_currentframe - 1);
} else if ((((altitude - this._y) - (i * _root.item_height)) < _root.item_height) && ((_root.item_height / 2) < ((altitude - this._y) - (i * _root.item_height)))) {
this._y--;
gotoAndPlay(_currentframe - 1);
} else if (((altitude - this._y) - (i * _root.item_height)) == 1) {
gotoAndPlay(_currentframe - 1);
}
} else {
d = d - 1;
gotoAndPlay(_currentframe - 1);
if ((_root.sound.sound_on && (index == 1)) && (d % 2)) {
_root.sound.gotoAndPlay("spin");
}
}
}
Symbol 71 MovieClip Frame 6
win_check = true;
rolling = false;
stop();
Symbol 77 MovieClip Frame 1
if (((_root.ready && (!_root.slide1.rolling)) && (!_root.slide1.rolling)) && (!_root.slide1.rolling)) {
_root.scorController.updateScor(0);
_root.slide1.roll();
_root.slide2.roll();
_root.slide3.roll();
_root.ready = false;
}
resting = true;
stop();
Symbol 77 MovieClip Frame 2
l.play();
resting = false;
Symbol 77 MovieClip Frame 11
if (!released) {
gotoAndPlay(_currentframe - 1);
} else {
_root.ready = true;
}
Symbol 94 Button
on (press) {
if (((!_root.slide1.rolling) && (!_root.slide2.rolling)) && (!_root.slide3.rolling)) {
max = _root.maxBet;
if ((scor + win) < max) {
max = scor + win;
}
counter.startCounter("_root.scorController.bet", max, true);
}
}
on (release) {
counter.stopCounter();
}
Symbol 100 Button
on (press) {
if (((!_root.slide1.rolling) && (!_root.slide1.rolling)) && (!_root.slide1.rolling)) {
counter.startCounter("_root.scorController.bet", scor + win, false);
}
}
on (release) {
counter.stopCounter();
}
Symbol 101 MovieClip Frame 1
function startCounter(path1, max1, inc1) {
max = max1;
path = path1;
inc = inc1;
if (inc) {
if (eval (path) < max) {
eval (path)++;
}
} else if (0 < eval (path)) {
eval (path)--;
}
_root.sound.playSound("inc-dec");
gotoAndPlay (5);
}
function stopCounter() {
stop();
}
stop();
Symbol 101 MovieClip Frame 5
time1 = getTimer();
speed = 80;
total = 1;
t = 1;
Symbol 101 MovieClip Frame 10
time2 = getTimer();
if (speed < (time2 - time1)) {
time1 = time2;
if (1 < speed) {
speed--;
}
if (inc) {
if (eval (path) < max) {
Set(path, eval (path) + t);
} else {
Set(path, max);
stop();
}
} else if (0 < eval (path)) {
Set(path, eval (path) - t);
} else {
Set(path, 0);
stop();
}
_root.sound.playSound("inc-dec");
total = total + t;
if (total == 10) {
t = 10;
}
if (total == 300) {
t = 100;
}
if (total == 1100) {
t = 1000;
}
if (total == 11000) {
t = 10000;
}
if (total == 110000) {
t = 100000 /* 0x0186A0 */;
}
if (total == 1100000) {
t = 1000000 /* 0x0F4240 */;
}
}
gotoAndPlay(_currentframe - 1);
Symbol 102 MovieClip Frame 1
function increaseBet(amount) {
if (0 < (bet + amount)) {
bet = bet + amount;
}
}
function updateScor(factor) {
if (0 < factor) {
win = win + (bet * factor);
} else {
scor = scor + (win - bet);
win = 0;
}
}
function addBonus(ammount) {
if (0 < (scor + amount)) {
scor = scor + amount;
} else {
scor = 0;
}
}
scor = 100;
bet = 1;
win = 0;
Symbol 102 MovieClip Frame 3
Symbol 102 MovieClip Frame 4
gotoAndPlay(_currentframe - 1);
Symbol 103 Button
on (release) {
_root.scorController.scor = _root.scorController.scor + _root.scorController.win;
_root.scorController.win = 0;
if ((highScores.getStatus() == "error") || (highScores.getStatus() == "disable")) {
highScores.errorOverride();
}
if ((highScores.getStatus() == "idle") || (highScores.getStatus() == "park")) {
}
prizes._visible = false;
highScores._visible = true;
highScores.readHighscores(_root.readHighscoresPath, readWriteTimeout, false);
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 109 Button
on (release) {
gotoAndPlay (2);
}