Guest User

Untitled

a guest
Apr 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     trace("connecting to " + inputServer.text + " " + inputPort.text);
  2.    
  3.     // works
  4.     var the_server:String = "127.0.0.1";
  5.     var the_port:uint = 5331;
  6.    
  7.     // doesnt work
  8.     // var the_server:String = inputServer.text;
  9.     // var the_port:uint = uint(inputPort.text);
  10.    
  11.     sock = new Socket();
  12.     sock.addEventListener(Event.CONNECT, onConnect);
  13.     sock.addEventListener(Event.CLOSE, onClose);
  14.     sock.addEventListener(IOErrorEvent.IO_ERROR, onError);
  15.     sock.addEventListener(ProgressEvent.SOCKET_DATA, onResponse);
  16.     sock.connect(the_server, the_port);
Add Comment
Please, Sign In to add comment