I followed the sets down to "Step 4, Running the development environment" without issue; however, I cannot seem to get the Flash client to connect to my local server. When I run the Flash code a window opens up and then cycles between displaying "Connecting" and "Unable to Connect to Server" very quickly.
I am running windows XP and chose to download Microsoft Visual C# 2010 Express.
The server seems to be running fine. Upon starting it displays the following output:
Server Started
========================
(waiting for connection)
Trying last loaded dll
Using Game Dll: FridgeMagnets.dll
========================
(dll: C:\Documents and Settings\adiehl\Desktop\Player.IO\Flash\Example - Multiplayer - FridgeMagnets\Serverside Code\Player.IO Test Server Project\bin\Debug\FridgeMagnets.dll)
When I try to connect to the server via telnet I believe that it works properly. Telnet outputs "Connecting To 127.0.0.1..." and then displays the following when I push any key:
<?xml version="1.0" ?>
<cross-domain-policy>
<allow-access-from domain="*" to-ports = "*"/>
</cross-domain-policy>
Connection to host lost.
Press any key to continue...
I also checked netstat to make sure that port 8184 was not in use by anything else.
In addition to these steps, I changed my Flash Global Security Settings to always allow swfs (here: http://www.macromedia.com/support/docum ... ger04.html) and made sure that I do not have IPv6 enabled. I also disabled my windows firewall as well as my anti-virus software.
Finally, I have tried changing the Flash code from:
- Code: Select all
function FridgeMagnets(){
stop();
PlayerIO.connect(
stage, //Referance to stage
"----OMITTED ON PURPOSE----", //Game id (Get your own at playerio.com. 1: Create user, 2:Goto admin pannel, 3:Create game, 4: Copy game id inside the "")
"public", //Connection id, default is public
"GuestUser", //Username
"", //User auth. Can be left blank if authentication is disabled on connection
null, //Current PartnerPay partner.
handleConnect, //Function executed on successful connect
handleError //Function executed if we recive an error
);
stage.scaleMode = StageScaleMode.NO_SCALE
stage.align = StageAlign.TOP_LEFT
}
private function handleConnect(client:Client):void{
trace("Sucessfully connected to player.io");
//Set developmentsever (Comment out to connect to your server online)
client.multiplayer.developmentServer = "127.0.0.1:8184";
To:
- Code: Select all
function FridgeMagnets(){
stop();
PlayerIO.connect(
stage, //Referance to stage
"----OMITTED ON PURPOSE----", //Game id (Get your own at playerio.com. 1: Create user, 2:Goto admin pannel, 3:Create game, 4: Copy game id inside the "")
"public", //Connection id, default is public
"GuestUser", //Username
"", //User auth. Can be left blank if authentication is disabled on connection
null, //Current PartnerPay partner.
handleConnect, //Function executed on successful connect
handleError //Function executed if we recive an error
);
stage.scaleMode = StageScaleMode.NO_SCALE
stage.align = StageAlign.TOP_LEFT
}
private function handleConnect(client:Client):void{
trace("Sucessfully connected to player.io");
//Set developmentsever (Comment out to connect to your server online)
client.multiplayer.developmentServer = "localhost:8184";
I also checked the Hosts file in my Windows system32 directory. I believe the file is configured correctly. It reads:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
At this point, I have tried everything that I found from previous forum posts without any success. Does anyone have any other ideas on what I can do to get this working?
Thanks.