var nc:NetConnection = new NetConnection(); //用來連結檔案
nc.connect(null); //null表示不需連結到外部伺服器
var ns:NetStream = new NetStream(nc); //用來控制連結的檔案(播放/停止/暫停)
ns.play("myMovie.flv");
var myVideo:Video = new Video(320,240);//建立一個影片物件
myVideo.attachNetStream(ns);//將影片物件指向先前連結的檔案
addChild(myVideo);//將物件加到舞台上
*暫停語法:ns.pause();
Thursday, 19 February 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment