home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 164
/
MOBICLIC164.ISO
/
pc
/
DATA
/
HOTE
/
libs
/
VideoBox
/
VideoBox.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2014-05-13
|
2KB
|
102 lines
_global._VideoBox_ = this;
this.ETAT = "STOP";
this.Ouvrir = function(p)
{
xlisteObj(p);
this.swapDepths(21000);
this.AfficherVideo(p);
};
this.Fermer = function()
{
trace("Fermer");
this._visible = false;
this.stream_ns.seek(0);
this.swapDepths(this.Depth);
this.stream_ns.close();
this.ETAT = "STOP";
};
this.Pause = function()
{
this.stream_ns.pause(true);
this.ETAT = "PAUSE";
};
this.Play = function()
{
this.stream_ns.pause(false);
this.ETAT = "PLAY";
};
this.Stop = function()
{
this.stream_ns.pause(true);
Go(0);
this.ETAT = "STOP";
};
this.Go = function(temps)
{
this.stream_ns.seek(temps);
};
this.AfficherVideo = function(p)
{
trace("AFFICHER AIDE");
var params = p;
this.ECRAN._visible = true;
var _loc0_ = null;
var _loc5_ = this.connection_nc = new NetConnection();
_loc5_.connect(null);
var _loc0_ = null;
var _loc2_ = this.stream_ns = new NetStream(_loc5_);
this.ECRAN.attachVideo(_loc2_);
_loc2_.setBufferTime(2);
this.VideoPath = p.path;
_loc2_.play(this.VideoPath);
this.ETAT = "PLAY";
_loc2_.seek(0);
this._visible = true;
_loc2_.onMetaData = function(infoObject)
{
for(var _loc2_ in infoObject)
{
if(_loc2_ == "duration")
{
Duration = infoObject[_loc2_];
}
}
};
_loc2_.onStatus = function(infoObject)
{
if(infoObject.code == "NetStream.Play.Stop")
{
Fini();
}
if(params.width != undefined)
{
ECRAN._width = params.width;
ECRAN._height = params.height;
ECRAN._x = params.x;
ECRAN._y = params.y;
}
else
{
ECRAN._width = ECRAN.width;
ECRAN._height = ECRAN.height;
ECRAN._x = Width / 2 - ECRAN.width / 2;
ECRAN._y = Height / 2 - ECRAN.height / 2;
}
for(var _loc2_ in infoObject)
{
trace("\t" + _loc2_ + ":\t" + infoObject[_loc2_]);
}
};
};
this.Width = this._width;
this.Height = this._height;
this.ECRAN = this.VideoBox.ECRAN;
this.ECRAN.smoothing = true;
this.Depth = this.getDepth();
this.Duration = 0;
this.Fini = function()
{
trace("Fini()");
this.ETAT = "STOP";
};