自做flv播放器

      flash As 2005-9-1 17:56:00
// 创建一个 NetConnection 对象:
var netConn:NetConnection = new NetConnection();
// 创建一个本地流连接:
netConn.connect(null);
// 创建一个 NetStream 对象并定义一个 onStatus() 函数:
var mv1:NetStream = new NetStream(netConn);
mv1.onStatus = function(infoObject) {
status.text += "Status (NetStream)" + newline;
status.text += "Level:"+infoObject.level + newline;
status.text += "Code:"+infoObject.code + newline;
};
// 将 NetStream 视频输入信号附加到 Video 对象:
my_video.attachVideo(mv1);
// 设置缓冲时间:
mv1.setBufferTime(5);

--------------------------------------

on (press) {
    mv1.pause();
}

on (press) {
    mv1.play("swf/v1.flv");
}on (press) {
mv1.close();
}



标签集:TAGS:
回复Comments() 点击Count()
喜欢就顶一下

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}