/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var video:Video = new Video(VIDEOWIDTH, VIDEOHEIGHT); addChild(video); var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent); function onStatusEvent(stat:Object):void { trace(stat.info.code); } var meta:Object = new Object(); meta.onMetaData = function(meta:Object) { trace(meta.duration); } ns.client = meta; video.attachNetStream(ns); ns.play("yoursource.flv");