Noaml1 Posted May 21, 2014 Share Posted May 21, 2014 I'm trying to follow the starstruck tutorial in typescript, but for some reason when i add the line this.game.load.tilemap('level1', 'assets/level1.json', null, Phaser.Tilemap.TILED_JSON)my game wont run passed the preload method. The file path is definitely correct - and i know this because the other files in the same folder are loading fine (tested).Chrome is giving me the error:Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:16322/assets/level1.jsonUncaught SyntaxError: Unexpected token < localhost/:1 what could be causing this? 'assets/level1.json' is definitely it's location (look at screen shot below). Link to comment Share on other sites More sharing options...
clark Posted May 21, 2014 Share Posted May 21, 2014 Do you have mimetypes setup for JSON? In your web.config file just paste this: <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <system.webServer> <staticContent> <mimeMap fileExtension=".json" mimeType="application/json" /> </staticContent> </system.webServer></configuration>Let me know if that did nothing. Link to comment Share on other sites More sharing options...
Noaml1 Posted May 21, 2014 Author Share Posted May 21, 2014 that did it! thanks clark 1 Link to comment Share on other sites More sharing options...
auntsam Posted June 18, 2014 Share Posted June 18, 2014 Is the web.config file similar to httpd.conf? I can't find a web.config file anywhere in my system. Link to comment Share on other sites More sharing options...
nzhul Posted February 28, 2015 Share Posted February 28, 2015 I had the exact same issue!Thank you for the answer! Link to comment Share on other sites More sharing options...
Recommended Posts