views:

48

answers:

1

New to AS3 and I get this error: 1084: Syntax error: expecting rightbrace before colon. Conn:Socket: null,

var mc:Object = {
    Conn:Socket: null,
    Username:String: "fu",
};

function zSock(host:String = "70.32.72.134", port:String "70.32.72.134"):void {
    mc.Conn = new Socket(host, port);
    mc.Conn.addEventListener(Event.CONNECT, onConnect);
    mc.Conn.addEventListener(ProgressEvent.SOCKET_DATA, onData);
}
+1  A: 

you cannot strict type properties of Objects.

var mc:Object = {
    Conn: null,
    Username: "fu",
};
jonathanasdf