Creating a simple videodisplay of fms stream: Help
Hi!
The documentation for FMIS is in my mind poor. All I want is to display a videostream from my server in an swf.
I've manage to display the file using http or local but rtmp seems to be another ballgame. The file play using rtmp using jwplayer.
So far I have this code:
var video:Video = new Video(550,310);
addChild(video);
var nc:NetConnection = new NetConnection();
nc.connect("rmtp://myserver/myapp");
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()
{
trace(meta.duration);
};
ns.client = meta;
video.attachNetStream(ns);
ns.play("mymovie.mov");
I get this in the Flash Output panel:
ArgumentError: Error #2004: One of the parameters is invalid.
at flash.net::NetConnection/connect()
at my_fla::MainTimeline/my_fla::frame1()
Please help!
Thanks
