Nikita99 Posted June 7, 2014 Share Posted June 7, 2014 I tried to run the Phaser example from the root of my Apache-Tomcat server and when the browser open there is nothing but just black screen and in the console it says : Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Received an invalid response. Origin 'null' is therefore not allowed access.What i am supposed to do to fix that...? Link to comment Share on other sites More sharing options...
Mike Posted June 7, 2014 Share Posted June 7, 2014 Тhe error is pretty self explaining. http://www.html5gamedevs.com/topic/6743-any-idea-why-i-am-getting-this-error/?hl=cross-origin http://www.html5gamedevs.com/topic/6459-newbie-struggling-with-cors-issues/?hl=cross-origin Short answer: You need a web server, and open the html from there. Link to comment Share on other sites More sharing options...
Nikita99 Posted June 7, 2014 Author Share Posted June 7, 2014 I already have a server and I open it from there....but it shows this Link to comment Share on other sites More sharing options...
lewster32 Posted June 7, 2014 Share Posted June 7, 2014 It looks like you're running the html file and it's thus opening locally rather than through the web server. You'll need to connect to your web server via its IP address or hostname (on your own machine that will likely be localhost or 127.0.0.1) Link to comment Share on other sites More sharing options...
Nikita99 Posted June 7, 2014 Author Share Posted June 7, 2014 Thank you guys, I realized I have no other option but to write it by hand in other casees it opens it locally everything is ok now xd Link to comment Share on other sites More sharing options...
Recommended Posts