trying to connect to socket using xmlsockets cause "Object #<Object> has no method 'SetVariable'"

608 views Asked by At

Im trying to connect to a tcp socket using xmlsocket:

    var xmls = new XMLSocket();

    function connect() {
        xmls.onConnect = function(success) {
            if(success)
                connected = true;
        };
        xmls.connect("localhost", 18757);
    };

    setTimeout(connect, 1500);

but when the browser tries to perform xmls.connect I get the exception:

Uncaught TypeError: Object # has no method 'SetVariable' __XMLSocket.connect

I guess because it tries to do:

    __flash.SetVariable("__serverPort",port);

I tried to find the problem but I can't find something about it and Im clueless with flash. any ideas?

0

There are 0 answers