Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I feel your pain... these kinds of errors are most typically associated with Flash security and often result in reverse engineering some of the 'secret sauce' behind socket handling. To say that Flash is picky about ports, policy, and timing is an understatement. There is a great article by Nuno Freitas that you should take a look at.
http://www.broculos.net/tutorials/how_to_make_a_multi_client_flash_java_server/20080320/en
Cheers,
Rick Winscot
Copy link to clipboard
Copied
Having spent three days trying to run this down, I'm going to start by saying that I'm honestly surprised no ones put together a page that says, "Oh hey, before you use XML sockets here's 150 things you need to know first." Or maybe someone did put that page together but I couldn't find it. So in the interest of saving someone the big hassle I just had, here's what you might be doing wrong.
Start here:
Then have a look at this, particularly the example:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/XMLSocket.html
Now you might be tempted to skip all of the adding of those event listeners, but if you do if any kind of communication problem arises in the connection Flash won't know how to handle it and you'll get Error #2031 or #2044 or both.
But wait, that's not all! You also have to come up with some way to let the PLAYER (not your application, not the sever) know that it's allowed to communicate on the port, and for that you need this document:
http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html
Seriously, if this helps you, please let me and Adobe know.