Am using Easeljs library. Everthing works fine in firefox and ie9 except in google chrome mouse events wont work and I got this error "Uncaught An error has occured. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."
Asked
Active
Viewed 7,156 times
3 Answers
6
Serve your page from a web server. Do not open the file from disk in chrome.

Peter DeWeese
- 18,141
- 8
- 79
- 101

akonsu
- 28,824
- 33
- 119
- 194
-
oh thank god and i thought i'd have to scrap chrome altogether from the supported client list. – ericosg May 03 '13 at 00:23
-
**`°_°`** I am using my optimization routine: you are on `www.abc.com` and all my static files are on `s1.abc.com`, `s2.abc.com` and `s3.abc.com`. So this would imply that this limitation could apply too whereas it's the *same* root DNS? Watch here, I'm currently trying to use EaselJS: http://www.battlesoop.fr/battleship/ try to click on one of the buttons, you'll get the error. How to deal with it? – Olivier Pons Jul 30 '14 at 17:17
-
And I'm wondering how will the "big ones" do with their static files based on other domain names (Yahoo, Amazon and Google, not to name them) => http://enable-cors.org/ – Olivier Pons Jul 30 '14 at 17:20
-
1I've enabled `Access-Control-Allow-Origin:*` but this still doesn't work. – Olivier Pons Jul 30 '14 at 17:28
0
Another possibly working answer is:
var queue = new createjs.LoadQueue(true, null, true);
Since v.0.4.1, here's what they say:
The crossOrigin flag is already included in the LoadQueue() constructor of v.0.4.1.

Olivier Pons
- 15,363
- 26
- 117
- 213
0
Just run you Chrome with --reduce-security-for-testing command-line argument. So you can develop your project locally without using web server.

Yaroslav Sivakov
- 470
- 3
- 14