Hello All!

I've been using Intel's XDK with ImpactJS for quite some time now.
I'm implementing downloadable content for my App, so I have created a downloader that will retrieve the files from a server and store them in a _mediacache folder that Intel's framework provides.

I'm having two problems:

1. Images that I download in the _mediacache folder (mostly images and sounds) are found by impactJS but images are not drawn and sounds are not reproduced (remember that Intel's XDK uses directCanvas which is an accelerated version of the canvas). I have posted this in Intel's forum to find out if there is a workaround for this. I guess that I might stop using directCanvas but I fear a drop in performance.

2. Since I'm requiring the main game module in the downloader, the levels are being included, therefore trying to download assets that aren't still downloaded.
I was wondering if there is a way to require the main game module after the donwloader has finished downloading the files.

Here's the code for my downloader:

var finishedDownloading = false;

ig.module( 
	'game.downloader' 
)
.requires(
	'impact.game',
        // Requiring this, automatically goes and tries to load all
        // assets for the levels included.
	'game.maingame'
).defines(function(){

Downloader = ig.Game.extend({
	init: function() {
                // This starts the downloader code in the webview
		AppMobi.webview.execute("$('#downloader-ui').downloader();");
	},
	update: function() {
                // The finishedDownloading variable is set from the webview
                // once all files have been downloaded
		if(finishedDownloading) {
			AppMobi.webview.execute('initializeUI()');
			ig.system.setGame(MainGame);		
		}
	},
	draw: function() {
		this.parent();
		ig.system.clear( "#000000" );
	}
});

});

Thanks in advance for your help!!