all groups > macromedia flash flashcom > february 2006 >
You're in the

macromedia flash flashcom

group:

Beginners help



Beginners help virtualflow
2/20/2006 12:00:00 AM
macromedia flash flashcom: I have installed and started FMS2 on XP Pro SP2. AppServ is also installed and
running on the same PC.

I want to stream FLVs from the FMS server to client SWFs.

Using the management console, I can see that my SWFs can connect to the server
but data is not being streamed - bandwidth is 0 kbit/sec.

I have gone through the forum and tried to read everything I can about the
subject but have yet to find an answer.

Can someone at least point me in the direction of a troubleshooting document?

Thanks
Alfred Low
Re: Beginners help JayCharles
2/20/2006 8:03:56 PM
Re: Beginners help virtualflow
2/20/2006 11:05:34 PM
Here is my code:



var connection_nc:NetConnection = new NetConnection();
connection_nc.connect("rtmp://localhost:1935/alftest");
var stream_ns:NetStream = new NetStream(connection_nc);
mcVidHolder.my_vid.attachVideo(stream_ns);
stream_ns.play("testmovie.flv");
stream_ns.setBufferTime(5);

// Event handlers
stream_ns.onStatus = function(infoObject:Object) {
trace(infoObject.code);
switch (infoObject.code) {
case "NetStream.Play.StreamNotFound" :
_global.mcMsg.bufferMsg.text = "ERROR: stream "+v+" not found.";
break;
case "NetStream.Buffer.Empty" :
if (!_global.autoRewind) {
_global.mcMsg.bufferMsg.text = _global.msgStreaming;
_global.mcMsg._visible = true;
}
break;
case "NetStream.Buffer.Full" :
_global.mcMsg.bufferMsg.text = "";
_global.mcMsg._visible = false;
if (!_global.started) {
btnPlay._visible = btnRewind._visible=true;
stream_ns.seek(_global.seekTime);
stream_ns.pause();
}
break;
case "NetStream.Play.Stop" :
btnPause.onRelease();
break;
}
};



Thanks for you help Jay, you seem to be the most active responder in this
forum.

Cheers
Alfred
Re: Beginners help JayCharles
2/20/2006 11:13:03 PM
I don't see anything wrong with your code, so I'm guessing it's a path issue. Your .flv should be in this location:

applications/alftest/streams/_definst_/testmovie.flv

Is that where it is?

Re: Beginners help virtualflow
2/21/2006 3:38:59 AM
Right now, testmovie.flv is sitting in the root directory of the application
alftest.

From your post, it seems that I should create a streams folder and then a
_definst_ folder within that folder.

If that is the case, is my connection in the SWF to
rtmp://localhost:1935/alftest/streams/testmovie.flv or
rtmp://localhost:1935/altest/testmovie.flv?

Also, my understanding (which might be flawed) is that _definst_ is
automatically created by the server. If that is the case, should the FLV just
live in the streams folder?

Cheers
Alfred
Re: Beginners help JayCharles
2/21/2006 4:20:56 AM
I've found that the _definst_ directory is only created automatically when a
stream is recorded. This might have changed in FMS (I still do most of my work
on FCS).

Your stream resource path will be
rtmp://localhost:1935/altest/testmovie

Notice how the .flv extension is left off.


Re: Beginners help portatix
2/21/2006 3:38:39 PM
Hi there,

i'm having the same problem and i've tryed everitinhg. I puted this code:
ns.onStatus = function(info) {
output=info.code;
if(info.code == "NetStream.Buffer.Full") {
bufferClip._visible = false;
}
if(info.code == "NetStream.Buffer.Empty") {
bufferClip._visible = true;
}
if(info.code == "NetStream.Play.Stop") {
ns.seek(0);
}
}


so I know that the stream has started... but still I can see no image.
I have tryed every type of path to the file. with a lot of them I receive the
"NetStream.Play.Start" but still, no video.
It seems to be something very simple, but I cant figure it out.
Re: Beginners help portatix
2/22/2006 12:00:00 AM
well, i found the "problem". as it seems, you mus have thes 3 folthers unther
applications: app name/streams/video. in the video folders you can have the flv
files. then the url must be: "rtmp:server/app name/video". them , when you call
the video, you can't type the .flv extension. it works like this... so many
hours lost... :(
I hope it helps,

best regards,
Jo?o
Re: Beginners help virtualflow
2/22/2006 12:00:00 AM
Portatix

If you don't mind, could you send me your FLA? I feel very dumb at the moment
as I have tried everything you and Jay Charles suggested and still no luck.

Since you got it working, I will know that your code is 100%. If it does not
work on my setup, at least then I know it is something to do with my FMS setup.

My email is alflow@yahoo.com

Thanks
Alfred Low
Re: Beginners help portatix
2/22/2006 4:05:33 PM
here it is:
on stage just create a new video AS contrlled
on the first frame i just have this code:

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://server/treta/video"); // server should be the name of your
server; treta is the main folder of the application, them i have one called
streams and them this on, video (this seems to be very important!!!)
//this neext lines are just to see if the file connects with the server
nc.onStatus = function(info) {
trace("Level: " + info.level + " Code: " + info.code);
output=info.code;
if (info.code == "NetConnection.Connect.Success") {
out_txt= "Connecting to server...Done!"

} else {
out_txt = "Connection problem: "+info.code;
}
}
var ns:NetStream = new NetStream(nc);
video.attachVideo(ns);
ns.setBufferTime(10);
ns.play("low"); // low is the name of the FLV file you whant to play. for
some reason you just cant put the complete file name. this was where my problem
was...


tell me if it did work. i'm not in my office so i cant send you the file right
now.

best of luck,

Jo?o

Re: Beginners help virtualflow
2/23/2006 12:00:00 AM
Thanks Portatix - it's finally working (with minor issues)!!!

Cheers
Re: Beginners help violinxiaozhu
2/24/2006 12:00:00 AM
I have installed Free Deverloper Edition on Windows XP ,but I can't open it in "start-Microsoft-",Why?
Re: Beginners help virtualflow
2/24/2006 12:00:00 AM
Do you know whether the installation was successful? Is FMS in your Add/Remove
Programs list?

Either way, I suggest the you reintall it.

It is very hard to troubleshoot with the limited amount of information you
have given.
Re: Beginners help vector11
3/7/2006 12:00:00 AM
hi,
I have installed flash media server 2 on my pc.
I m trying to interact it with flash mx but unfotunately its not working
i have written this code:
var nc:NetConnection=new NetConnection();
nc.connect("rtmp://1935/alftest/streams/test1.flv");
var ns:NetStream=new NetStream(nc);
var vidwin:Video;
vidwin.attachVideo(ns);
btplay.onRelease=function():Void
{
ns.play("test1.flv");
}
btstop.onRelease=function():Void
{
ns.pause();
}
btrew.onRelease=function():Void
{
ns.seek(0);
}
this.onEnterFrame=function():Void
{
ttime.text=ns.time.toString()+"sec";
}
i m not able to lift the movie from this remote server please help
me to know the url needed to connect using rtmp
Re: Beginners help virtualflow
3/7/2006 12:00:00 AM
If you installed FMS on your local PC, your connection URL is //localhost/

Hope this helps.

AddThis Social Bookmark Button