The function "me.loader.load" work not correct. If melonJS load the tmx file, it create no entry in the variable "levels" (me.levelDirector). So loading the level with "me.levelDirector.loadLevel("desert");" is not possibl (uncaught exception: melonJS: level desert not found).
On preload it works, than preload call the function "checkLoadStatus" which called the function "me.levelDirector.addTMXLevel" to add the tmx file to "levels".
The function "me.loader.load" work not correct. If melonJS load the tmx file, it create no entry in the variable "levels" (me.levelDirector). So loading the level with "me.levelDirector.loadLevel("desert");" is not possibl (uncaught exception: melonJS: level desert not found).
On preload it works, than preload call the function "checkLoadStatus" which called the function "me.levelDirector.addTMXLevel" to add the tmx file to "levels".