Sample apps not working

Ask a Question related to Macromedia Flash Flashcom, Design and Development.

  1. #1

    Default Sample apps not working

    I just downloaded FMS 2.0.1 today and installed on my Win2K dev machine. I just
    want to start testing.

    After reading up in the docs about how to connect to the server and being
    unsuccessful in doing so, I downloaded the samples from the Macromedia site. I
    unzipped and placed the samples and applications folders in the FMS
    installation directory.

    I can connect through the server admin console.

    The problem is that most of the sample apps don't work. I wanted to look at
    the sample_guestbook app since it seems pretty simple. When I launch the SWF in
    either the standalone player or in the browser (from the provided HTML file)
    nothing happens. I then opened the FLA and published but I get a trace of
    "Unable to connect".

    When I try the sample_lobby SWF it works. The problem with that is the
    connection process is a lot more complicated since it's using components.

    I tried my own FLA but it won't work:

    var nc = new NetConnection();
    nc.onStatus = function(info)
    {
    trace(info.code);
    }
    nc.connect('rtmp:/tutorial_text/room_01');

    I always get NetConnection.Connect.Failed

    I also tried:
    nc.connect('rtmp://127.0.0.1:1935/tutorial_text/room_01');
    to no avale.

    I then looked at tutorial_text, which is also pretty simple, but I can't
    publish it since I don't have NetDebug.as. Why is that not installed?

    Sorry for the newbie questions, but starting out with FMS has been
    frustrating. Is there a beginner's guide or something? I don't mean
    installation - I got that. I mean a "Now that you've installed FMS, here's an
    FLA and associated files, and here's where to put it, and it should work". The
    samples just don't do that.

    I think a simple tutorial from Macromedia in this regard would do wonders in
    getting people hooked on FMS.

    In case it matters, I don't have a web server running on my system and my
    firewall software is off.


    mbd

    P.S. In case any Adobe people actually look at this board, providing a link to
    a Documentation folder where files are named flashmediaserver_cs_asd.pdf is
    very wrong. It's like mystery-meat-navigation for files: open this one... nope.
    this one? nope. sigh. How about a link called "Client-Side ActionScript
    Language Reference"?

    mbd Guest

  2. Similar Questions and Discussions

    1. Sample Applications and/or obtaining apps from Influxis
      Anyone have a list of other sites providing example apps and/or free applications for download? I also was interested in getting some of the apps...
    2. FMS2 does connect, but sample apps don't
      hi all, i don't think anyone can help me, but i'll explain my problem anyway.. i have FMS2 installed on Win XP.. it works fine.. and i can go to...
    3. Error with admin/can't get sample apps going
      Hi folks, I'm having a bunch of problems. First of all, the sample applications I downloaded don't seem to be working--I've tried a bunch, like...
    4. sample apps and getting started tutorials
      hi, ever since installing coldfusion (initially 6 and now 7), I have not been able to access the sample applications, well today I looked at my CF...
    5. Getting Started/Sample Apps Not installed...
      I installed CFMX 7 and although I DID check the boxes to install the Sample Apps and the Getting Started tutorials etc....They are not installed. ...
  3. #2

    Default Re: Sample apps not working

    Am I really the only one that can't get the samples, and even the most basic code, to work?

    Can anyone shed some light on why this might be happening? Anything at all?


    mbd
    mbd Guest

  4. #3

    Default Re: Sample apps not working

    If the swf is on the same machine as fms, try this:

    nc.connect('rtmp://localhost:1935/tutorial_text/room_01');

    If the .swf is on another machine on your network, try this:

    nc.connect('rtmp://FMS_LAN_IP:1935/tutorial_text/room_01'); <- insert the LAN
    ip of your FMS machine

    If the .swf is connecting to your FMS server from elsewhere (prehaps the
    internet) try:

    nc.connect('rtmp://FMS_WAN_IP:1935/tutorial_text/room_01'); <- Insert your
    internet (WAN) ip

    On the FMs machine, make sure you don't have a firewall preventing connections
    to FMS.

    JayCharles Guest

  5. #4

    Default Re: Sample apps not working

    Hi Jay,

    Thanks for the response.

    Here's my code:

    var nc = new NetConnection();

    nc.onStatus = function(info)
    {
    trace(info.code);
    }

    nc.connect('rtmp://localhost:1935/tutorial_text/room_01');

    Trace output:
    NetConnection.Connect.Rejected
    NetConnection.Connect.Closed

    My firewall software is disabled.

    I'm on Windows 2000.

    The FMS is on the same machine that I'm trying the code.

    If nothing seems obvious about this then perhaps it's something basic that I
    didn't do, or am not doing, in the server console. Is there anything that I
    need to do there?

    TIA, I appreciate the time.


    Derek Vadneau

    mbd Guest

  6. #5

    Default Re: Sample apps not working

    Now we're getting somewhere. The following output:

    NetConnection.Connect.Rejected
    NetConnection.Connect.Closed

    Tells you that the .swf found the server and tried to log in, but the server
    rejected the connection. That's a good thing... as it means your FMS
    installation is working and your firewall isn't getting in the way.

    I haven't used any of the sample apps, but I would imagine they are looking
    for some parameters in the connect argument... perhaps a username? Look at
    main.asc in the application directory and see what it's looking for in the
    application.onConnect function.

    JayCharles Guest

  7. #6

    Default Re: Sample apps not working

    Ok, someone from Adobe has really GOT to go through and update the samples they
    post on their site. There is no application folder for the tutorial_text
    sample, so no main.asc file. Arg. I assume that would be why it won't work.

    However, it isn't the only sample that doesn't work.

    Here's one that does have an application folder:
    Sample - tutorial_hello


    Contains two textfields, one named User, the other Message. Also contains a
    button named Connect_btn.


    // Must be commented out since it isn't included with FMS.
    //#include "NetDebug.as"

    stop();

    // Open connection to the server
    client_nc = new NetConnection();

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

    // Event handler for Connect_Btn
    function doConnect() {

    // If user wants to connect...
    if (Connect_btn.getLabel() == "Connect") {

    // Connect to the hello application
    client_nc.connect("rtmp://localhost:1935/tutorial_hello/room_01", User.text);

    // Update button label
    Connect_btn.setLabel("Disconnect");

    // If user wants to disconnect...
    } else if (Connect_btn.getLabel() == "Disconnect") {

    // Close connection
    client_nc.close();

    // Reset button label
    Connect_btn.setLabel("Connect");

    // Reset the text fields
    user.text = "";
    message.text = "";

    }
    }

    // Callback function server calls to send message back to
    // this client.
    client_nc.msgFromSrvr = function(msg) {

    var msg;
    _root.Message.text = msg;

    }


    application.onConnect = function(newClient, name) {

    // Give this new client the same name as the user name
    newClient.name=name;

    // Accept the new client's connection
    application.acceptConnection(newClient);

    // Create a customized "Hello " message
    // that the server will send to the client
    var msg = "Hello! You are connected as: " + newClient.name;

    // Print out status message in the application console
    trace("Sending this message: " + msg);

    // Call the client function, 'message,' and pass it the 'msg'
    newClient.call("msgFromSrvr", false, msg);
    }


    When I publish/test this example, I enter my name, click the Connect button,
    and I get this in the trace output:
    Level: error
    Code: NetConnection.Connect.Failed

    Sorry to change to another example but I didn't have much of a choice. Are we
    back to square one?

    I feel like an idiot because I realize many other people have this working.


    Thanks,

    Derek Vadneau

    mbd Guest

  8. #7

    Default Re: Sample apps not working

    Do you add the application folder to your FMS applications directory?
    JayCharles Guest

  9. #8

    Default Re: Sample apps not working

    Yes. After I unzipped the samples I moved the whole applications directory into
    the FMS install directory:
    C:\Program Files\Macromedia\Flash Media Server 2\applications

    The applications\tutorial_hello\main.asc file is actually in:
    C:\Program Files\Macromedia\Flash Media Server
    2\applications\tutorial_hello\main.asc

    I can see the application from the admin console as tutorial_hello, under
    Manage Servers > Applications.

    I also copied the samples directory into:
    C:\Program Files\Macromedia\Flash Media Server 2\samples
    (where the FLA resides)

    I realize I didn't need to do this but it seemed as good a place as any.


    Derek Vadneau

    mbd Guest

  10. #9

    Default Re: Sample apps not working

    I have exactly the same problem. I can also connect as administrator on port
    1111.
    nc=new NetConnection();
    nc.onStatus=function(info){
    trace(info.code);
    };
    nc.connect("rtmp://localhost:1111","administrator","password");
    NetConnection.Connect.Succesful

    but when I want to connect with :
    nc=new NetConnection();
    nc.onStatus=function(info){
    trace(info.code);
    };
    nc.connect("rtmp:/helloVideo", "lex");

    I received: NetConnection.Connect.Failed
    the admin console is working.
    I already tried rtm://localhost:1935/helloVideo","lex", but I get the same
    results.

    Is it possible that it had to do with more than 1 ethernet card in de computer?


    Lex Prozee Guest

  11. #10

    Default Re: Sample apps not working

    I don't have more than one ethernet card, so I can't say if that's what's
    happening in your case or not.

    Thanks for posting your issue. Perhaps it'll get a little more attention if
    more people that are having the issue post about it.

    I don't mean to knock Jay's efforts here - he seems to be very active in
    helping out on the forums.

    Maybe if we can find a commonality it'll help us narrow down the issue.

    Are you using Windows 2000, XP, 98?

    I have Flash MX, MX 2004, and 8 installed. I also have Flex Builder 2 Beta 1
    installed (although not running during FMS testing).

    I have tried the code I posted in Flash MX and in Flash 8 with the same
    results.

    The FMS processes are all running:
    FMSAdmin.exe
    FMSCore.exe
    FMSCore.exe
    FMSEdge.exe
    FMSMaster.exe
    (at least I think that's all of them)

    I can't think of anything else relevant at the moment.

    mbd Guest

  12. #11

    Default Re: Sample apps not working

    I'm running Windows XP SP2. I try to uninstall all the antivirus software and
    al the hitmanpro etc. but this is also no solution.
    What I see in de logfile Core.00 is this error?


    2006-04-21 01:01:50 4620 (w)2631008 Asynchronous I/O operation failed (Failed
    to attach to completion port: De parameter is onjuist. 87). -

    2006-04-21 01:01:50 4620 (w)2631008 Asynchronous I/O operation failed (Failed
    to attach to completion port: De parameter is onjuist. 87). -

    2006-04-21 01:01:50 4620 (w)2631008 Asynchronous I/O operation failed (Failed
    to attach to completion port: De parameter is onjuist. 87). -

    2006-04-21 01:01:51 4620 (w)2631008 Asynchronous I/O operation failed (Failed
    to attach to completion port: De parameter is onjuist. 87)

    Lex Prozee Guest

  13. #12

    Default Re: Sample apps not working

    Originally posted by: Lex Prozee
    I have exactly the same problem. I can also connect as administrator on port
    1111.


    When you connect to port 1111, you're not connecting to the FMS service,
    you're connecting to the FMS admin service. Have you tried starting an
    application from the admin console? If so, what are the results?



    JayCharles Guest

  14. #13

    Default Re: Sample apps not working

    Originally posted by: mbd

    When I publish/test this example, I enter my name, click the Connect button,
    and I get this in the trace output:
    Level: error
    Code: NetConnection.Connect.Failed



    You get this error when you run the .swf on the same machine FMS is installed
    on, using localhost as the domain?



    JayCharles Guest

  15. #14

    Default Re: Sample apps not working

    You get this error when you run the .swf on the same machine FMS is installed
    on, using localhost as the domain?
    Yes. I ran the code from Flash 8 (originally in MX) on the same PC that FMS is
    installed and running. The code I gave is exactly what I ran.

    This line:
    client_nc.connect("rtmp://localhost:1935/tutorial_hello/room_01", User.text);
    was altered from the original:
    client_nc.connect("rtmp:/tutorial_hello/room_01", User.text);
    which was in the original sample, and also had the same result.


    Derek Vadneau

    mbd Guest

  16. #15

    Default Re: Sample apps not working

    I created a new app/folder called testApp and placed this in the main.asc file:

    application.onAppStart = function()
    {
    trace("Test App Starting");
    }

    application.onConnect = function(client)
    {
    trace("Connecting Client");
    }

    I then used this on the client:
    var nc = new NetConnection();
    nc.onStatus = function(info)
    {
    trace(info.code);
    }
    var r = nc.connect('rtmp://localhost:1935/testApp');
    trace(r);

    The trace output is:
    true
    NetConnection.Connect.Failed

    In the Server Log section of the admin console I see:
    Asynchronous I/O operation failed (Failed to attach to completion port: The
    parameter is incorrect. 87).

    Not sure if this is relevant or not.

    And in case someone can see something from this, here are the lines from my
    log files after the connection attempt:
    edge.00.log
    2006-04-25 12:31:57 2436 (i)2581252 Registering core (1500). -

    master.00.log
    2006-04-25 12:31:56 2064 (i)2581221 Core (1500) started, arguments : -adaptor
    "_defaultRoot_" -vhost "_defaultVHost_" -app -inst -conf "C:\Program
    Files\Macromedia\Flash Media Server 2\conf\server.xml" -name
    "_defaultRoot_:_defaultVHost_::". -

    admin.00.log
    2006-04-25 12:31:57 632 (i)2581243 Connection from core 1500 received. -
    2006-04-25 12:31:57 632 (i)2581244 Connection from core 1500 accepted. -

    core.00.log
    2006-04-25 12:31:57 1500 (i)2581237 Starting admin app on core (1500). -
    2006-04-25 12:31:57 1500 (i)2581238 Core (1500) connecting to admin. -
    2006-04-25 12:31:57 1500 (i)2581231 Core (1500) connected to admin. -
    2006-04-25 12:31:57 1500 (i)2581246 Core (1500) sending register cmd to edge. -
    2006-04-25 12:31:57 1500 (w)2631008 Asynchronous I/O operation failed (Failed
    to attach to completion port: The parameter is incorrect. 87). -
    2006-04-25 12:31:57 1500 (i)2581234 Core (1500) connection to admin accepted. -
    2006-04-25 12:32:32 1500 (w)2631008 Asynchronous I/O operation failed (Failed
    to attach to completion port: The parameter is incorrect. 87).


    Derek Vadneau

    mbd Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139