title: using getJSON in a class (scoping issue)
body: <pre><code>//this is a class
  function SpriteSheetClass()
  {
      this.sprite="local";
  
      $.getJSON(url, this.onLoaded);      
  }   
  
  SpriteSheetClass.prototype.onLoaded= function(json) 
  {
      console.log(this.sprite); //returns undefined!
  
      //I am out of SpriteSheetClass scope! how do I store the json???
  }
  
  var a=new SpriteSheetClass()
  </code></pre>
  
  <p>When the getJSON callback is executed, the scope is not in the class. 
  There is no way to bind the returned json with my class instance (a)</p>
  
  <p>Keep in mind I want to keep the calls async, and I need to create many instances of SpriteSheetClass
  This is not a timing question, it is a scope question.</p>
  
  <p>thanks</p>