Skip to main content
June 9, 2006
Question

help needed with streaming server

  • June 9, 2006
  • 1 reply
  • 229 views
hello. i work with a firm that provides hosting. one of our clients has asked if it was possible to use a streaming server from flash. now, to try it out, i've downloaded the trial version for the flash media server 2. i've read through the documentation, but i still cannot make it do what i want. as an example, i've downloaded the 'dynamic playlist' example. i've set it up completely as it's said on the site tutorial, yet i cannot connect with the server. before you ask, yes, the server is running and the application is loaded. the only thing i've really changed in the example is the url of the server inside the xml file. when i test the flash in flash pro 8, i get the message NetConnection.Connect.Failed, no matter what address i use, be it localhost, the internal ip address of the firm, or the external ip address for access via the net. admitted, i'm not the most knowledgable person on flash, but i still need to get that server running.

obviously, my boss wants that server up and running as soon as possible. can someone help me to set it up so i can make a connection with the server?

i can be reached at youri@ris.be. thanks in advance to those willing to help.
    This topic has been closed for replies.

    1 reply

    June 12, 2006
    Hi,

    please try this sample:
    http://www.adobe.com/devnet/flashcom/articles/broadcast.html

    The simplest sample works like this:
    1. Create a subdirectory in your [FMS_HOME] called "tutorial"
    2. Create a subdirectory in tutorial called "streams"
    3. Create a subdirectoy in streams called "video" (or use _definst_)
    4. Create a flv file using Flash Video and save it in your "video" directory.

    The server structure should look like this:

    [FMS_HOME]
    |------- applications
    ______|---------- tutorial
    ____________|---------- streams
    ___________________|----------- video
    ___________________________|---- videoToPlay.flv


    Now you can play the stream from within your flash application.
    The quickest application is created like this:
    1. Create a video instance (right click in "Library" and select "new video", name it "video" and make sure it's action script controlled. Then pull it onto the stage and make sure you give the instance a name, e.g. "myVideo")
    2. Now you need 5 lines of code.
    // a connection
    nc = new NetConnection();
    nc.connect("rtmp://localhost/tutorial/video"); // Important: No / (slash) at the end

    // Create stream onto your connection
    ns = new NetStream(nc);

    // Link your display to the stream
    myVideo.attachVideo(ns);
    // myVideo is the name of your video's instance (see above)

    // play the video
    ns.play("videoToPlay");
    // videoToPlay for videoToPlay.flv


    I hope this helps!