A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Server Client

  1. #1
    Junior Member
    Join Date
    Dec 2001
    Posts
    27
    Can anybody give me an indepth tutorial or tell me how to use the XML sockets precisely?

    I wanna make a simple chat program and I don't know anything about using the network abilities of Flash.

    I just generally need to know how to:

    Connect at least 2 computers together
    How to send variables from one computer to the rest (if possible from one computer to only one of the others)
    How to receive variables
    How to make it so that everybody sees the same thing.

    Your help is greatly appreciated.

  2. #2
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    You should check out Unity for xml sockets, or flash communication server if you haven't already done so. The joy of fcs is that it's pretty easy to use once you get the hang of it. You don't have to parse xml and hey.. they added audio and video to boot. It is expensive, but depending on what you want it to do, it may be the choice.

    On the other hand.. xml isn't that hard either, it's just a bit overwhelming for the beginner, as is java if you plan to use Unity. Unity is fairly cheap, even free for non-commercial artistic work (yep, you can download it to learn with). It comes with some sample files to get you started.

    To answer your questions - the clients don't connect 1-to-1. They all connect to the xml socket server (or fcs) and send "messages" (variables - xml docs for unity, or serialized objects with fcs). When the server recieves them, it sends them out to any connected clients. The clients each do what they have to do with the message.

    Hope that helps!

    Psx

  3. #3
    Junior Member
    Join Date
    Dec 2001
    Posts
    27
    I downloaded FCS from http://www.macromedia.com

    it's just a bunch of help files. No programs

  4. #4
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    What os are you running?

    If it's not win98, you're in luck. The service should already be running, open one of the example files and test it out. If it works, go into the docs and check out the getting started and sample applications chapters.


    Psx

  5. #5
    Junior Member
    Join Date
    Dec 2001
    Posts
    27
    I'm running it on Win98 Se

    What exactly happened when I installed FCS? What does it do? I thought it was a program for making online swfs.

  6. #6
    Senior Member
    Join Date
    Sep 2000
    Location
    San Diego, CA
    Posts
    669
    Hey... me and PSX had a long thread on using FCS...
    heres what you gotta do... DL the server... its a DOS program that starts the server up... so after installing start the service... then DL the FCS component set. Unzip the components.fla into the dir. specified. Then start up flash... go to the FCS directory and open up the simple_text example. Now, its tells you to open two instances of the SWF to chat w/ yourself, running the server locally, but, if you want to run that over a network... start the service on one comp, get the IP of that comp, then go into the exmaples code (its AS), and change the line that looks like this:

    client_nc.connect("rtmp:/example_text/room_01");

    and add this:

    client_nc.connect("rtmp://IP address of server/example_text/room_01");

    mines looks like this:

    client_nc.connect("rtmp://10.86.2.56/example_text/room_01");

    then start up the SWF on each comp and chat away. thats all you need. No real coding to get up and running. Personally better than XML, and faster.

    Good luck.



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