ResourceAudio.js 440 B

12345678910111213141516171819
  1. (function()
  2. {
  3. var Class_ResourceAudio= FZ.newClass(
  4. {
  5. load : function(){
  6. var theAudio = new Audio();
  7. theAudio.src = this.URL;
  8. theAudio.load();
  9. theAudio.play();
  10. theAudio.pause();
  11. this.callback();
  12. this.target.Resource = theAudio;
  13. }
  14. }, FZ.Class_Resource);
  15. FZ.ResourceManager.registerResourceType("Audio", Class_ResourceAudio);
  16. })();