A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Using the Server to connect to other computers

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Location
    San Diego, CA
    Posts
    669
    Could anyone explain, or give me some ideas as to how to setup the server so that I can use the sample chat files across a network? How can I target another computer? And how does the server need to be configured.

    Help!

    -Tyler

  2. #2
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    I'm not sure what you mean. You can simply make standalones out of the chat and run it on each computer you want to be able to chat with.

    Psx

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Location
    San Diego, CA
    Posts
    669
    For example:

    using the simple chat example included, on multiple computers connected w/ in a network.

    I doesnt make sense to me that each seprate client (SWF) would connect on its own to each computer... wouldnt there need to be some IP logging, or a central server to distribute the text?


    -Thanks,

    Tyler

  4. #4
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    I doesnt make sense to me that each seprate client (SWF) would connect on its own to each computer... wouldnt there need to be some IP logging, or a central server to distribute the text?
    Each client connects to the flash communication server. That's the central server in question. You could do 2 things -- put up a webserver and put the chat there, and point the chat to your flashcom server, or give each computer a copy of the exe/projector. The server handles all the things you're talking about.

    Psx

  5. #5
    Senior Member
    Join Date
    Sep 2000
    Location
    San Diego, CA
    Posts
    669
    Ok...
    lets take the simple chat swf for example...
    you start the Flashcom service on one comp... then distribute the SWF to the other comp in the network (only 2 comps total). The host of the Flashcom server opens his SWF, and the client opens his SWF. what now? How does the Flashcom sever determine what comp to connect to?

    Could you go into detail and give me a overview of how to set up the Simple Text Share w/ 2 computers networked together?

    Regards,

    Tyler

  6. #6
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    Hey -
    It seems you're missing the fundemantal idea behind it all. It's not a peer-to-peer setup, rather it's a "traffic cop" sort of deal. The flashcom server basically keeps track of each user, and distributes the messages to all of them (in the case of the shared text).

    To try and break it down a bit.. None of the actual users need to have the flashcom server, it just needs to handle the connections. But in the case that you describe, one of the users is running the flashcom server, and that's ok.

    So person "a" opens his/her swf, and that swf connects to the flashcom server. Person "b" opens theirs and it connects to the server as well. Now when person "a" makes a change to the text, that changed text is sent to the server, the server then changes it's copy of the text, and then sends the changes to all connected computers (even to person "a"). The connected swf's all update their version of the text. Voila!

    Psx


  7. #7
    Senior Member
    Join Date
    Sep 2000
    Location
    San Diego, CA
    Posts
    669
    Hahah... around and around we go...

    Ok, I get the central idea. I understand the Sever's part. Hence the name SERVER. What I do not get is how it knows when a client SWF is open (person B, not running the service, as from our previous example). It obviously needs some sort of data, such as keeping track of the users... so then is it fair to say that the Simple Text exmaple will not run over a network w/ out more code? It seems that you continue to lay down the general principals that I get everywhere, but lack the other technical side.

    Thanks for everything,

    Tyler

  8. #8
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    Hehe. Phew! Glad you get it. I didn't want to have to try and explain it any further!

    The simple text example should run perfectly well without anything additional. What may be throwing it off is if you are trying to do it with exe's is your connection string. If you're connecting to something like "rtmp:/doc_textchat", try changing it to "rtmp://serverip/doc_textchat".

    The text chat keeps track of it's users in a shared-object. All the users are synced to that, and are added and removed by the server when you connect/disconnect. When you connect, you send a client Object to the server. It has a few properties, one being your ip address. When you send a message, you are actually calling a method on the server, which in turn calls a method on each client in order for you to receive the message.

    Hope that helps!
    Psx

  9. #9
    [title goes here]
    Join Date
    Apr 2002
    Location
    usa
    Posts
    124

    ASP gets the job done too

    this chat scenario is also possible without the flashcomserver...
    i did a similar thing about 6 months ago just using ASP and an Access database
    i am sure you could use a simple text file as well with CGI if you chose to
    each person has a SWF running that allows them to add to the current text string [dyn txt] and also keeps checking at a set interval for any changes to the string made by the other person — if any — then the 'chat' text is updated

    its pretty simple

  10. #10
    Senior Member
    Join Date
    Sep 2000
    Location
    San Diego, CA
    Posts
    669
    LOL! Well, I should have been more specific. All I needed was the code string that replaced my local mechine with the servers IP. anyway, now I can see how each SWF connects, and it all makes sense. From here on out, all I need to do is start adding my features (though Ive yet to test out the change in code, but hopefully that will solve the problem, as it is the soulution I was looking for).

    Thanks PSX,

    Peace outside.

    -Tyler

  11. #11
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    Woohaoaoa!!

    Glad you got it going! have fun with the new toys!

    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