title: Return "success:" method's data?
body: <p>I'm trying to get the return value of a utility method I wrote using jquery:</p>
  
  <pre><code>function loadFrames(coords, spritesheet) {
      return $.ajax({
          type: "GET",
          url: coords,
          dataType: "xml",
          success: function(xml,code,obj) {return parseFrameData(xml, spritesheet);}
      });
  }
  </code></pre>
  
  <p>So, this method receives  two arguments, opens a file (the one pointed to by the "plist" argument) and runs the parseFrameData method.
  The latter returns an array of objects.</p>
  
  <p>I would like to use this the following way:</p>
  
  <pre><code>var frames = loadFrames('player.xml', 'spritesheet.png');
  </code></pre>
  
  <p>but I don't find the way to say "return the value of the method you called on line starting with "'success:' "...</p>