Flash flv metadata error #1069
Februar 19th, 2009 • bugfix, flash, snippet
Working with flvs I got that error
“Error #1069 onMetaData for flash.net.NetStream not found”
Here’s the fix.
var nc : NetConnection = new NetConnection(); nc.connect(null); var ns : NetStream = new NetStream(nc); var vid : Video = new Video(); var listener : Object = new Object(); // this is optional // listener.onMetaData = function(infoObject : Object):void { trace("onMetaData"); var key : String; for (key in infoObject) { trace(key + ": " + infoObject[key]); } } // this is optional // listener.onCuePoint = function(infoObject : Object):void { trace("onCuePoint"); var key : String; for (key in infoObject) { trace(key + ": " + infoObject[key]); } } // this is "the magic" // ns.client = listener; ns.play("videos/vid2.flv"); vid.attachNetStream(ns); addChild(vid);
So long