Skip to main content
Participant
October 8, 2006
Question

Hello World?

  • October 8, 2006
  • 3 replies
  • 398 views
I have downloaded Flash Media Server 2 and installed it but I have no way to tell if its working and I have no way to get started. I downloaded the samples and tutorials from this website and installed them correctly in the application folder. Not one works. None of them are able to connect to the server. Could it be because the samples were created for Flash Communication Server. There doesn't seem to be any current information about Flash Media Server 2.

I've been looking for 3 days for a Hello World media server application and have not found anything. Can anybody help me out?

Please no links to book stores, imcomplete samples, or obsolete samples. I have enough of those already.
    This topic has been closed for replies.

    3 replies

    infra172Author
    Participant
    October 9, 2006
    Are you sending me a file or do I create it using that code? What do I need to save it as? That's the problem I have with the other examples I've seen. I never know if I've done everything. Nothing is explained in a linear fashion.
    Inspiring
    October 9, 2006
    create the document from the posted code.....sorry i wasn't clear on that part.
    BTW you need flash professional to use the media server.
    here is a website for the basics of flash.... http://www.vtc.com/products/flashmx2004actionscript.htm
    1. open flash8 pro
    2.write flash script
    3. save the flash document to the media server 2 applications directory.
    4. press cntrl+enter to compile and test movie.
    5. press f-12 to compile and publish the movie to a html page.
    Inspiring
    October 9, 2006
    P.S. flash media server can be flaky if something doesn't work but you are sure your code is correct then open a fresh document and copy and paste and recompile...trace the hell outta things too. Also get the program TCPview and look at the connections you make to the media server.
    Inspiring
    October 9, 2006
    well you really need a book on how to use the media server 2 ....there are two types of objects which can store or transmit information. The remote shared object and netstream.....i'll provide you with code to get you started with the remote shared object which allows you to save text and variables mostly and then you need to find information about the netstream which will allow you to connect a webcamera and microphone....start with the remote shared object it is the easiest to understand. to tell if your server is working log into the admin console it is located in the macromedia directory under start menu....read my notes in the fla i'm sending you. ....also note that you must run the .swf from the applications directory located in the macromedia folder under C:\Program Files\Macromedia\Flash Media Server 2\applications....you can create folders for your apps in the applications directory. what exactly do you want to do with media server ?

    // there is a dynamic text field with an instance name of TypingStage
    // the remote shared objects name is sharedtext
    // Open connection to FlashCom
    client_nc = new NetConnection();

    // Handle status message
    client_nc.onStatus = function(info) {
    trace("Level: " + info.level + newline + "Code: " + info.code);
    }

    client_nc.connect("rtmp:/RSO");

    // Initialize the typing stage
    // not necessary for the script to function but is probably a good idea
    TypingStage.text = "";

    // Create a remote shared object. client_nc.uri is the URI of the
    // NetConnection the shared object will use to connect to the
    // server. I.e., the one just created.
    text_so = SharedObject.getRemote("sharedtext", client_nc.uri, false);

    // The following is very important, nothing happens otherwise
    text_so.connect(client_nc);

    // Each time something changes in the shared object, the server
    // sends out a synchronization message. This onSync handler
    // updates the movie based on the information.
    text_so.onSync = function(list) {

    // Update the textArea in the typing stage with the latest
    // text from the shared object. The 'for' loop condition searches
    // through the list of changes, and the 'if' condition ensures
    // that we apply the relevant change only if someone other than
    // this client has changed the value.
    for ( var i = 0; i < list.length; i++ )
    if ( list .name == "textValue" && list.code != "success")
    {
    TypingStage.text = text_so.data.textValue;
    break;
    }
    };


    // Update the shared object every time the user types in new text
    TypingStage.onChanged = function()
    {
    text_so.data.textValue = TypingStage.text;
    };