khleug35 Posted November 21, 2018 Share Posted November 21, 2018 Is it possible to load image with out web server ?? function preload () { this.load.image('einstein', 'assets/ra-einstein.png'); } It can run in loacal sever, eg. localhost/GAME/myphaser3project/index.html It can load the image but if I double click the index.html, Is show this error Is it possible to load image with out web server?? Thanks you very much Link to comment Share on other sites More sharing options...
khleug35 Posted November 21, 2018 Author Share Posted November 21, 2018 Finally I use Bracket Editor Live Preview function to open the index.html It is no bug, but still can't show the image Link to comment Share on other sites More sharing options...
Milton Posted November 21, 2018 Share Posted November 21, 2018 You could try starting chrome with --allow-file-access-from-files but why not just use a server... Link to comment Share on other sites More sharing options...
khleug35 Posted November 21, 2018 Author Share Posted November 21, 2018 On 11/21/2018 at 5:12 PM, Milton said: You could try starting chrome with --allow-file-access-from-files but why not just use a server... thanks I use FireFox Link to comment Share on other sites More sharing options...
jest Posted November 21, 2018 Share Posted November 21, 2018 @khleug35there's a chrome web server plugin you can use : https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en khleug35 and samme 2 Link to comment Share on other sites More sharing options...
perseluspiton Posted November 21, 2018 Share Posted November 21, 2018 or use Mozilla Link to comment Share on other sites More sharing options...
khleug35 Posted November 22, 2018 Author Share Posted November 22, 2018 8 hours ago, jest said: @khleug35there's a chrome web server plugin you can use : https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en Oh!!! Thank you so much!! that is what I want Link to comment Share on other sites More sharing options...
twistedsage Posted November 26, 2018 Share Posted November 26, 2018 If you have nodejs installed anyway, you can use this script in your game root folder (where the HTML is) by typing node testserver.js testserver.js Link to comment Share on other sites More sharing options...
mattstyles Posted November 26, 2018 Share Posted November 26, 2018 if you have node you also have npm, use that to install a web server. There are approximately 4000 of them. https://www.npmjs.com/package/serve This one is the great. https://www.npmjs.com/package/hench obviously this one is the best that there ever was and ever will be. Link to comment Share on other sites More sharing options...
perseluspiton Posted March 12, 2020 Share Posted March 12, 2020 there is also a 'live server' option in Visual Studio Code, just right-click on your index.html in it Link to comment Share on other sites More sharing options...
Recommended Posts