Calling functions in Classes

Hey all,

I got a question. How can I direct a function in a class to an object?

Ex:

class blah {
    var server;
    function blah () {
        this.server = new XMLSocket();
        this.server.onConnect = this.connector();
        this.server.connect(null, 1234);
    }
    function connector (success) {
        trace (success);
    }
}

Like, that piece of code does not work. The function “connector” within that class is not assigned to the server’s onConnect function, and therefore is not called. How do i link that function to that one?

Thanks! :A+: