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

macromedia flash flashcom

group:

Stream FLV file off FMS?



Stream FLV file off FMS? abeall
1/30/2007 8:22:23 PM
macromedia flash flashcom: I've streamed FLV files off FMS before, but always using components. I'm trying
a simple setup with a Video instance, with no luck:

I put my FLV file on FMS in /myApp/streams/_definst_/myVideo.flv

I have a Video object on stage with an instance name of 'vid'

My AS is:
var vid:Video;
var nc:NetConnection = new NetConnection();
var ns:NetStream = new NetStream(nc);
nc.onStatus = function(info){
trace(info.code);
vid.attachVideo(ns);
ns.play('myVideo');
}
nc.connect('rtmp://rtmphost/myApp');

When I publish, I get "NetConnection.Connect.Success" but no video or audio.
What is not correct about this set up?
Re: Stream FLV file off FMS? JayCharles
1/30/2007 8:42:23 PM
It's probably because you're creating you netstream before you've made your
netconnection. Try creating the netstream after your netConnection.onStatus
handler gets a netconnection.connect.success message.
Re: Stream FLV file off FMS? MotionMaker
1/30/2007 8:42:47 PM
I would declare ns outside of onStatus and instantiate inside.

var ns:NetStream;

nc.onStatus(info)
{
if (this.isConnected){
Re: Stream FLV file off FMS? [djdomain]
1/30/2007 8:47:06 PM
Sorry to jump in here off topice but i am also new to FCS/FMS and just doing
some search and i see jayCharles popup alot :)

Love your sig m8

I know the feeling...
I have had to apply the same sig on one of my moderated flash dev forums.

I am sure you will come across a couple of my post's over the comming months.
I hope your as helpful :)
Re: Stream FLV file off FMS? abeall
1/30/2007 9:03:48 PM
Thanks, got it working now. Now I'm facing a strange behavior... while the FLV
loads and streams, it seems that if I setBufferTime(5) it plays in fast motion
for the first split second. Does that makes any sense? Is this a known behavior
I need to work around? If I leave the bufferTime at default, which is
apparently 1 tenth of a second, it has no fast forward behavior, but I get a
lot of interupted skipping in the beginning.
AddThis Social Bookmark Button