Hi,

This code:

public function initialise():void {
    panel.callback = callbackFunction;
}

public function callBackFunction():void {
    //TODO code goes here
}

Gives this error when the initialise function is called:

Uncaught ReferenceError: callbackFunction is not defined

Changing it to this (pun intended) makes it work. Why is “this" needed?

public function initialise():void {
    panel.callback = this.callbackFunction;
}

Thanks,
Justin

Reply via email to