언어 설정

Menu
Sites
Language
Loading data other than images

Hello,

I'm doing a Samsung Gear 2 app in Phaser.js framework. I'm able to load images just fine but when trying to load text data(like json) it says it's unable to load resource. The loading is done using XmlHttpRequest. I tried to alter config.xml file with various settings with no luck.  Is there a way to load local resources using XmlHttpRequest?

Thanks,

Lubos

Responses

2 댓글
Marco Buettner

You can include jQuery and use $.getJSON() it works for me in my app to load json files.

AVSukhov

Hello,

Try to use 

$.ajax({
                url: dataURL,
                dataType: 'json',
                success: function(data) {
                },
                error: function(jqXHR, textStatus, errorThrown) {
                }
            });