I was wondering whether I could get the parent object of a method - something like this:
ImageAsset = function (path) {
this.ready = false; // I want the image.onload function to change this variable.
this.image = new Image;
this.image.onload = function () {
thisParent.ready = true;
};
this.path = path;
this.image.src = this.path;
};
Is there any way that I could do this? Thanks!