home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 136
/
MOBICLIC136.ISO
/
pc
/
DATA
/
BLA136
/
BLA136_01
/
BLA136_01.swf
/
scripts
/
frame_13
/
DoAction.as
Wrap
Text File
|
2011-07-20
|
5KB
|
163 lines
function testeSWF_fin()
{
if(gAnimSwf._currentframe == gAnimSwf._totalframes)
{
if(gFin == 1)
{
gotoAndStop("fin_anim");
gAnimSwf.anim.stop();
BT_PLAY.pDepth = BT_PLAY.getDepth();
BT_PLAY.swapDepths(this.getNextHighestDepth());
BT_PLAY.onRollOver = function()
{
gereCursor(2);
};
BT_PLAY.onRollOut = function()
{
gereCursor(1);
};
BT_PLAY.onPress = function()
{
gereCursor(1);
gFin = 0;
this.swapDepths(this.pDepth);
gAnimSwf._visible = 0;
gAnim = 1;
gotoAndStop("relance_anim");
play();
};
BT_PLAY._visible = true;
}
else
{
animSuivante();
}
clearInterval(intervalID);
}
}
BT_PLAY._visible = false;
gListLM = [];
gListeBruitages = [];
gListeFrameBruitage = [];
gListeNameBruitage = [];
if(gAnim <= gNbAnim)
{
if(gAnim == gNbAnim)
{
gFin = 1;
}
gPriorite = animNode.childNodes[gAnim - 1].attributes.priorite;
trace(gPriorite);
gAttenteClic = animNode.childNodes[gAnim - 1].attributes.attenteClic;
trace(gAttenteClic);
trace("ANIMNODE " + animNode);
var h = 0;
for(; h < animNode.childNodes[gAnim - 1].childNodes.length; h++)
{
switch(animNode.childNodes[gAnim - 1].childNodes[h].attributes.type)
{
case "swf":
gAnimSwf = this.swfStocker[animNode.childNodes[gAnim - 1].childNodes[h].attributes.id];
trace("AN " + animNode.childNodes[gAnim - 1].childNodes[h]);
trace("ID " + this.swfStocker[animNode.childNodes[gAnim - 1].childNodes[h].attributes.id]);
trace("gAnimSwf " + gAnimSwf);
gAnimSwf.gotoAndPlay(1);
gAnimSwf.anim.gotoAndPlay(1);
lX = animNode.childNodes[gAnim - 1].childNodes[h].attributes.x;
if(lX !== undefined)
{
posX = Number(lX);
}
else
{
posX = 0;
}
lY = animNode.childNodes[gAnim - 1].childNodes[h].attributes.y;
if(lY !== undefined)
{
posY = Number(lY);
}
else
{
posY = 0;
}
lScale = animNode.childNodes[gAnim - 1].childNodes[h].attributes.scale;
if(lScale !== undefined)
{
gAnimSwf._xscale = Number(lScale);
gAnimSwf._yscale = Number(lScale);
}
afficheClipPos(gAnimSwf,posX,posY);
continue;
case "mp3":
var lSon = animNode.childNodes[gAnim - 1].childNodes[h].attributes.id;
lSon = lSon.substr(gCommentName.length,10);
trace(lSon);
joueSon({nomSon:lSon,actionFin:"testeFin"});
continue;
case "LM":
gListLM.push(animNode.childNodes[gAnim - 1].childNodes[h].attributes.id);
gereTextes.afficheLM({codeLM:animNode.childNodes[gAnim - 1].childNodes[h].attributes.id});
continue;
case "bruitage_continu":
gListeBruitages.push(animNode.childNodes[gAnim - 1].childNodes[h].attributes.id);
soundObjects[animNode.childNodes[gAnim - 1].childNodes[h].attributes.id].start(0,1000);
continue;
case "bruitage":
gListeBruitages.push(animNode.childNodes[gAnim - 1].childNodes[h].attributes.id);
listeTemp = animNode.childNodes[gAnim - 1].childNodes[h].attributes.frame.split(",");
j = 0;
while(j < listeTemp.length)
{
gListeFrameBruitage.push(listeTemp[j]);
gListeNameBruitage.push(animNode.childNodes[gAnim - 1].childNodes[h].attributes.id);
j++;
}
gAnimSwf.pos = h;
gAnimSwf.onEnterFrame = function()
{
if(getPos(gListeFrameBruitage,this._currentframe) !== -1)
{
soundObjects[gListeNameBruitage[getPos(gListeFrameBruitage,this._currentframe)]].start();
}
};
break;
case "bruitageFin":
break;
default:
continue;
}
var lSon = animNode.childNodes[gAnim - 1].childNodes[h].attributes.id;
lSon = lSon.substr(gBruitageName.length,100);
joueBruitage({nomSon:lSon});
}
gereTextes.init_gListeLM(gListLM);
}
if(gAttenteClic == 1)
{
BT_INTER._alpha = 100;
BT_INTER.pDepth = BT_INTER.getDepth();
BT_INTER.swapDepths(1000);
BT_INTER.onRollOver = function()
{
gereCursor(2);
};
BT_INTER.onRollOut = function()
{
gereCursor(1);
};
BT_INTER.onPress = function()
{
gereCursor(1);
delete this.onPress;
this._alpha = 0;
BT_INTER.swapDepths(this.pDepth);
animSuivante();
};
}
else if(gPriorite == "swf")
{
intervalID = setInterval(this,"testeSWF_fin",100);
}
stop();