Uncaught SecurityError

Recommended Posts


I have an issue with loading a image in phaser. I keep getting the same error, it says "Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///Users/CindySchroer/Downloads/Plaatjes/Phaser/assets/images/background.png may not be loaded". I don't understand why it isn't loading (see attatched). Can anyone explain what is happening here? A little step-by-step would help because I'm a beginner. 

Thanks! :)

Schermafbeelding 2016-09-18 om 12.15.43.png

Share this post

Link to post
Share on other sites

The error is because you're tried to drag the html file into your browser (or open it locally into your browser). You can't do this, because of security restrictions, i.e. it can't load the images from your local drive. Have a look at the Phaser Getting Started tutorial, because it covers this step in detail.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.