home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 142
/
MOBICLIC142.ISO
/
pc
/
DATA
/
GAM142
/
GAM142_00
/
GAM142_00.swf
/
scripts
/
frame_16
/
DoAction.as
Wrap
Text File
|
2012-02-13
|
4KB
|
155 lines
function masqueAide(lCache)
{
var _loc3_ = 0;
while(_loc3_ < gListeLettresAIDE.length)
{
_root["OB01_" + gListeLettresAIDE[_loc3_]].gotoAndPlay("e1");
_loc3_ = _loc3_ + 1;
}
clearInterval(intervalID);
if(lCache !== 1)
{
glastAide = getPos(gListeTotalLettres,gListeLettresAIDE[gListeLettresAIDE.length - 1]) + 1;
trace("glastAide " + glastAide);
this.bt_aide_1.gotoAndPlay("e1");
}
gAideOn = 0;
}
gMASCOTTE_P._visible = false;
var i = 1;
while(i <= gNbLettres)
{
var myMc = this["OB01_" + gimme2digits(i)];
trace("myMc = " + myMc);
myMc.useHandCursor = 0;
myMc.pNum = gimme2digits(i);
myMc.onPress = function()
{
if(gAideOn !== 1)
{
gListeLettres.push(this.pNum);
gNbClicOk += 1;
stopBruitage({nomSon:"B_ECHEC"});
stopBruitage({nomSon:"B_SUCCES"});
joueBruitage({nomSon:"B_SUCCES"});
this.gotoAndPlay("e3");
this._parent["BU01_" + this.pNum].gotoAndPlay("e3");
delete this.onPress;
if(gNbClicOk == gNbLettres)
{
gotoAndStop("fin");
play();
}
}
};
i++;
}
this.FOND.useHandCursor = 0;
this.FOND.onPress = function()
{
stopBruitage({nomSon:"B_ECHEC"});
stopBruitage({nomSon:"B_SUCCES"});
joueBruitage({nomSon:"B_ECHEC"});
};
var myMc = this.bt_aide_1;
myMc.useHandCursor = true;
myMc.onRollOver = function()
{
if(gAideOn !== 1)
{
gereCursor(2);
this.gotoAndPlay("e2");
gereTextes.afficheIB({mc:this,codeIB:"IB01"});
joueBruitage({nomSon:"B_AIDE"});
}
};
myMc.onRollOut = function()
{
if(gAideOn !== 1)
{
this.gotoAndPlay("e1");
}
gereCursor(1);
gereTextes.masqueIB();
stopBruitage({nomSon:"B_AIDE"});
};
myMc.onPress = function()
{
if(gAideOn !== 1)
{
gNbAideDone += 1;
if(gNbAideDone == 3)
{
desactiveClip(this);
this.useHandCursor = false;
this.onPress = function()
{
};
}
trace("####________### " + gListeLettres);
gereCursor(1);
gereTextes.masqueIB();
stopBruitage({nomSon:"B_AIDE"});
gListeLettresAIDE = [];
masqueAide(1);
gAideOn = 1;
if(glastAide == undefined)
{
var _loc4_ = 1;
while(_loc4_ <= gNbLettres)
{
if(getPos(gListeLettres,gimme2digits(_loc4_)) == -1)
{
_root["OB01_" + gimme2digits(_loc4_)].gotoAndPlay("e3");
gListeLettresAIDE.push(gimme2digits(_loc4_));
}
if(gListeLettresAIDE.length == 3)
{
break;
}
_loc4_ = _loc4_ + 1;
}
}
else
{
_loc4_ = glastAide + 1;
while(_loc4_ <= gNbLettres)
{
trace("1111 " + gimme2digits(_loc4_));
if(getPos(gListeLettres,gimme2digits(_loc4_)) == -1)
{
_root["OB01_" + gimme2digits(_loc4_)].gotoAndPlay("e3");
gListeLettresAIDE.push(gimme2digits(_loc4_));
}
if(gListeLettresAIDE.length == 3)
{
break;
}
_loc4_ = _loc4_ + 1;
}
trace("test " + gListeLettresAIDE.length);
if(gListeLettresAIDE.length < 3)
{
var _loc3_ = 1;
while(_loc3_ < glastAide + 1)
{
trace("2222 " + gimme2digits(_loc3_));
if(getPos(gListeLettres,gimme2digits(_loc3_)) == -1)
{
_root["OB01_" + gimme2digits(_loc3_)].gotoAndPlay("e3");
gListeLettresAIDE.push(gimme2digits(_loc3_));
}
if(gListeLettresAIDE.length == 3)
{
break;
}
_loc3_ = _loc3_ + 1;
}
}
}
trace("#################### " + gListeLettresAIDE);
intervalID = setInterval(_root,"masqueAide",3000);
}
};
stop();