PDA

View Full Version : [AS3] ns.connect rtmp no love


luciferonline
02-19-2009, 05:58 PM
Does anybody know the correct methos for conecting to external media servers using flvPlayback in as3??


var video:Video = new Video(320, 240);
addChild(video);

var nc:NetConnection = new NetConnection();
nc.connect("rtmpe://mediaserver.net/o18/");

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("StreamSample_interview.flv");

many thanks for any help.

Brndn

CyanBlue
02-19-2009, 06:21 PM
Howdy and Welcome... :)

Remove the '.flv' out of the file name and see what happens...

FYI, I moved the thread to the Flash Media Server forum...

luciferonline
02-19-2009, 08:40 PM
Hey there. thanks for that. Unfortunatly i am having no luck with that. ill have a search of the media forum see what i can find. thanks

bowljoman
02-21-2009, 05:43 PM
That wont work. You need the event listener on the netconnection first, and onStatus you make the netstream.