Hoi
i made an example so i can explein the prob better
Class = function () {};
Class.prototype.getTheData = function() {
this.vars = new LoadVars();
this.vars.onLoad = function() {
this.callback();//<= prob here
};
this.vars.load("data.php");
};
//
myDataThing = new Class();
myDataThing.callback = function() {
trace("ok");
};
myDataThing.getTheData();
I am making a class and if have another build in object in it. I what to add a callback to it but the inheritance is not right. I know how the set up inheritance
- subClass.prototype.proto = superClass.prototype;
- subClass.prototype. = new superClass;
but its all messed up in my head so I was hoping someone could point me in the right direction on how to get the callback to work with out messing up the LoadVars class too much.
thanks