Mojo2 html5 not working outside of monkey

Monkey Forums/Monkey Beginners/Mojo2 html5 not working outside of monkey

Pakz(Posted 2016) [#1]
I get this when I run anything of mojo2 in html5. When compiling from monkey ityself it works in the browser. I tried opening the monkeygame with 3 different browsers and get the same error. I tried it also with hello world example from the mojo 2 banana's.

Is this a bug or am I missing something?

Monkey Runtime Error : NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///C:/MonkeyXPro86e/modules/mojo2/bananas/helloworld/helloworld.buildv86e/html5/data/mojo2_program.glsl'.
C:/MonkeyXPro86e/modules/mojo/app.monkey<220>
C:/MonkeyXPro86e/modules/mojo2/graphics.monkey<158>
C:/MonkeyXPro86e/modules/mojo2/graphics.monkey<1362>
C:/MonkeyXPro86e/modules/mojo2/graphics.monkey<2103>
C:/MonkeyXPro86e/modules/mojo2/bananas/helloworld/helloworld.monkey<12>
C:/MonkeyXPro86e/modules/mojo/app.monkey<89>



k.o.g.(Posted 2016) [#2]
XMLHttpRequest can not load data from file:// protocol, you must load it over an Server, use the built in Monkey Webserver, btw. start it over Ted


Pakz(Posted 2016) [#3]
Ok.

I uploaded it to my webspace and it runs from there.


Shinkiro1(Posted 2016) [#4]
Yes, you need a server as JS is not allowerd to access your file system.