load image from data folder?

Monkey Targets Forums/HTML5/load image from data folder?

Yoda(Posted 2013) [#1]
I'm trying to load an image from the data-folder, but it only works if the images is already present when i compile the code.

What I want is to be able to add images into the data-folder after it's uploaded to the server and by typing the image-name, let the app load the image during runtime (without having to re-compile and upload the app again).

Any ideas?


AdamRedwoods(Posted 2013) [#2]
when monkey compiles, it adds meta-data from the images used into HTML5, and i think Flash as well. It's currently not possible to do loading other than this that i know of (unless you make your own loader, as i did).

Mark may explain why better than I can, but i think it has to do with getting the width and height of the image due to async targets.