Starting with XML Sockets


 I've begun playing with Flash and XML Socket Servers and I thought I started taking to it easy, but now I'm running into some problems and I'm a bit confused! I was able to connect and disconnect to a socket server I wrote and Unity but I seem to be having problems sending and/or recieveing data.

I wrote a small amount of code to try it out:

var server:XMLSocket = new XMLSocket();

server.onConnect = function(success:Boolean) {

_root.onMouseDown = function(success:Boolean) {
server.send(“Sent Data!”);

server.onXML = function() {
trace(“Got Data!”);

It seems to be connecting fine but when I click and I try my send, I get no reaction at all! Thanks!