You don't need frames to view this website. Flash communication server. Flash mx xml socket server.
Home
Main Menu
Home
- - - - - - -
What is Palabre ?
Features
News
FAQ
Forum
DEMO
- - - - - - -
Downloads !
Browse SVN
- - - - - - -
Search
Contact Us
- - - - - - -
Sourceforge Project Page
Python
Links
Palabre on Facebook






Actionscript for Multiplayer games
 
Download Palabre Flash Xml Socket Server DOWNLOAD Download Palabre Flash Xml Socket Server FORUM Download Palabre Flash Xml Socket Server FAQ Download Palabre Flash Xml Socket Server WHAT IS IT
 



Using Palabre ? Coming here for Support ? Please consider making an (even small) donation :)
Palabre Forum  


::post new topic::
Re:Connection Problems - 2009/06/20 17:02 You can see my HTML code at http://www.usachatnow.com/chat.php?mod_chat_page=flash&testing=yes

You'll see that this page doesn't really do anything - it's part of a larger frames-based application. The way that you can tell whether or not this is working, however, is that for testing purposes I have it set up to show JavaScript window alerts. Right now, on my system, this waits about 20 seconds and then shows "No Connection". On someone else's system, it would produce a whole bunch of popups containing the XML commands that are being sent and received.

My Flash code is as follows. Fair warning: there's a lot of junk in here that is purposeless or is commented out. I was doing a lot of testing, and I never got around to cleaning it up.

import flash.external.ExternalInterface;
import flash.events.Event;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
var hostname:String;
hostname = _root.hostname;
System.security.loadPolicyFile("xmlsocket://"+hostname+":2468");

function trace1(data1) {
ExternalInterface.call("ReceiveData", data1);
}
XML.prototype.ignoreWhite = false;
/* Create a new XMLSocket Object */
x = new XMLSocket();
x.ignoreWhite = false;
/* Define an handler function to check connection */
x.onConnect = function (status) {
if(status) {
/* If connection is OK then we can identify and start sending XML */
//_root.x.send('<connect nickname="test_'+random(30)+'" ></connect>');
ExternalInterface.call("Login");
ExternalInterface.call("JoinRoom");
} else {
trace1('No Connection');
}
}

/* Define an handler function to trace incoming XML */
x.onXML = function (xmlNode) {
trace1(''+xmlNode);
}

/* Then start the connection, adjust IP and port to reflect the server information */
x.connect(hostname,2468);
//x.send('<connect nickname="test_'+random(30)+'" ></connect>');
function getTextFromJavaScript(str) {
var senddata:String;
x.send(str);
//writeLVs = new LoadVars();
//senddata="testing, 123";
//writeLVs.senddata = senddata;
//writeLVs.send("writeToFile.php?uniqueID="+getTimer(), writeLVs, "POST");
}
ExternalInterface.addCallback("sendTextToFlash", null, getTextFromJavaScript);
  reply | quote

      Topics Author Date
    thread link
Connection Problems
narwold 2009/06/06 18:08
    thread link
thread linkthread link Re:Connection Problems
narwold 2009/06/11 05:39
    thread link
thread linkthread linkthread link Re:Connection Problems
narwold 2009/06/20 15:39
    thread link
thread linkthread linkthread linkthread link Re:Connection Problems
narwold 2009/06/20 16:50
    thread link
thread linkthread linkthread linkthread linkthread link Re:Connection Problems
narwold 2009/06/20 17:02
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:Connection Problems
alex 2009/09/01 10:25
::post new topic::