home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 130
/
MOBICLIC130.ISO
/
pc
/
DATA
/
BID130
/
BID130_00
/
BID130_00.swf
/
scripts
/
frame_20
/
DoAction.as
Wrap
Text File
|
2010-12-13
|
4KB
|
158 lines
function joueSonJLM(p)
{
var _loc4_ = p.nomSon;
gSoundString = _loc4_;
if(p.gNextLabel != undefined)
{
_root.gNextLabel = p.gNextLabel;
}
if(p.mc !== undefined)
{
gClipRef = p.mc;
}
else
{
gClipRef = _root;
}
if(p.zapBlock !== undefined)
{
gClicZap = p.zapBlock;
}
else
{
gClicZap = "ZAP_BLOCK";
}
if(p.actionFin !== undefined)
{
gActionFinSon = p.actionFin;
}
else
{
gActionFinSon = "PLAY";
}
stopComment();
if(p.mcCible !== undefined)
{
if(typeof p.mcCible == "movieclip")
{
gClipTarget = p.mcCible;
}
else
{
gClipTarget = gClipRef[p.mcCible];
}
if(p.mcLabelOut !== undefined)
{
gClipTargetLabel = p.mcLabelOut;
}
else
{
gClipTargetLabel = gClipTarget._currentframe;
}
if(p.mcLabelIn !== undefined)
{
gClipTarget.gotoAndPlay(p.mcLabelIn);
}
else
{
gClipTarget.gotoAndPlay("parle");
}
}
gCommentName = "S_" + gLangue + "_" + gModuleName + "_";
trace("joueSon " + gCommentName + _loc4_);
mySound = soundObjects[gCommentName + _loc4_];
_root.afficherMascottes(p.Mascottes);
if(mySound !== undefined)
{
gCommentOn = mySound;
gCommentOn.p = p;
gCommentOn.id = gCommentName + _loc4_;
testeDebutCommentSpecial();
if(gMusicOn == 1 && gMusic !== undefined && gBlockMusic == undefined)
{
soundObjects[gMusic].setVolume(gVolume * 40 / 100);
}
mySound.setVolume(gVolume);
if(gCommentOnPausePos !== undefined)
{
mySound.start(gCommentOnPausePos / 1000);
gCommentOnPause = undefined;
gCommentOnPausePos = undefined;
}
else
{
mySound.start();
}
}
else
{
trace("______" + getSoundByID(gCommentName + _loc4_) + gCommentName);
var _loc5_ = getSoundByID(gCommentName + _loc4_);
if(_loc5_ !== undefined)
{
mySound = new Sound();
mySound.onLoad = function(success)
{
if(success)
{
if(gCommentOnPausePos !== undefined)
{
mySound.start(gCommentOnPausePos / 1000);
gCommentOnPause = undefined;
gCommentOnPausePos = undefined;
}
else
{
mySound.start();
}
}
};
mySound.loadSound(this.gModulePath + _loc5_.attributes.src,true);
gCommentOn = mySound;
gCommentOn.p = p;
gCommentOn.id = gCommentName + _loc4_;
testeDebutCommentSpecial();
if(gMusicOn == 1 && gMusic !== undefined && gBlockMusic == undefined)
{
soundObjects[gMusic].setVolume(gVolume * 40 / 100);
}
}
}
if(mySound == undefined)
{
return undefined;
}
mySound.onSoundComplete = commentFini;
if(gClicZap !== "NOZAP_NOBLOCK")
{
trace("creerRectangle " + creerRectangle + " " + gHeight + " " + gWidth);
mcClicZap = creerRectangle({nom:"mcClicZap",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
switch(gClicZap.split("_")[0])
{
case "ZAP":
mcClicZap.useHandCursor = false;
mcClicZap.onPress = function()
{
trace("clic zap son");
_root.flagClicZap = true;
stopSon();
};
break;
case "NOZAP":
mcClicZap.useHandCursor = false;
mcClicZap.onPress = function()
{
trace("no clic allowed");
};
}
mcClicZap._visible = true;
}
if(gST == 1 && gBlockST == undefined)
{
gereTextes.afficheST(gCommentName + _loc4_);
}
}
stop();
_mod_.gerelabelATTENTE_00();
_global.joueSonJLM = joueSonJLM;