all groups > macromedia flash flashcom > june 2007 >
You're in the

macromedia flash flashcom

group:

Sample FMS Application


Sample FMS Application stilwalli
6/14/2007 9:23:24 AM
macromedia flash flashcom:
Hi,
I was trying to create my first application on FMS. The problem is that the
client does not show anything
I created the following folder & copied my flv file into it
FMS Server\applications\videostreaming\myvideos\streams\video1.flv

Then I created a client (Script File)
//create a netConnection object
var nc = new NetConnection();
//keep an eye on the status events, we need to know when we have connected up
nc.onStatus = function(info) {
trace(info.code);
if (info.code == "NetConnection.Connect.Success") {
createStreamObject();
}
};
//this function is called once we have connected up to the server
function createStreamObject() {
//this is the netStream object that plays the video file
ns = new NetStream(nc);
ns.onStatus = function(obj:Object) {
trace(obj.code+":"+nc.uri);
};
//attach the video stream to the video object on the stage
vidObject.attachVideo(ns);
//play the video file that we put in the directory for the application
ns.play("video1");
}
//connect up
nc.connect("rtmp://192.168.1.126/videostreaming/myvideos");
//nc.connect(null);

Then I created the Video Component & named it vidObject.

The problem is that when i See onthe admin console of FMS, I can see that the
client has been conneted to the server. I can also see the stream, but it does
not display on the client. What could be the problem. Please Help
Re: Sample FMS Application JayCharles
6/14/2007 1:58:15 PM
I see the problem... you have the streams directory in the wring place. You flv
should be here:


FMS Server\applications\videostreaming\streams\myvideos\video1.flv

Notice how \streams is a child of the application directory, and inside
\streams, there is a directory with the name of your instance. Once you make
that fix, all should be well... you code looks proper.
AddThis Social Bookmark Button