home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 127
/
MOBICLIC127.ISO
/
mac
/
DATA
/
DSS127
/
DSS127_03
/
DSS127_03.swf
/
scripts
/
frame_2
/
DoAction.as
Wrap
Text File
|
2010-09-13
|
5KB
|
195 lines
function initBT_RETOUR()
{
trace("INIT RET");
IB_RET.texte.embedFonts = true;
IB_RET._visible = 0;
_root.IB_RET.texte.text = getTextById(nodeIB,"IB_RET");
BT_RETOUR.swapDepths(15549);
var _loc3_ = this.BT_RETOUR;
_loc3_.onRollOver = function()
{
joueBruitage({nomSon:"B_RET"});
_root.IB_RET._visible = 1;
this.gotoAndPlay("E2");
gereCursor(2);
};
_loc3_.onRollOut = _loc3_.onDragOut = function()
{
stopBruitage({nomSon:"B_RETOUR"});
gereTextes.masqueIB({mc:this,codeIB:"IB_RET"});
this.gotoAndPlay("E1");
_root.IB_RET._visible = 0;
gereCursor(1);
};
_loc3_.onPress = function()
{
_root.localRetour();
gZone = this.pNum;
stopBruitage({nomSon:"B_RETOUR"});
_root.IB_RET._visible = 0;
gereTextes.masqueIB({mc:this,codeIB:"IB_RET"});
_root.goDSSSommaire();
};
}
function goDSSSommaire()
{
trace("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX goDSSSommaire");
_global.ChangeModule({codeRub:"DSS",numMod:0,A_GoLabel:"ATTENTE",fromModule:true});
}
function getTextById(myXML, attributeValue)
{
myStyle = undefined;
myText = undefined;
myText = this.recusiveGetTextByAttribute(myXML,"id",attributeValue);
if(myText == undefined)
{
trace(attributeValue + " n\'existe pas dans XML");
}
return myText;
}
function recusiveGetTextByAttribute(node, attribute, attributeValue)
{
var _loc2_ = 0;
while(_loc2_ < node.childNodes.length)
{
if(node.childNodes[_loc2_].attributes[attribute] == attributeValue)
{
myText = node.childNodes[_loc2_].firstChild.nodeValue;
if(node.childNodes[_loc2_].attributes.style !== undefined)
{
myStyle = node.childNodes[_loc2_].attributes.style;
}
break;
}
if(node.childNodes[_loc2_].hasChildNodes())
{
this.recusiveGetTextByAttribute(node.childNodes[_loc2_],attribute,attributeValue);
}
_loc2_ = _loc2_ + 1;
}
return myText;
}
function initReponses()
{
listTextes = [theLMFile + "_" + theReponse + "_R01",theLMFile + "_" + theReponse + "_R02",theLMFile + "_" + theReponse + "_R03"];
gereTextes.afficheLM({codeLM:listTextes[0]});
gereTextes.afficheLM({codeLM:listTextes[1]});
gereTextes.afficheLM({codeLM:listTextes[2]});
TEXTE_BULLE.text = "";
TEXTE_BULLE.embedFonts = true;
BULLE._visible = 0;
listReponses = [PASTILLE_A,PASTILLE_B,PASTILLE_C];
var _loc3_ = 0;
while(_loc3_ < 3)
{
myMC = listReponses[_loc3_];
myMC.pPastille = _loc3_;
myMC.onRollOver = function()
{
gereCursor(2);
this.gotoAndStop("E2");
joueBruitage({nomSon:"B_ROLL"});
};
myMC.onRollOut = function()
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_ROLL"});
};
myMC.onPress = function()
{
gereCursor(1);
this.gotoAndStop("E3");
stopBruitage({nomSon:"B_ROLL"});
joueBruitage({nomSon:"B_CLIC"});
_root.teletext = _root[listTextes[this.pPastille]].LM.texte.text;
gereReponse(this.pPastille + 1);
};
_loc3_ = _loc3_ + 1;
}
}
function gereReponse(pastille)
{
reponse = pastille;
BANDEAU._visible = 0;
PASTILLE_A._visible = 0;
PASTILLE_B._visible = 0;
PASTILLE_C._visible = 0;
gereTextes.masqueLM({codeLM:listTextes[0]});
gereTextes.masqueLM({codeLM:listTextes[1]});
gereTextes.masqueLM({codeLM:listTextes[2]});
mcTexteBulle = TEXTE_BULLE;
intervalTeletext = setInterval(this,"gereTeletext",30);
suiteTeletext = "pauseReaction";
letter = 0;
BULLE._visible = 1;
}
function gereTeletext()
{
mcTexteBulle.embedFonts = true;
mcTexteBulle.text = teletext.substr(0,letter);
letter += 1;
if(letter == teletext.length + 1)
{
clearInterval(intervalTeletext);
if(_root.suiteTeletext !== undefined)
{
_root[String(_root.suiteTeletext)()];
}
}
}
function pauseReaction()
{
intervalReaction = setInterval(this,"reaction",1000);
}
function initBT_X()
{
BT_X.onRollOver = function()
{
gereCursor(2);
this.gotoAndStop("E2");
joueBruitage({nomSon:"B_BT_X_ROLL"});
};
BT_X.onRollOut = function()
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_BT_X_ROLL"});
};
BT_X.onPress = function()
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_BT_X_ROLL"});
playBruitage({nomSon:"B_BT_X_CLIC"});
if(_global.HOTE !== undefined)
{
if(_global.HOTE.fromPastilles == 1)
{
_global.ChangeModule({codeRub:"DSS",numMod:5,A_GoLabel:"ATTENTE_RETOUR"});
}
else
{
_root.gotoAndStop("ATTENTE");
}
}
else
{
_root.gotoAndStop("ATTENTE");
}
};
}
stop();
InitOk();
nodeIB = moduleInfo.returnNodeByPath("Module.FR.InfoBulles");
nodeLM = moduleInfo.returnNodeByPath("Module.FR.LegendesMedias");
initBT_RETOUR();
_root.StopAll = function()
{
trace("QUIT VERS SOMMAIRE");
};
if(_global.HOTE == undefined)
{
gST = 1;
}