home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
i·claim - visualizing argument
/
ICLAIM.ISO
/
mac
/
t_06.swf
/
scripts
/
__Packages
/
mx
/
controls
/
streamingmedia
/
RTMPConnection.as
< prev
next >
Wrap
Text File
|
2005-02-28
|
1KB
|
40 lines
class mx.controls.streamingmedia.RTMPConnection extends NetConnection
{
static var _connectorQueue = new Array();
function RTMPConnection(player)
{
super();
this._player = player;
}
function onMetaData(info)
{
this._player.setTotalTime(info.duration);
}
function connect(targetURI, streamName)
{
if(mx.controls.streamingmedia.RTMPConnection._connectFlag == true)
{
this.pushConnection(targetURI,streamName);
return undefined;
}
mx.controls.streamingmedia.RTMPConnection._connectFlag = true;
super.connect(targetURI,streamName);
this.popConnection();
}
function pushConnection(targetURI, streamName)
{
this._targetURI = targetURI;
this._streamName = streamName;
mx.controls.streamingmedia.RTMPConnection._connectorQueue.push(this);
}
function popConnection()
{
mx.controls.streamingmedia.RTMPConnection._connectFlag = false;
if(mx.controls.streamingmedia.RTMPConnection._connectorQueue.length != 0)
{
var _loc1_ = mx.controls.streamingmedia.RTMPConnection._connectorQueue.pop();
_loc1_.connect(_loc1_._targetURI,_loc1_._streamName);
}
}
}