Hi, I want to open a connection back to the server using Flex so I can stream chat messages to the Flex front-end. How do I do this and does Flex enforce any same-origin restrictions on ports or subdomains?
+1
A:
You'll have to use a messaging server software and then use the Producer and Consumer classes in the Flex framework to send and receive messages.
What you need depends on what server you are running on. If you are on a Java stack, you can use BlazeDS and ActiveMQ.
If you are streaming/consuming from and to different domains, you'll need to setup a crossdomain file that allows the inter-domain communication.
Christophe Herreman
2009-08-04 13:03:06
See this SO question and answer for more info on crossdomain policy file - http://stackoverflow.com/questions/1204061/flash-client-xmlsocket-not-connecting-to-server
zooropa
2009-08-18 20:46:27