home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 127
/
MOBICLIC127.ISO
/
mac
/
DATA
/
DSS127
/
DSS127_01
/
DSS127_01.swf
/
scripts
/
frame_240
/
DoAction.as
Wrap
Text File
|
2010-09-13
|
5KB
|
212 lines
function playVideo()
{
var _loc3_ = getRessourceByID("V_" + gModuleName + myVideo,"flv");
if(_loc3_ !== undefined)
{
videoBox.origDepth = videoBox.getDepth();
videoBox.swapDepths(15045);
TIMELINE.origDepth = TIMELINE.getDepth();
TIMELINE.swapDepths(15046);
BT_PLAY.origDepth = BT_PLAY.getDepth();
BT_PLAY.swapDepths(15047);
BT_STOP.origDepth = BT_STOP.getDepth();
BT_STOP.swapDepths(15048);
intervalBarre = setInterval(this,"gereBarre",30);
videoBox.src = _loc3_.attributes.src;
videoBox.gotoAndStop(1);
videoBox.gotoAndStop(2);
gTypeRessource = "flv";
testControls();
_root.videoPlaying = 1;
videoBox._width = 712;
videoBox._height = 514;
videoBox._visible = 1;
BT_PLAY._visible = 1;
BT_PLAY.gotoAndStop("E3");
BT_STOP._visible = 1;
TIMELINE._visible = 1;
if(gMusicOn)
{
soundObjects[gMusic].setVolume(0);
}
}
}
function closeVideo()
{
if(gMusicOn)
{
soundObjects[gMusic].setVolume(gVolume);
}
videoBox.swapDepths(videoBox.origDepth);
TIMELINE.swapDepths(TIMELINE.origDepth);
BT_PLAY.swapDepths(BT_PLAY.origDepth);
BT_STOP.swapDepths(BT_STOP.origDepth);
clearInterval(intervalBarre);
_root.BT_STOP._visible = 0;
_root.BT_PLAY._visible = 0;
_root.TIMELINE._visible = 0;
videoBox._visible = 0;
_root.videoPlaying = 0;
TIMELINE.ANIM.gotoAndStop(1);
trace(videosDone);
if(getPos(videosDone,0) == -1)
{
gotoAndStop("ATTENTE");
}
}
function localRetour()
{
videoBox.swapDepths(videoBox.origDepth);
TIMELINE.swapDepths(TIMELINE.origDepth);
BT_PLAY.swapDepths(BT_PLAY.origDepth);
BT_STOP.swapDepths(BT_STOP.origDepth);
}
function gereBarre()
{
if(_root.videoPlaying == 1)
{
videoTime = _root.videoBox.stream_ns.time;
percent = Math.floor(videoTime / videoDuree * 100);
TIMELINE.ANIM.gotoAndStop(percent);
}
}
gereTextes.masqueLM({codeLM:"LM01_02_00_02_A"});
gereTextes.afficheLM({mc:YVAN,codeLM:"LM01_02_00_02_B"});
gereTextes.afficheLM({mc:Q_01,codeLM:"LM01_02_02_01"});
gereTextes.afficheLM({mc:Q_02,codeLM:"LM01_02_02_02"});
stop();
videosDone = [0,0];
videoBox._visible = 0;
BT_PLAY._visible = 0;
BT_STOP._visible = 0;
TIMELINE._visible = 0;
videoBox.useHandCursor = 0;
videoBox.onRollOver = function()
{
};
videoBox.onPress = function()
{
};
ZONE_02_01.onRollOver = function()
{
if(_root.videoPlaying !== 1)
{
gereCursor(2);
this.gotoAndStop("E2");
joueBruitage({nomSon:"B_02_01_ROLL"});
}
};
ZONE_02_01.onRollOut = function()
{
if(_root.videoPlaying !== 1)
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_02_01_ROLL"});
}
};
ZONE_02_01.onPress = function()
{
if(_root.videoPlaying !== 1)
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_02_01_ROLL"});
joueBruitage({nomSon:"B_02_01_CLIC"});
_root.myVideo = "_01_02_01";
_root.playVideo();
videosDone[0] = 1;
}
};
ZONE_02_02.onRollOver = function()
{
if(_root.videoPlaying !== 1)
{
gereCursor(2);
this.gotoAndStop("E2");
joueBruitage({nomSon:"B_02_02_ROLL"});
}
};
ZONE_02_02.onRollOut = function()
{
if(_root.videoPlaying !== 1)
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_02_02_ROLL"});
}
};
ZONE_02_02.onPress = function()
{
if(_root.videoPlaying !== 1)
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_02_02_ROLL"});
joueBruitage({nomSon:"B_02_02_CLIC"});
_root.myVideo = "_01_02_02";
_root.playVideo();
videosDone[1] = 1;
}
};
BT_PLAY.onRollOver = function()
{
gereCursor(2);
joueBruitage({nomSon:"B_BT_PLAY"});
if(_root.videoPlaying == 1)
{
this.gotoAndStop("E4");
}
else
{
this.gotoAndStop("E2");
}
};
BT_PLAY.onRollOut = function()
{
gereCursor(1);
stopBruitage({nomSon:"B_BT_PLAY"});
if(_root.videoPlaying == 1)
{
this.gotoAndStop("E3");
}
else
{
this.gotoAndStop("E1");
}
};
BT_PLAY.onPress = function()
{
_root.videoBox.toggleVideo();
gereCursor(1);
stopBruitage({nomSon:"B_BT_PLAY"});
if(_root.videoPlaying == 1)
{
this.gotoAndStop("E3");
}
else
{
this.gotoAndStop("E1");
}
};
BT_STOP.onRollOver = function()
{
gereCursor(2);
this.gotoAndStop("E2");
joueBruitage({nomSon:"B_BT_STOP"});
};
BT_STOP.onRollOut = function()
{
gereCursor(1);
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_BT_STOP"});
};
BT_STOP.onPress = function()
{
this.gotoAndStop("E1");
_root.videoBox.stream_ns.close();
gereCursor(1);
stopBruitage({nomSon:"B_BT_STOP"});
closeVideo();
};