Connecting To FMS -- What's wrong with this code?
Hi, I'm hoping someone here can help me get over this hurdle successfulling streaming video from an FMS.
Here's the code:
// code to link to an FMS
import flash.media.Video;
import flash.media.Video;
var rtmpPath:String="rtmp://142.20.63.76:556/vod/Paediatrics/video0.flv";
// instantiate the video player
var vid:Video = new Video();
addChild(vid);
var vidConnection:NetConnection = new NetConnection();
vidConnection.connect(null);
var vidStream:NetStream = new NetStream(vidConnection);
vid.attachNetStream(vidStream);
// set video location and size
vid.width=240;
vid.height=180;
vid.y = 50;
vid.x = 30;
// Play video stream
vidStream.play(rtmpPath);
Any help will be appreciated, thanks.
