ActionScript 2.0 :: XmlSocket - Multiplayer In Flash - Establish A Connection
Jan 24, 2009
I've been searching a long time to find a way to do multiplayer in flash. I came across xmlSocket. I'm trying it out really simple at first:
[Code].....
I've gotten all the policy stuff working. And this works perfectly while testing on my computer. If you're wondering, I have a python script listening on port 2950. Here's the python code:
[Code]....
Finally to the problem. No matter what I try, I can't seem to get these two applications to communicate when on different machines. When I try it, no messages even get through to python, it doesn't see anything trying to establish a connection. So I suspect it is having a problem on the flash side of things. Also, is there any way to have multiple flash apps communicating directly, rather than going through the server?
View 9 Replies
Similar Posts:
Aug 31, 2011
I've designed a flash [as2 php xmlsocket] chatroom , it works fine in localhost but i don't know how to run on real website server.I've uploaded the files but when i run the flash it can't establish a connection.What server requirements i need for xmlsocket?
View 0 Replies
Sep 26, 2010
Is it possible to establish an SSL connection from a Socket in Flash?
View 1 Replies
Aug 24, 2010
How can I establish connection of a Flash site with a database(i.e. MYSQLetc)?
View 4 Replies
May 24, 2008
Im trying to create a real time multiplayer game similar to "Stick Arena". Ive already created a nio java server which works wonderfully. Everything connects and works ok however the problem im facing is efficency. When I test the game on my lan network, there is a delay of about 200 ms. When the game is tested ona single computer everything gets sent without any significant delay (1ms~). Whats wrong?
View 6 Replies
Aug 18, 2011
how to establish http connection to a specific url and get data from that url in flex mobile project.
View 2 Replies
Nov 8, 2011
I've read about WebSockets but they don't seem to be pure "sockets", because there is an application layer protocol over them. "ws:"Is there any way of doing a pure socket connection from a web browser, to enliven webpages?Here are my random stabs in the darkApplets sockets provided by Java (need java installed)Flash sockets provided by Flash (need flash installed)But about HTML5, Why are they called WebSockets if they aren't Sockets?
View 3 Replies
Jan 19, 2009
i am using this code to connect to socket
Code:
function configureListeners(dispatcher:IEventDispatcher):void {
dispatcher.addEventListener(DataEvent.DATA, dataHandler);
dispatcher.addEventListener(Event.CONNECT, connectHandler);
dispatcher.addEventListener(Event.CLOSE, closeHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
[Code]...
View 2 Replies
Oct 29, 2009
am getting now really crazy over this.I wrote a shockwave application that connects to a server (this one I wrote in PHP) via XMLSockets. My problem now is that exactly after 3 seconds the client disconnects automatically from the server.Maybe some of you could review my code to give me a hint where the problem is located - note that I use ExternalInterface and call the functions with JavaScript.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="setup();">
[code]......
View 3 Replies
Mar 23, 2010
[URL]
I am using the same java server given there. and I am creating the XmlSocket in a flex air application. When I run my air application I get a java.net.SocketException connection reset at the java server.
Both are stand alone applications on my desktop.
Flex Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()">
[Code].....
View 1 Replies
Jun 16, 2010
I am trying to adapt an existing flash web chat application for the Android mobile phone and I am having this really annoying issue. The server is a custom based solution and can send back both binary messages or XML. So I can use either XMLSocket class or the Socket class to get data from the server. Everything works fine when deployed and I connect from the desktop but when I try it from the android mobile I get the infamous errors #2031, followed by #2048. Now the crossdomain.xml file is rock solid and works well for desktop. When the connect socket method runs I see that the server replies with the crossdomain file but I get the error when running on the mobile. Has anyone bumped into this? Is there some limitation from the mobile phone part. I wasn't able to find anything relevant for this issue, in terms of the phone not allowing Socket or SMLSocket connections
View 5 Replies
Aug 28, 2010
i've been looking in to making a multiplayer flash game.I downloaded and installed SmartfoxserverPRO with all the example files which are really awesome. I understand the idea/concept for those simple games like tic tac toe.So i'm here looking for information on making savable data to start off simple maybe just being able to save and store records for a tic tac toe game.
View 3 Replies
May 12, 2011
Is there any free Open Source Multiplayer Flash Game (like Happyfarm... in facebook) that I can use and build my own small network?What I'm looking for is the source code of some Multiplayer Flash Game (like http:[url]....for example)I do not know to much thing to talk about it, but if there is some, I hope:
+The game can run without any other system (not a plug-in or mod)
+If there is server-slide script, it should be PHP
+There is an English document for deverloper
View 1 Replies
Jul 2, 2011
I have an idea to create a multiplayer online card game and I prefer to use flash, like yahoo chess(it is not a card game), zynga poker etc.
View 2 Replies
Sep 1, 2011
How can I see the total duration (in minutes / seconds) of my (multi-scene) flash movie?
Is there a 'whole movie' properties where I can see the size, duration etc?
View 2 Replies
Mar 31, 2010
I want to make a simple game so that I can play against my friends at school. The school uses macs. Also if you can't make online games with flash what can I use. Also can they be 3-d if I eventually get good at making games?
View 4 Replies
Feb 17, 2012
I want to develop a game like wordfeud for android and iPhone. For now I don't have a mac so I am not able to use xcode to develop for iPhone. Therefore I have decided to use adobe AIR so I can link the game to both android and iPhone.
I am able to build offline games like tetris etc. but what should I look into when I want the game to be multiplayer just like wordfeud where you can have several games running at the same time. I know I need a server for this, but can I use xampp for now just to test the application and then export the db to a real server or is it a different kind of server I must use?
View 3 Replies
Feb 7, 2010
I have a server that I have written in Python and I'm trying to connect to it via Flash's XMLSocket. I know for sure that this server is working properly as I have used it successfully with multiple non-Flash client applications. For right now, I just want to connect to the remote server with an SWF residing on my local disk. From what I understand, this means that I do not need a security policy file since the SWF is not in another domain. I have also confirmed that the security sandbox property of the file is set to local-trusted, so the SWF should be able to connect to servers and retrieve data from them. Here's the important code from the AS file:
[Code]...
View 3 Replies
Jan 12, 2011
I want to know if there is any way to creat an online multiplayer game using flash or flex (flash builder).
View 1 Replies
Jun 16, 2011
I wish to create a multiplayer game facebook app. A game will have 1 to 4 people in it playing from their own systems. I wish to target, lets say, 10K simultaneous online users. I am planning to write the client side game in Flash. I wanted to know how these clients communicate with each other. Can these clients communicate directly with each other or I should go with "server as middleman" approach? I want the game to work even in "restricted" networks. If server, how do I have things working from google app engine cloud service? I came across channel API, should I use that? Would it work with a flash client?
View 3 Replies
Nov 11, 2011
I'm working on a puzzle game in Flash. It's a two-player, head-to-head game with some realtime elements. It is not Tetris-like, but the level of player interaction and the rate of movement is similar to, though slightly more complex than, Tetris Battle on Facebook.
Naturally, I would like to match players up over the Internet. I would also like to prevent cheating as much as possible. Because of this, I am researching an authoritative server solution, much like Colin Moock describes in this answer to a similar question. That is, the server runs the authoritative game logic while the client runs a parallel simulation, sending player movements to the server for validation.
My question is this: Doesn't this essentially mean implementing the game logic on both the client and server side? Worse still, the server probably isn't going to run its simulation in Flash/ActionScript, which means you can't share code and you'll be implementing the same logic twice in two different languages.
View 1 Replies
Dec 19, 2011
I made swf file that sends id to php, than php collects info from mysql by this id, and returns result, than flash does his work with that result. The problem is here, I will try to explain it as clearly as I can: everything works fine when I do that on the computer that has all the source files and of course xampp running.
[Code]...
View 1 Replies
Dec 17, 2010
I got a IP Communications new account having following paramters:
[Code]...
Its showing me connecting ... Status is not getting update like: "Connection Failed" or "Connection Success". how to use the above information in this app,
View 1 Replies
Jan 12, 2003
Flash MX Actionscript Bible
1) Its supposed to make a multiplayer flash-game in one chapter. What kind of game is it?
2) Is the chapter on remoting any good? Can you btw use remoting with php, or is it only with servlets and net?
View 11 Replies
Jul 30, 2009
I have a Flash client that I want to connect to a server. Both are using localhost and port 50000 so there shouldn't be any cross-domain problems. I also set Access Network Only in the publishing settings. When I call the XMLSocket connect, the server seems to get a new connection. But, the XMLSocket.onConnect callback is not called with success=true.[code]...
View 2 Replies
Mar 12, 2010
We're trying to create an app for OpenPeak. The Flash app will act as a client to a Java server on another computer on another domain.The Flash app client connects via XMLSocket. The Java Server uses ServerSocket to receive a request and send back a message.In order to trust the server, the Flash client needs a socket master policy file to tell it that the server comes from a trustworthy domain. According to an article on Adobe, when a connection has succeeded, the Flash client automatically requests the cross-domain policy or socket master policy file on port 843.Still, even when we implement it according to the tutorials and recommendations we have read, the Flash client continues to throw the following security error:[code]We've tried logging the policy file request during testing to see if there was any call made to port 843. There was not.Interestingly, even without a policy file, the Flash client still manages to send the first data message to the server successfully. It's just when the server tries to send back a reply that the entire thing hangs for about 10 seconds before the security error above is displayed.
View 1 Replies
Aug 27, 2010
I believe my flash client is losing some packets the server sends, because some packets get joined together hence I believe it drops them.Here is my packetHandler in flash
private var xmlsock:XMLSocket;
this.xmlsock = new XMLSocket();
xmlsock.connect("127.0.0.1", 1234);[code].......
A possible packet I sniffed sent by the server was.
u:105.w. aka (75 3A 31 30 35 00 77 00)
so the waiting packet never came in.
View 2 Replies
Jun 28, 2011
I have two software to create with AIR: a server and a client. Both with AS3 and AIR.I want to avoid having a big architecture with Remote Shared Object, or using BlazeDS, or having to set a Java / Python / ... server in the middle.In order to avoid having to parse socket data in the server and in the client side, I thought about using XMLSocket on the client side: the data arrives in a way which is already parsed by the Flash framework.However, when I use this XMLSocket with the AIR ServerSocket, the "connect" event returns me a raw Socket on the server side. So I have to manually manage the XML data on the server side.
Is there a way to also use an XMLSocket on the server side to communicate with the client? A kind of trick to convert the returned Socket into an XMLSocket?If there is an AS3 library which manages that, I did not find it.
View 2 Replies
Feb 19, 2011
We're looking for a good server to purchase to develop games with Flash/Android/iPhone clients with a .NET backend server (And even more importantly, that supports clustering and scaling in general).Now we've examined both ElectroServer and SmartFoxServer (both products look fine and suitable for our needs), however both can only be extended using Java.
View 2 Replies
Apr 5, 2011
I am looking to create a multiplayer game for both mobile devices (iPhone, Android, etc) and desktops. I have been looking at creating the game in Flash for desktops and writing the game in native language on the mobile device. Does anyone know of a good multiplayer socket server that work for connecting both the mobile and the desktop applications together.I have looked into SmartFoxServer (had a lot of trouble getting that working for some reason) and red5.
View 1 Replies