home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 149
/
MOBICLIC149.ISO
/
pc
/
DATA
/
EPP149
/
EPP149_00
/
EPP149_00.swf
/
scripts
/
frame_1
/
DoAction_2.as
next >
Wrap
Text File
|
2012-11-21
|
15KB
|
510 lines
function initBT_01()
{
var _loc2_ = BT_01;
_loc2_.pIB = "IB_01";
_loc2_.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
joueBruitage({nomSon:"B_01"});
gereTextes.afficheIB({codeIB:this.pIB,X:this._x + 60,Y:this._y + this._height});
};
_loc2_.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
stopBruitage({nomSon:"B_01"});
gereTextes.masqueIB({codeIB:this.pIB});
};
_loc2_.onPress = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
stopBruitage({nomSon:"B_01"});
gereTextes.masqueIB({codeIB:this.pIB});
initDone = undefined;
desinitVignettes();
removeVignettes();
if(gClic !== undefined)
{
gClic._parent.gotoAndPlay("E1");
gClic._parent._xscale = 100;
gClic._parent._yscale = 100;
gClic._parent._x += 5;
gClic = undefined;
}
gotoAndStop("_01");
play();
};
}
function initBT_02()
{
trace("gVisuelVID AVANT = " + gVisuelVID);
if(gVisuelVID == undefined)
{
gVisuelVID = gVisuel;
}
trace("gVisuelVID APRES = " + gVisuelVID);
var _loc3_ = 1;
while(_loc3_ < 5)
{
var _loc4_ = gVisuelVID["VID_" + gimme2digits(_loc3_)];
_loc4_.Media = _global.gModulePath + moduleInfo.getResourceById("V_" + gModuleName + "_MEDIA_02_" + gimme2digits(_loc3_)).firstChild.attributes.src;
_loc4_.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
};
_loc4_.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
};
_loc4_.onPress = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
desinitBT_02();
VISUEL.videoPath = this.Media;
VISUEL.gotoAndPlay("VIDEO");
gVisuelVID._visible = false;
gVisuel = "video";
afficheBT_VIDEO();
};
_loc3_ = _loc3_ + 1;
}
}
function desinitBT_02()
{
var _loc1_ = 1;
while(_loc1_ < 5)
{
var _loc2_ = gVisuel["VID_" + gimme2digits(_loc1_)];
desactiveClip(_loc2_);
_loc1_ = _loc1_ + 1;
}
}
function desinitBT_PDF()
{
var _loc1_ = BT_PDF;
_loc1_.gotoAndPlay("E0");
desactiveClip(_loc1_);
}
function initBT_PDF()
{
var _loc2_ = BT_PDF;
_loc2_.pBRUIT = "B_TELECHARGER_ROLL";
_loc2_.gotoAndPlay("E1");
_loc2_.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
joueBruitage({nomSon:this.pBRUIT});
};
_loc2_.onRollOut = _loc2_.onDragOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
stopBruitage({nomSon:this.pBRUIT});
};
_loc2_.onPress = function()
{
gereCursor(1);
this.gotoAndPlay("E3");
stopBruitage({nomSon:this.pBRUIT});
};
_loc2_.onRelease = function()
{
HoldOS = System.capabilities.os;
TrackOS = HoldOS.slice(0,3);
trace("TrackOS = " + TrackOS);
trace("gClic.nomPDF = " + gClic.nomPDF);
if(TrackOS == "Win")
{
getURL("FSCommand:exec",gClic.nomPDF + ".exe");
}
if(TrackOS == "Mac")
{
getURL("FSCommand:exec",gClic.nomPDF + ".app");
}
};
}
function adapteImage(myC)
{
trace("myC = " + myC);
trace("cadreWidth = " + cadreWidth);
trace("myC._width = " + myC._width);
if(myC._width > myC._height)
{
var _loc2_ = cadreWidth * 100 / myC._width;
if(myC._height * _loc2_ / 100 > cadreHeight)
{
_loc2_ = cadreHeight * 100 / myC._height;
}
}
else
{
_loc2_ = cadreHeight * 100 / myC._height;
if(myC._width * _loc2_ / 100 > cadreWidth)
{
_loc2_ = cadreWidth * 100 / myC._width;
}
}
trace("pCent = " + _loc2_);
myC._width = myC._width * _loc2_ / 100;
myC._height = myC._height * _loc2_ / 100;
myC.SCALE = _loc2_;
myC._visible = true;
}
function removeVignettes()
{
var _loc1_ = 1;
while(_loc1_ <= gNbVignette)
{
var _loc2_ = VIGNETTES["VIGNETTE_" + gimme2digits(gNbVignette)];
removeMovieClip(_loc2_);
_loc1_ = _loc1_ + 1;
}
}
function desafficheBT_VIDEO()
{
var _loc1_ = BT_PLAY;
_loc1_._visible = false;
_loc1_ = BT_REWIND;
_loc1_._visible = false;
}
function afficheBT_VIDEO()
{
gPlaying = 1;
var _loc2_ = BT_PLAY;
_loc2_._visible = true;
_loc2_.gotoAndPlay("E1");
_loc2_.pBRUIT = "B_BT_PLAY";
_loc2_.onRollOver = function()
{
gereCursor(2);
if(gPlaying == 1)
{
this.gotoAndPlay("E2");
}
else
{
this.gotoAndPlay("E4");
}
joueBruitage({nomSon:this.pBRUIT});
};
_loc2_.onRollOut = function()
{
gereCursor(1);
if(gPlaying == 1)
{
this.gotoAndPlay("E1");
}
else
{
this.gotoAndPlay("E3");
}
stopBruitage({nomSon:this.pBRUIT});
};
_loc2_.onPress = function()
{
gereCursor(1);
if(gPlaying == 1)
{
this.gotoAndPlay("E4");
gPlaying = 0;
}
else
{
this.gotoAndPlay("E2");
gPlaying = 1;
}
VISUEL.stream_ns.pause();
stopBruitage({nomSon:this.pBRUIT});
};
_loc2_ = BT_REWIND;
_loc2_._visible = true;
_loc2_.pBRUIT = "B_BT_REWIND";
_loc2_.gotoAndPlay("E1");
_loc2_.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
joueBruitage({nomSon:this.pBRUIT});
};
_loc2_.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
stopBruitage({nomSon:this.pBRUIT});
};
_loc2_.onPress = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
stopBruitage({nomSon:this.pBRUIT});
VISUEL.stream_ns.seek(0);
if(gPlaying == 1)
{
VISUEL.stream_ns.play();
}
else
{
VISUEL.stream_ns.pause();
}
gPlaying = 1;
BT_PLAY.gotoAndPlay("E1");
};
}
function desinitVignettes()
{
gNbVignette = 0;
var _loc1_ = 1;
while(_loc1_ < 20)
{
var _loc4_ = "I_" + gModuleName + "_VIGNETTE_" + gimme2digits(_loc1_);
var _loc2_ = VIGNETTES[_loc4_];
if(_loc2_ !== undefined)
{
gNbVignette += 1;
var _loc3_ = VIGNETTES["VIGNETTE_" + gimme2digits(gNbVignette)].ACCEUIL;
desactiveClip(_loc3_);
}
else
{
_loc1_ = 20;
}
_loc1_ = _loc1_ + 1;
}
}
function initVignettes()
{
gNbVignette = 0;
VISUEL_W = VISUEL._width;
VISUEL_H = VISUEL._height;
var _loc4_ = 1;
while(_loc4_ < 20)
{
var _loc12_ = "I_" + gModuleName + "_VIGNETTE_" + gimme2digits(_loc4_);
var _loc3_ = VIGNETTES[_loc12_];
if(_loc3_ !== undefined)
{
gNbVignette += 1;
VIGNETTES.attachMovie("VIGNETTE","VIGNETTE_" + gimme2digits(gNbVignette),chercheDepthMoins(VIGNETTES,20));
var _loc2_ = VIGNETTES["VIGNETTE_" + gimme2digits(gNbVignette)].ACCEUIL;
var _loc6_ = new flash.display.BitmapData(_loc3_._width,_loc3_._height,true,0);
_loc6_.draw(_loc3_);
_loc2_.attachBitmap(_loc6_,_loc2_.getNextHighestDepth(),"auto",true);
cadreWidth = 97.8;
cadreHeight = 73.3;
adapteImage(_loc2_);
_loc2_._parent._x = (gNbVignette - 1) * (cadreWidth + 7.3);
testeMEDIA(_loc2_,gNbVignette);
_loc2_.pNum = gimme2digits(gNbVignette);
_loc2_.pIB = "IB_VIGNETTE_" + gimme2digits(gNbVignette);
_loc2_.pB_ROLL = "B_VIGNETTE_ROLL";
_loc2_.pB_CLIC = "B_VIGNETTE_CLIC";
_loc2_.onRollOver = function()
{
if(gClic !== this)
{
this.useHandCursor = true;
gereCursor(2);
this._parent.gotoAndPlay("E2");
this._parent._xscale = 110;
this._parent._yscale = 110;
this._parent._x -= 5;
joueBruitage({nomSon:this.pB_ROLL});
var _loc3_ = this._parent._parent._x + this._parent._x;
var _loc2_ = this._parent._parent._y;
gereTextes.afficheIB({codeIB:this.pIB,X:_loc3_ - 30,Y:_loc2_ - 20});
}
else
{
this.useHandCursor = false;
}
};
_loc2_.onRollOut = function()
{
if(gClic !== this)
{
this.useHandCursor = true;
gereCursor(1);
this._parent.gotoAndPlay("E1");
this._parent._xscale = 100;
this._parent._yscale = 100;
this._parent._x += 5;
stopBruitage({nomSon:this.pB_ROLL});
gereTextes.masqueIB({codeIB:this.pIB});
}
else
{
this.useHandCursor = false;
}
};
_loc2_.onPress = function()
{
if(gClic !== this)
{
VISUEL.SWF_02._visible = false;
desinitBT_PDF();
this.useHandCursor = true;
gereCursor(1);
if(gVisuel !== undefined)
{
if(gVisuel == "video")
{
TIMELINE.gotoAndStop(1);
clearInterval(VISUEL.time_interval);
desafficheBT_VIDEO();
VISUEL.gotoAndPlay("E1");
VISUEL.stream_ns.close();
}
else
{
gVisuel._visible = false;
}
}
if(gClic !== this && gClic !== undefined)
{
gClic._parent.gotoAndPlay("E1");
gClic._parent._xscale = 100;
gClic._parent._yscale = 100;
gClic._parent._x += 5;
}
gClic = this;
stopBruitage({nomSon:this.pB_ROLL});
joueBruitage({nomSon:this.pB_CLIC});
gereTextes.masqueIB({codeIB:this.pIB});
switch(this.typeMedia)
{
case "swf":
VISUEL.gotoAndPlay("E1");
if(VISUEL["SWF_" + this.pNum] == undefined)
{
var _loc5_ = VISUEL.createEmptyMovieClip("SWF_" + this.pNum,chercheDepthPlus(VISUEL,0));
this.mclSWF = new MovieClipLoader();
this.mclSWF.pNum = this.pNum;
this.mclSWF.loadClip(this.Media._url,_loc5_);
this.mclSWF.onLoadInit = function(myClip)
{
gVisuel = myClip;
if(this.pNum == "02")
{
initBT_02();
}
};
}
else
{
gVisuel = VISUEL["SWF_" + this.pNum];
gVisuel._visible = true;
if(this.pNum == "02")
{
initBT_02();
}
}
break;
case "flv":
VISUEL.videoPath = this.Media;
VISUEL.gotoAndPlay("VIDEO");
gVisuel = "video";
afficheBT_VIDEO();
break;
case "jpg":
VISUEL.gotoAndPlay("E1");
if(VISUEL["IMAGE_" + this.pNum] == undefined)
{
var _loc2_ = this.Media;
var _loc3_ = new flash.display.BitmapData(_loc2_._width,_loc2_._height,true,0);
var _loc4_ = VISUEL.createEmptyMovieClip("IMAGE_" + this.pNum,chercheDepthPlus(VISUEL,0));
_loc3_.draw(_loc2_);
_loc4_.attachBitmap(_loc3_,_loc4_.getNextHighestDepth(),"auto",true);
}
else
{
_loc4_ = VISUEL["IMAGE_" + this.pNum];
_loc4_._visible = true;
}
gVisuel = _loc4_;
if(this.pNum == "05")
{
joueSon({nomSon:"DEMO_TOBO",actionFin:"enchaineVideo"});
}
else
{
initBT_PDF();
}
}
}
else
{
this.useHandCursor = false;
}
};
}
else
{
_loc4_ = 20;
}
_loc4_ = _loc4_ + 1;
}
}
function enchaineVideo()
{
gVisuel._visible = false;
VISUEL.videoPath = _global.gModulePath + moduleInfo.getResourceById("V_" + gModuleName + "_MEDIA_05").firstChild.attributes.src;
VISUEL.gotoAndPlay("VIDEO");
gVisuel = "video";
afficheBT_VIDEO();
}
function testeMEDIA(mc, lNum)
{
if(swfStocker["A_" + gModuleName + "_MEDIA_" + gimme2digits(lNum)] !== undefined)
{
var _loc6_ = swfStocker["A_" + gModuleName + "_MEDIA_" + gimme2digits(lNum)];
var _loc7_ = "swf";
}
else if(photoStocker["I_" + gModuleName + "_MEDIA_" + gimme2digits(lNum)] !== undefined)
{
_loc6_ = photoStocker["I_" + gModuleName + "_MEDIA_" + gimme2digits(lNum)];
_loc7_ = "jpg";
var _loc5_ = this.moduleInfo.returnNodeByPath("Module.Config.Vignettes");
var _loc8_ = _loc5_.childNodes[lNum - 1].attributes.media;
}
else
{
_loc6_ = _global.gModulePath + moduleInfo.getResourceById("V_" + gModuleName + "_MEDIA_" + gimme2digits(lNum)).firstChild.attributes.src;
_loc7_ = "flv";
}
mc.typeMedia = _loc7_;
mc.Media = _loc6_;
mc.nomPDF = _loc8_;
gVisuel = undefined;
}
function finVideo()
{
trace("fin Video gClic.pNum = " + gClic.pNum);
if(gClic.pNum == "02")
{
gVisuelVID._visible = true;
desafficheBT_VIDEO();
initBT_02();
}
else
{
gClic = undefined;
}
}
function initEPP()
{
trace("initDone = " + initDone);
if(initDone == undefined)
{
initDone = 1;
initBT_01();
initVignettes();
desafficheBT_VIDEO();
}
}