PDA

Click to See Complete Forum and Search --> : Server Client



SonBardock
09-09-2002, 06:36 PM
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.

psychlonex
09-09-2002, 11:10 PM
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

SonBardock
09-10-2002, 04:32 PM
I downloaded FCS from http://www.macromedia.com

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

psychlonex
09-10-2002, 04:37 PM
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

SonBardock
09-10-2002, 04:44 PM
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.

GameDev
09-10-2002, 07:35 PM
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.