Search the Community
Showing results for tags 'bkicked from loading'.
-
Hello & Thanks , windows 10 , x64 I am learning pixi.js starting here: goose.ninja/2015/08/29/pixi-js-tutorial-getting-started/ But i am having some probs , see below code . Here is the code: <!doctype html><html><head> <meta charset="utf-8"> <title>Pixi.js goose.png</title> <style> body { margin: 0; padding: 0; background-color: #000; } </style></head><body> <script src="C:\pixi.js\bin\pixi.min.js"></script> <script>//////////////// var renderer = PIXI.autoDetectRenderer(160, 144);// Set the background color of the renderer to a baby-blue'ish colorrenderer.backgroundColor = 0x3498db;// Append the renderer to the body of the pagedocument.body.appendChild(renderer.view);// Create the main stage for your display objectsvar stage = new PIXI.Container();//////////////// // Add our image as a spritevar goose = new PIXI.Sprite.fromImage("file:///C:/pixi.js/learningPixi-master/examples/images/goose.png");// Set the anchor in the center of our sprite goose.anchor.x = 0.5;goose.anchor.y = 0.5;// Position our goose in the center of the renderergoose.position.x = renderer.width / 2;goose.position.y = renderer.height / 2;// Add the goose to the stagestage.addChild(goose);////////////////// Start animatinganimate();function animate() { requestAnimationFrame(animate);//////////////// // Rotate our goose clockwise goose.rotation += 0.1; // Rotate our goose counter-clockwise // goose.rotation -= 0.1;//////////////// // Render our container renderer.render(stage);} //////////////// </script></body></html>This code works fine in ie 11 , ( goose rotates as scripted )but in Chrome Version 47.0.2526.106 m no goose shows up . But i do get this error msg from console : " Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Invalid response. Origin 'null' is therefore not allowed access. " Can anyone tell me how to fix this ? Thanks...Vern
- 32 replies