Skip to main content
tripleA999
Known Participant
August 12, 2009
Question

Flash media server 3.5- help needed

  • August 12, 2009
  • 1 reply
  • 5002 views

hello
i have installed flash media server 3.5 ..windows vista and using FLASH 10
right now in
Flash Media Server page I am only able to play HTTP sample,

RTMP file is not working , i check the sample folder >> and open HelloWorld

>> that shows error :: Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Connect.Failed
at HelloWorld/connectHandler()

what should i do now

need ur help urgent

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    August 12, 2009

    When you open the FMS page, it opens locally. HTTP works fine locally, but you need to actually start the FMS to get RTMP to work. To get it started, open Adobe in your start menu and you should see an option to start the service.  NetConnection.Connect.Failed means the service is either not on or (I think) that's also the error you get if the folder it's pointing at doesn't exist or doesn't have a connection file (main.asc).

    tripleA999
    Known Participant
    August 13, 2009

    before running my application ( HelloWorld )

    i always start FMS & FMAdministratorServer ( also checked in system services that they are running )

    allow them in vista firewall

    PLEASE LET ME KNOW

    > is any problem with apache server ? how i figure out that it is running by FMS

    > any port issues ?


    package {

    import flash.display.MovieClip;

    import flash.net.Responder;

    import flash.net.NetConnection;

    import flash.events.NetStatusEvent;

    import flash.events.MouseEvent;

       

    public class HelloWorld extends MovieClip {

         

      // Represents a network connection.

      private var nc:NetConnection;

     

      // Responder for call to server's serverHelloMsg -- see onReply() below.

      private var myResponder:Responder = new Responder(onReply);


      // Constructor.

      public function HelloWorld() {

    // Set display values.

    textLbl.text = "";

    connectBtn.label = "Connect";


    // Register a listener for mouse clicks on the button.

    connectBtn.addEventListener(MouseEvent.CLICK, connectHandler);

       }

     

    // When button is pressed, connect to or disconnect from the server.

    public function connectHandler(event:MouseEvent):void {

    if (connectBtn.label == "Connect") {

    trace("Connecting...");

    nc = new NetConnection();


    // Connect to the server.

    nc.connect("rtmp://localhost/HelloWorld");

    // Call the server's client function serverHelloMsg, in HelloWorld.asc.

    nc.call("serverHelloMsg", myResponder, "World");

    connectBtn.label = "Disconnect";

    } else {

    trace("Disconnecting...");

    // Close the connection.

    nc.close();

    connectBtn.label = "Connect";

    textLbl.text = "";

    }

    }


    // Responder function for nc.call() in connectHandler().

    private function onReply(result:Object):void {

                trace("onReply received value: " + result);

    textLbl.text = String(result);

         }


       }

    }

    ======================

    HelloWorld.asc

    application.onConnect = function( client ) {

    client.serverHelloMsg = function( helloStr ) {

    return "Hello, " + helloStr + "!";

    }

    application.acceptConnection( client );

    }

    Participating Frequently
    August 13, 2009

    Rename HelloWorld.asc to Main.asc and it should be in the HelloWorld directory. Apache shouldn't have anything to do with it. Default port for RTMP is 1935. Also, the onConnect method in the .asc file shouldn't have other functions. Basically, in the onConnect, you would add security and an allow/deny accordingly.

    application.onConnect = function( client ) {

       application.acceptConnection( client );

    }   

    client.serverHelloMsg = function( helloStr ) {

       return "Hello, " + helloStr + "!";

    }

    See how that works for you