A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: NetConnection screwed up

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    Planet Earth
    Posts
    298
    Started with the "recreate the sample directions" for the Text Chat sample. I got this in the output window "Level: error
    Code: NetConnection.Connect.Failed" and nothing happened.

    I accepted that most of this stuff is over my head and I probably made some mistake somewhere. So I took the sample file, saved it as well as the main.asc which I also cut and pasted after my initial failure.

    Published and tested and got the same message. WHHYYYY????

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Posts
    111
    Okay some things to look at:

    1) Are you running the trial on your local box? If so have you started the server?

    2) Where is your Applications directory? Is it Program FIle/Flash Communications Server/Applications or wwwroot/Flashcom/applications? You can adjust this in the Vhost.xml file

    3) Did you make a new folder in that applications directory called the same name as the app URI in you netConnection command?

    These details will help us to help you.

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Planet Earth
    Posts
    298
    Originally posted by dcullipher
    Okay some things to look at:

    1) Are you running the trial on your local box? If so have you started the server?

    2) Where is your Applications directory? Is it Program FIle/Flash Communications Server/Applications or wwwroot/Flashcom/applications? You can adjust this in the Vhost.xml file

    3) Did you make a new folder in that applications directory called the same name as the app URI in you netConnection command?

    These details will help us to help you.
    1) yes and yes
    2) Program FIle/Flash Communications Server/Applications
    3) Yes

  4. #4
    Senior Member
    Join Date
    Aug 2001
    Posts
    111
    Okay first I would try running the NetConnection debugger so maybe you can get a little more detail on the failure.

    On you frame actions put

    #include "netbug.as"

    Then open the netconnect debugger before you publish.

    I would think that you're using rtmp:/test_app for your URI. You may also try using an absolute path of rtmp://10.2.3.4/test_app

    You may want to check to see if you have a FlashCom/applications directory in your web root and try to put a folder for your app there.


  5. #5
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    What os are you running on the server? It has to be at least win2k. It won't work with win98(tried!). Works fine with xp.

    Not sure what else there is other than the stuff dcullipher mentioned. One thing would be to try going directly to the port (1935):
    rtmp://localhost:1935/my_app/

    And lastly - for whatever reasons, I've had troubles using:
    rtmp:/test_app

    but have success with:

    rtmp:/test_app/

    Psx

  6. #6
    Senior Member
    Join Date
    May 2001
    Location
    Toronto
    Posts
    128

    Can't tell if I'm connected

    Hi guys,

    I thought I'd latch on to your discussion seeing as it is the closest to my problem.

    I'm new to FCS. I'm working through the "testing your environment" section on the "Communication Components.pdf" file. Basically, I'm trying to set-up a simple connection to the server. I've set-up a trace and I'm certain that my path is correct. Unfortunately, I don't even get an output box let alone an error message (e.g. "NetConnection.connect.Failed") when I test the movie. What on earth am I doing wrong?

    Oh yeah, I'm being hosted on mediatemple.

    Any help would be greatly appreciated.

    Thanks.


  7. #7
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    Hey -
    I can't seem to find where I put that swf -
    but here's the simplest code I could think of to test if you're getting a connection:
    Code:
    main_nc = new NetConnection();
    main_nc.connect("rtmp://www.mydomain.com/test_app");
    main_nc.onStatus = function(list) {
    trace(code.list);
    }
    The trace will spit out something like "net connection success", or failure, if you are able to get to the machine. The likely cause for a failure at that point is that there isn't a directory at "test_app". If nothing happens at all, then it may be that you're behind a firewall, and the outbound port is blocked??

    Psx

  8. #8
    Senior Member
    Join Date
    May 2001
    Location
    Toronto
    Posts
    128
    Thanx psychlonex.

    The code didn't work initially but your talk of firewalls and blocked outbound ports got me on the right track.

    I found a thread that talked about connection problems with http proxies. That's when I started thinking that maybe I can't connect directly to mediatemple using rtmp from my home computer. So I loaded the files to my server and bingo! it worked.

    I am however confused -- does this mean that FCS will only work with apps on the same machine? I thought you can run apps on different machines as long as they pointed to the correct URI.

    Thanks again.


  9. #9
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    Hey -
    Oops!
    the code should be:

    trace(list.code);

    But you should be able to connect from your home machine. This is one of the big points to flashcom. Not sure why, unless of course you have something blocking your outbound connection.

    Psx

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center