function pro(){
            var src = this.src;
           
            //Remove events cause audio trigger this event more than once(depends on browser)
            if (this.removeEventListener) {  
                this.removeEventListener('canplaythrough', pro, false);     
            }
           
            ++j;
            //if progress callback, give information of assets loaded, total and percent
            if (onprogress) 
                onprogress({
                    loaded: j, 
                    total: total, 
                    percent: (j / total * 100),
                    src:src
                });
				
            if(j === total && oncomplete) oncomplete();
        }
@
#Crafty.loader
@category Assets
@sign public void Crafty.load(Array assets, Function onLoad[, Function onProgress, Function onError])
@param assets - Array of assets to load (accepts sounds and images)
@param onLoad - Callback when the assets are loaded
@param onProgress - Callback when an asset is loaded. Contains information about assets loaded
@param onError - Callback when an asset fails to load

Preloader for all assets. Takes an array of URLs and
adds them to the `Crafty.assets` object.

Files with suffixes in `image_whitelist` (case insensitive) will be loaded.

If `Crafty.support.audio` is `true`, files with the following suffixes `mp3`, `wav`, `ogg` and `mp4` (case insensitive) can be loaded.

The `onProgress` function will be passed on object with information about
the progress including how many assets loaded, total of all the assets to
load and a percentage of the progress.
~~~
{ loaded: j, total: total, percent: (j / total * 100) ,src:src})
~~~

`onError` will be passed with the asset that couldn't load.

When `onError` is not provided, the onLoad is loaded even some assets are not successfully loaded. Otherwise, onLoad will be called no matter whether there are errors or not. 

@example
~~~
Crafty.load(["images/sprite.png", "sounds/jump.mp3"],
    function() {
        //when loaded
        Crafty.scene("main"); //go to main scene
        Crafty.audio.play("jump.mp3"); //Play the audio file
    },

    function(e) {
      //progress
    },

    function(e) {
      //uh oh, error loading
    }
);
~~~

@see Crafty.assets
@see Crafty.image_whitelist