ippa / jaws

Jaws - HTML5 canvas javascript 2D Game Framework
https://jawsjs.ippa.se
GNU Lesser General Public License v3.0
363 stars 75 forks source link

Cannot load .bmp on chrome? #50

Closed cobagithub closed 12 years ago

cobagithub commented 12 years ago

Hi, I noticed that in example 8 you used an image called block.bmp.

The example is working if I opened it at your page but when I downloaded the files and opened locally, It always stuck at 50%. It works fine on firefox but stuck at chrome.

Also if I uncomment either one or both of these lines, the robot won't move // uncomment to show bounding box rects // blocks.forEach( function(item, total) { item.rect.draw() }) // player.rect.draw()

setupInput() assets.loadAll()

50%: droid_11x15.png

(dunno why the text suddenly become larger)

ippa commented 12 years ago

What Chrome-version do you use? I use Chrome as my defaultbrowser and I haven't seen this error. Also, could you run the javascript console while testing the example (CTRL+SHIFT+J). There might be some output there that will explain why this happens to you.

cobagithub commented 12 years ago

I found out that chrome does not allow the file open when opening the page directly (file:// protocol). It's fixed by setting localhost server to open the file (example: XAMPP).

Sorry for the false report..