home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 112
/
jogo-disk-112.iso
/
Games
/
mon_the_monkey.swf
/
scripts
/
frame_4
/
DoAction.as
Wrap
Text File
|
2010-07-14
|
4KB
|
214 lines
function backSound()
{
mySound.stop();
mySound = new Sound("sound1");
mySound.attachSound("backGame");
mySound.start(0,9999);
}
function backGame()
{
mySound.stop();
mySound = new Sound("sound1");
mySound.attachSound("backSound");
mySound.start(0,9999);
}
function jam()
{
mySound3 = new Sound("sound3");
mySound3.attachSound("jam");
mySound3.start(0,999);
}
function over()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("over");
mySound2.start(0,1);
}
function klik()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("klik");
mySound2.start(0,1);
}
function gagal()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("gagal");
mySound2.start(0,1);
}
function sukses()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("sukses");
mySound2.start(0,1);
}
function buah1()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("buah1");
mySound2.start(0,1);
}
function buah2()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("buah2");
mySound2.start(0,1);
}
function onyet()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("onyet");
mySound2.start(0,1);
}
function drum()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("drum");
mySound2.start(0,1);
}
function loncat()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("loncat");
mySound2.start(0,1);
}
function jalan()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("jalan");
mySound2.start(0,1);
}
function lose()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("lose");
mySound2.start(0,1);
}
function poing3()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("poing3");
mySound2.start(0,1);
}
function cherr()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("cherr");
mySound2.start(0,1);
}
function door()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("door");
mySound2.start(0,1);
}
function exel()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("exel");
mySound2.start(0,1);
}
function whoops()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("whoops");
mySound2.start(0,1);
}
function ah()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("ah");
mySound2.start(0,1);
}
function hurry()
{
mySound2 = new Sound("sound2");
mySound2.attachSound("hurry");
mySound2.start(0,1);
}
function bacaData()
{
iq = 1;
while(iq <= 10)
{
xxnama = "namaBretto" + String(iq);
xxskor = "scoreBretto" + String(iq);
Cookies = SharedObject.getLocal(xxnama,"/");
this["namanya" + iq] = Cookies.data.txt;
Cookies = SharedObject.getLocal(xxskor,"/");
this["scorenya" + iq] = Cookies.data.txt;
iq++;
}
}
function buatData()
{
iq = 1;
while(iq <= 10)
{
xxnama = "namaBretto" + String(iq);
xxskor = "scoreBretto" + String(iq);
Cookies = SharedObject.getLocal(xxnama,"/");
Cookies.data.txt = "User-" + iq;
Cookies = SharedObject.getLocal(xxskor,"/");
Cookies.data.txt = "0";
Cookies.flush();
iq++;
}
}
stop();
backSound();
sudahMenang = false;
awalSaja = true;
sound1._visible = false;
sound2._visible = false;
i = 1;
while(i <= 7)
{
this["xjatuh" + i].gotoAndStop(i);
i++;
}
easy_btn.onRollOver = normal_btn.onRollOver = hard_btn.onRollOver = top_btn.onRollOver = exit_btn.onRollOver = function()
{
over();
};
easy_btn.onRelease = function()
{
klik();
xlevel = "EASY";
level = 1;
batasLevel = 5;
gotoAndStop("game");
};
normal_btn.onRelease = function()
{
klik();
xlevel = "NORMAL";
level = 5;
batasLevel = 9;
gotoAndStop("game");
};
hard_btn.onRelease = function()
{
xlevel = "HARD";
level = 9;
batasLevel = 13;
gotoAndStop("game");
};
top_btn.onRelease = function()
{
klik();
gotoAndStop("top2");
tandaBalik = "menu";
};
exit_btn.onRelease = function()
{
klik();
fscommand("quit");
};
bacaData();
if(namanya1 == null)
{
buatData();
bacaData();
}