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 a new message in "Default Forum"
Name:
Subject:
topic icon:
no
boardcode:
 Colour:  Size:   Close all tags
Message:
CAPTCHA: How much is 10 added to 9

Topic History of: nice
Max. showing the last posts - (Last post first)
Author Message
jankoM It works... thaks a lot. Now I have to decide what features chat should have, it's for kids portal and I want to make few things special. I will give you link when I have it done.



best regards,

Janko M.
jankoM Thanks, I will try it. I am still on dial-up and flash 8 is 100MB so this is not an option for me. Thanks for clearing it out for me, I didn't know glash 6 is MX ... I am mixing this with MS Visual Studio I gues... insted it has .NET for MX.. :)
Célio Conort waou



the previous message is very messed up as no tabulation were kept.



But pasted in Flash it should look ok



You could also download a demo version of Flash 8 to open the files and copy paste code in Flash MX



Good luck !
Célio Conort No i think in order it is :

Flash 5

Flash 6 = MX

Flash 7 = MX 2004

Flash 8



But i'll copy actionscript here :





The following refers to the actionscript in PalabreFlash.fla

To get it work you will need to add variables, and textfields, ..

(like a textfield : "txtdebug" , ...)



On a frame put this code :



--------



px = new XMLSocket();



px.onConnect = function(succes)

{

if(succes) {

debug('Connected')

// do something !

} else {

debug('no connection');

}



}



function debug (msg) {



_root.txtdebug.htmlText = msg + "<br/>" +_root.txtdebug.htmlText ;

}







function x2h(msg) {

msg2='';

msg = msg.split("<");

for(p=0;p<msg.length;p++)

msg2 += msg[p]+"<";



msg2= msg2.substr(0,-4)

return msg2;

}











px.onXML = function (msg) {

/* function called when XML node is received */



var PalNode = msg.firstChild;

var PalNodeName = PalNode.nodeName;

var PalNodeValue = PalNode.firstChild.nodeValue;



/*********************

*************************

The following is important !!

It will call a function named :

Pal_On_NAME_OF_THE_NODE

you then just have to create functions to handle the different nodes



like : Pal_On_m () , Pal_On_rooms() , Pal_On_Clients ()...



***************/



ret = eval('Pal_On_'+PalNodeName)(PalNode);



/* Just debug */

debug('<font color="#007700">*'+getTimer()+'* <b>Incoming :</b> <br>'+x2h(msg.toString())+"</font>");

}





/****************

Example Pal_On_m

*/



function Pal_On_m(node) {

if(node.attributes['r'] == _root.LobbyRoom) {

nick = node.attributes['f'];

if( nick == _root.myNickName) {

nick = "<font color='#aa0000'>"+nick+"</font>";

} else {

nick = "<font color='#0000aa'>"+nick+"</font>";

}

_root.Pchat.text ='<b>['+nick+'] : </b>'+node.firstChild.nodeValue+"<br/>"+ _root.Pchat.text ;

} else {

Alert.show( node.firstChild.nodeValue,"Message from : "+node.attributes['f'], Alert.OK, null, myClickHandler, "testIcon", Alert.OK);

}

}









function Pal_On_clients(node) {



var rooms = new Array();

if(node.hasChildNodes()) {



var node_rooms = node.childNodes;



for(p=0;p<node_rooms.length;p++) {

if(node_rooms[p].nodeName == "client") {

debug(node_rooms[p].attributes['name']);

rooms.push(node_rooms[p].attributes['name']);

}

}

_root.Prooms.labels = rooms;

_root.Prooms.data = rooms;

}



}

















/* Function to call in order to send XML */

function mysend(msg) {



_root.px.send(msg);

debug('<font color="#000077">*'+getTimer()+'* <b>Sending :</b><br>'+x2h(msg)+"</font><hr/>");

}







/* You will need textfields :

server_ip

and

server_port



Or just replace the vars bellow



*/



trace('Connecting : '+server_ip.text + ' '+server_port);





px.connect(server_ip.text,server_port.text);







stop();
jankoM I have flash MX - isn't that newer than flash 7, well I am not sure. If you copy paste the code is also good to me, whatever makes you the less trouble or work.
Célio Conort Hi !



i'm sorry but apaprently with Flash 8 i can only export Fla in Flash 7 minimum.



But i have an old multi player Flash car game, with a lobby, simple chat, and game, that i developped in Flash 5 or 6.



I can send it if you want. But it's a little old and i think very messy code ... but it can help for xml parsing etc etc



(i think the server chaned a little too so some tags may be false, but not much)





otherwise i can copy paste the code of the examples, it has only a few frames ...
SORRY, website is currently mostly broken due to software changes on the server.
Hope to fix it soon ...

In the meantime you may still download palabre or use the forum