Calling functions within a class to get the var's in that class

Hey all,

Pretty simple question actually.

class me {
var a:Boolean;
var b:XMLSocket;

function me () {
this.b = new XMLSocket();
this.b.onConnect = this.initiateMe;
this.b.connect(blah blah, blah blah);

function initiateMe(success) {
if(success) {
this.a = true;
} else {
this.a = false;

I’m referencing the function initiateMe to the onConnect event handler. When that event handler is triggered, the function initiateMe is triggered as well. However, it doesn’t seem to have the correct parent/child level. I cannot get the variable a within that class anymore. It’s as if the function is called as a public function. “this.a” is not that a variable in that class.

How can I retrieve that variable? What level is this function operating at?

PS. I tried _parent.parent.a as well, which doesn’t work.

Thanks in advance