home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 145
/
MOBICLIC145.ISO
/
pc
/
DATA
/
TRC145
/
TRC145_00
/
TRC145_00.swf
/
scripts
/
frame_6
/
DoAction.as
Wrap
Text File
|
2012-07-19
|
3KB
|
126 lines
function init_BT_PLAY_PAUSE()
{
onPlay = true;
BT_PLAY_PAUSE._alpha = 100;
BT_PLAY_PAUSE.gotoAndStop(2);
BT_PLAY_PAUSE.onRollOver = function()
{
this.useHandCursor = 0;
if(this._alpha == 100)
{
this.useHandCursor = 1;
this.BT.gotoAndStop("E2");
gereCursor(2);
}
};
BT_PLAY_PAUSE.onRollOut = function()
{
if(this._alpha == 100)
{
this.BT.gotoAndStop("E1");
gereCursor(1);
}
};
BT_PLAY_PAUSE.onPress = function()
{
if(this._alpha == 100)
{
if(_root.onPlay == true)
{
_root.onPlay = false;
this.gotoAndStop(1);
_root.stopVideo();
}
else
{
_root.onPlay = true;
this.gotoAndStop(2);
_root.playVideo();
}
}
};
}
function playVideo()
{
FLVLecture.play();
BT_PLAY_PAUSE._alpha = 100;
_root.onPlay = true;
_root.BT_PLAY_PAUSE.gotoAndStop(2);
}
function stopVideo()
{
FLVLecture.stop();
}
function init_BT_REWIND()
{
BT_REWIND.onRollOver = function()
{
this.gotoAndStop("E2");
gereCursor(2);
};
BT_REWIND.onRollOut = function()
{
this.gotoAndStop("E1");
gereCursor(1);
};
BT_REWIND.onPress = function()
{
_root.rewindVideo();
};
}
function rewindVideo()
{
doneLogo = undefined;
BT_PLAY_PAUSE._alpha = 100;
FLVLecture.playheadTime = 0;
}
trace("start frame");
BT_FERMER.onRollOver = function()
{
this.useHandCursor = true;
joueBruitage({nomSon:"B_FERMER"});
this.gotoAndPlay("E2");
};
BT_FERMER.onPress = function()
{
ChangeModule({codeRub:"MOB",numMod:0,FromModule:true});
};
BT_FERMER.onRollOut = function()
{
this.gotoAndPlay("E1");
};
FLVLecture.contentPath = _root.gModulePath + "V_" + _root.gModuleName + "/EPISODE.flv";
trace(FLVLecture.playheadTime);
playVideo();
init_BT_PLAY_PAUSE();
init_BT_REWIND();
FLVLecture.onEnterFrame = function()
{
if(doneLogo == undefined)
{
if(this.playheadPercentage >= 70)
{
doneLogo = 1;
_root.gotoAndPlay("PLAY_LOGO");
}
}
if(this.playheadPercentage >= 100)
{
_root.onPlay = false;
_root.BT_PLAY_PAUSE.gotoAndStop(1);
_root.BT_PLAY_PAUSE._alpha = 50;
}
if(this.playheadPercentage <= 1)
{
if(this.doneShunt == undefined)
{
this.doneShunt = 1;
_root.onPlay = true;
_root.BT_PLAY_PAUSE.gotoAndStop(2);
_root.gotoAndStop("REWIND");
}
_root.BT_PLAY_PAUSE._alpha = 100;
}
};
stop();