dimanche 1 juin 2014

Cross Origin Request Only Supported With HTTP with PreloadJS (CreateJS)


Vote count:

0




I am making a game on createJS and I while adding the LoadQueue to load images, I get this error:



XMLHttpRequest cannot load file:///home/me/programming/assets/background.png. Cross origin requests are only supported for HTTP. createjs-2013.12.12.min.js:15


I already searched this problem, and I now know this happens because it's supposed to be on a server to work. However, right now I'm just in testing so I want to be able to test this even when offline (and I don't have a server).


I've looked at the proposed solutions to this. I've tried running Google Chrome with



--allow-file-access-from-files


and



--disable-web-security


but neither work.


Is there a way to run PreloadJS without actually putting the images on a server? If not, I would think that this would make the CreateJS Suite and even HTML5 as a whole an unattractive tool for making games compared to something that would allow loading of local files.



asked 24 secs ago






Aucun commentaire:

Enregistrer un commentaire