Search code examples
apache-flexadobered5

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 ?


Solution

  • 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.