I'm having problems with the following bit of code (I've omitted irrelevant lines):
var audios = function(url){
this.loaded = false;
req.onload = function () {
this.loaded = true;
}
}
The object member this.loaded is not being updated to true when the XHR loads. And it definitely gets to the onload function. I think I'm not referencing it correctly, but I can't work out how. Any help would be great, thanks.