Crazy Latvian
Visitor
|
Connection gets slower and slower... - 2007/07/12 18:10
Hi! I'm new to Palabre, and I'm making a multiplayer game in flash with it (nothing big, just to learn more), and it works fine!!! EXCEPT, that after the while, the recieving of a connection gets slower and slower, until finally the swf you were using stops responding, and just repeats your last move. Here's the code for moving:
_root[nick].onEnterFrame = function() { if (Key.isDown(Key.UP)) { _root[nick]._y -= 5; px.send('<msg toroom="lobby" back="1">'+_root[nick]._x+':'+_root[nick]._y+'</msg>'); } else if (Key.isDown(Key.DOWN)) { _root[nick]._y += 5; px.send('<msg toroom="lobby" back="1">'+_root[nick]._x+':'+_root[nick]._y+'</msg>'); } else if (Key.isDown(Key.LEFT)) { _root[nick]._x -= 5; px.send('<msg toroom="lobby" back="1">'+_root[nick]._x+':'+_root[nick]._y+'</msg>'); } else if (Key.isDown(Key.RIGHT)) { _root[nick]._x += 5; px.send('<msg toroom="lobby" back="1">'+_root[nick]._x+':'+_root[nick]._y+'</msg>'); } };
As you can see, I'm using the code from the chat client example. Is there a way to send custom variables, or custom nodes? Thanx!
|