Page 1 of 1
IgeTiledComponent exemple
Posted: Mon Sep 30, 2013 7:17 am
by Solib
Rob it would be cool to see an example of using loadJson
http://www.isogenicengine.com/engine/do ... onent.html
especially cool if the example will use the format that exports
http://www.mapeditor.org/
Re: IgeTiledComponent exemple
Posted: Mon Sep 30, 2013 7:25 am
by Solib
i'm sorry. can close this post
i see exemple 13.6
Re: IgeTiledComponent exemple
Posted: Mon Sep 30, 2013 7:47 am
by Solib
hm
if i use
Code: Select all
.tiled.loadJson(tiledExample1 /* you can also use a url: */, function (layerArray, layersById) {
});
all good
if i use
Code: Select all
.tiled.loadJson('maps/example.js', function (layerArray, layersById) {
});
in console error
Code: Select all
Uncaught ReferenceError: tiled is not defined IgeTiledComponent.js:35
scriptElem.onload
Re: IgeTiledComponent exemple
Posted: Mon Sep 30, 2013 1:52 pm
by robaldred
There's an assumption in the IgeTiledComponent that isn't clear
If you pass a url, it assumes the variable assigned to the object in example.js is "tiled"
basically change "var tiledExample1" to "var tiled" when loading via url or load it like the examples do via the ClientConfig.js