Skip to main content
Participant
November 9, 2006
Question

returning error messages from media server

  • November 9, 2006
  • 2 replies
  • 402 views
My application requires that I can get detailed feedback from the FMS upon a given failure. For instance, if I try to open a stream who's file does not exist, is it possible to have a message or error code returned to Flash so that I can deal with the problem accordingly (in this case display some text that says "stream not available or similar)?

From my experience, the only messages that get returned are success or failure messages but nothing specific.
    This topic has been closed for replies.

    2 replies

    November 14, 2006
    It's good to have an onStatus handler for your netconnection (as you seem to), but you also want an onStatus handler for your netStream.
    November 9, 2006
    quote:

    Originally posted by: ysv
    For instance, if I try to open a stream who's file does not exist, is it possible to have a message or error code returned to Flash so that I can deal with the problem accordingly (in this case display some text that says "stream not available or similar)?



    Look in the docs under the netStream class, and it's onStatus method. If a stream is not found, the onStatus returns netStream.play.streamNotFound as the code. You just need to have your netStream's onStatus method fire off your events.

    ysvAuthor
    Participant
    November 14, 2006
    Thanks for the reply.

    While I do get specific messages for some things, they seem limited. For instance, I do get 'NetConnection.Connect.Failed' when it cannot connect to the FMS and I also get 'NetConnection.Connect.Closed' when a stream is playing and the FMS goes down or similar.

    However, when I have it play a stream which doesn't exist I just get 'NetConnection.Connect.Failed' with no specific message such as the streamNotFound which you mention here. Do you see any reason for this?

    Thanks