tags:

views:

215

answers:

2

i want to make a simple chat with flex as3 and red5 media server

my idea is that i send from the swf a message to the server and the server sends it to all the swfs (including the one that sent the message)

i just don't know how to to send and receive and how to receive from the server

anyone could help ?

+1  A: 

You can use URLLoader to pass data back and forth. See this answer for examples on how to use the URLLoader class. Set up a timer and keep polling the server in every 5 seconds or so for new chat messages. Check out long polling if you want a better real life chatting.

Amarghosh
by server i meant "media server" not the asp.net server or something else
Omu
Afaik, you can use url loader with any server capable of dealing with http requests.
Amarghosh
+1  A: 

You should need go to the red5recorder site and see if there's a tutorial, but the code is fairly straightforward.

The NetConnection class connects to the media server, the NetStream class sends the messages, and event listeners set against the NetConnection instance capture the responses from the server.

adamcodes