Skip to main content
Inspiring
November 6, 2007
Question

FMS & AS3

  • November 6, 2007
  • 2 replies
  • 327 views
How can we use FMS with AS3? I am doing an application of video streaming
and always I have the same error:

NetConnection.Connect.Failed

My code:

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://my_fms_server/streamadmin");

What's matter?

Thanks


    This topic has been closed for replies.

    2 replies

    Participant
    November 25, 2007
    I find snippets of examples, like this one. Where is the official Adobe documentation of fms2 updated for as3?
    Participant
    November 19, 2007
    This was in the livedocs section:

    Zubaz said on Sep 12, 2007 at 12:01 AM :
    If you inexplicably get connection refusals to FMS using AS3, try adding the following line before you create your instance of NetConnection. I imagine a new version of FMS is on the way, but FMS <=2 can't understand your AS3 stuff, so this sets it to AS2 mode.

    NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
    No screen name said on Oct 1, 2007 at 6:10 PM :
    Thank you, Zubaz!

    He's absolutely right -- if you find yourself getting NetConnection.Connect.Failed errors trying to connect to Flash Media Server 2 using Actionscript 3, you need to add the line he mentioned above. I just wanted to confirm that the fix works.