Omu
Omu

Reputation: 71206

flex: how to send/receive data from/to media server

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 ?

Upvotes: 0

Views: 583

Answers (2)

adamcodes
adamcodes

Reputation: 1606

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.

Upvotes: 1

Amarghosh
Amarghosh

Reputation: 59451

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.

Upvotes: 1

Related Questions