Hi,
I’m trying to connect to a socket server. The socket server get’s the connection just fine but all the other things i put into the code don’t seem to render out usin the SDK.
// ActionScript file
package {
import flash.display.Sprite;
import flash.events.*;
import flash.net.Socket;
import flash.text.TextField;
public class Connect extends Sprite {
[SWF(width="500", height="500", backgroundColor="0xffffff", frameRate="25")]
private var socket:Socket;
public function Connect() {
socket = new Socket()
socket.addEventListener(Event.CONNECT, onConnect);
socket.connect("www.glig.com", 20000);
}
private function onConnect(event:Event):void {
var field:TextField = new TextField();
field.width = 400;
field.height = 400;
field.y = stage.stageWidth /2;
field.x = stage.stageHeight /2;
addChild(field);
field.text = "The socket is connected";
trace("woot, connected");
}
}
}
Tried to generate a textField where the text for the connection would end up but it doesn’t seem to render, neither does the SDK render out the white background.
Also trace(); doesn’t get traced out when i use the debugger from flash. I set the variables and such for the mm.cfg properly but it doesn’t seem to render out a log.
Any suggestions are appreciated.