Tizen and AJAX

Discussion and feedback on Construct 2

Post » Thu Oct 10, 2013 7:13 am

@szymek

JSON validation is already enabled in my project. Thanks for the reply though.
B
26
S
5
G
5
Posts: 151
Reputation: 6,279

Post » Thu Oct 31, 2013 8:48 am

Hi @simwhi, @thehen

Just to say that I faced the same problem. Apparently, it is not possible to load a XML/JSON object from an AJAX's "Request project file" function on a Tizen project.

The only work around we have is to directly paste the XML/JSON text into the XML/JSON object. Does that mean that Tizen apps cannot access project files?
anthonykojima2013-10-31 08:49:37
B
43
S
10
G
7
Posts: 183
Reputation: 10,063

Post » Thu Oct 31, 2013 10:50 am

@anthonykojima

We had to do the same in order to get it working. I could not find an alternative solutions.
B
26
S
5
G
5
Posts: 151
Reputation: 6,279

Post » Sun Nov 03, 2013 5:38 pm

@simwhi,

Ok. I've been digging this up and I think I found where the issue was. The Tizen Web simulator works with the "file://" protocol. This means that we are accessing the index.html file of the game locally.

Unfortunately, AJAX Requests DON'T work with the "file://" protocol. That is how it is designed. So even if we try to load a local file through AJAX, the browser will automatically block the access.

There is a work around for each browser. Tizen is using Google Chrome and Chrome has this options to enable access to local files: "--allow-file-access-from-files". Another bad news, this options seems not working for some versions of Chrome.

For me there is one bad conclusion for this...(I include Ashley on this one)

@Ashley: Apparently it is not possible to use the AJAX Request project file action on TIZEN WEB PROJECT because the TIZEN web simulator uses the file:// protocol. Which means no AJAX possible even with the isLocal flag to AJAX.



B
43
S
10
G
7
Posts: 183
Reputation: 10,063

Post » Tue Nov 12, 2013 7:56 pm

@simwhi
@anthonykojima

I was having the same problem loading from local JSON files using AJAX in my Tizen app. I was about to implement a work-around, but went ahead and tested it in beta r150. It seems to be working now.

I retrieved local data from a JSON file using AJAX and put the data into an array. I then set an object to a position using data from the array, and it worked.

I tested this in both the Tizen web simulator and the emulator.

I don't know if this is any help to you now, but I thought you might want to know.
B
9
S
2
G
5
Posts: 4
Reputation: 3,009

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests