How do I can read a external JSON or XML file?

Get help using Construct 2

Post » Thu Feb 19, 2015 1:02 pm

I'm here for learn but the tutorials can't help me.

How can i learn it if the guide is incomplete?

And you talk and write but do nothing for help me.
B
5
Posts: 14
Reputation: 253

Post » Thu Feb 19, 2015 2:38 pm

you only help those whom help them self. there are example on forum to read and learn. Ask Ashley, Moderator kyatric
B
226
S
31
G
14
Posts: 1,899
Reputation: 38,302

Post » Thu Feb 19, 2015 2:56 pm

@danju92: you can't expect that somebody will code it for you. You have to read the forum, download and try the samples and ask specific questions. (Like what is not working or there is an error) Also a sample what you have would be nice, so it's easier to find the mistake. In this forum you get tips and hints what you have to do, but programming you have to do it yourself. Beside that if you are more polite, maybe you will get more help.

What you are looking is not help, but rather a programmer. I recommend you should check this: job-offers-and-team-requests_f160
Last edited by edwardr on Fri Feb 20, 2015 9:52 am, edited 1 time in total.
B
15
S
4
Posts: 77
Reputation: 1,030

Post » Thu Feb 19, 2015 3:13 pm

edwardr thanks for making it clear
B
226
S
31
G
14
Posts: 1,899
Reputation: 38,302

Post » Fri Feb 20, 2015 3:57 am

I think what he is having trouble with, is getting the game to read a json or xml file from an external server(url). An issue I was having as well at one point. By default, browsers are set to block those request, so you have to give that permission manually.


I think this is what your after? Copied from tutorial.

Making AJAX requests cross-domain or in preview
By default, browsers block AJAX requests across domains. This means, for example, a game on scirra.com can request other pages on scirra.com, but cannot request pages on facebook.com. This is an important security feature of web browsers (it is not specific to Construct 2 or its AJAX object).

Also, when previewing in Construct 2 the game runs on localhost. This counts as a different domain to the rest of the internet, so typically AJAX requests to any web page will fail during preview, unless the server explicitly allows cross-domain requests.

*** (this part is the trouble. Lack of explanation here down)****

If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header:

Access-Control-Allow-Origin: *

This will enable AJAX requests from any domain, but you should still be aware of the possible security implications of this. For more information on cross-domain requests see HTTP access control on MDN.
B
9
S
2
Posts: 80
Reputation: 854

Post » Fri Feb 20, 2015 4:02 am

Lordshiva1948 wrote:Your choice not mine. If one wants to learn he or she would do anything. In your case sorry no comment


Maybe they want to learn, just not able to explain themselves in a way we can understand...

(I used to work with the special ed students in highschool. I know plently about lack of ways to express oneself.
not saying he is special ed, but English may not be his native language. As well, there are certain terms used in game development and even in Construct 2, that may not be easy to express or readily understandable. )

Flat out telling a person that you give up on them, and or they don't want to learn, when they are showing a simple lack of understanding/expression of words is degrading and rude. And really hurts one's spirit.
B
9
S
2
Posts: 80
Reputation: 854

Post » Fri Feb 20, 2015 4:04 am

danju92 wrote:Yes i've read but it's usless.

I don't want download file from the website.



He means he doesn't want to download the json file from that website. He wants to be able to read the link to it from inside C2 using Ajax.
B
9
S
2
Posts: 80
Reputation: 854

Post » Fri Feb 20, 2015 4:05 am

Jermfire wrote:
Lordshiva1948 wrote:Your choice not mine. If one wants to learn he or she would do anything. In your case sorry no comment


Maybe they want to learn, just not able to explain themselves in a way we can understand...

(I used to work with the special ed students in highschool. I know plently about lack of ways to express oneself.
not saying he is special ed, but English may not be his native language. As well, there are certain terms used in game development and even in Construct 2, that may not be easy to express or readily understandable. )

Flat out telling a person that you give up on them, and or they don't want to learn, when they are showing a simple lack of understanding/expression of words is degrading and rude. And really hurts one's spirit.


+1
Image
B
14
S
3
G
1
Posts: 61
Reputation: 993

Post » Fri Feb 20, 2015 8:41 am

Jermfire yes I do understand. If you read my bio you will know I was teacher since 1986. I was teaching IT for UK-ONLINE Government run program. I have come across these type of people many times. They want something for nothing. Jermfire there for please do not lecture me. I have seen more christmas then you had hot dinners Jermfire. Thanks for advise and Jermfire if you feel like you can help these type of people in future do so. You seems to me more understanding than this oldman. Bless you Jermfire
B
226
S
31
G
14
Posts: 1,899
Reputation: 38,302

Post » Fri Feb 20, 2015 8:54 am

blackcrypt thanks for your advise you and Jermfire can open school for these type of people or make yourself website where they can come and ask for your advise then come on C2 forum. That way you would not need to give this advise to oldman like this. Whom has seen more troubled in life then you lot done in your life.Bless you blackcrypt
B
226
S
31
G
14
Posts: 1,899
Reputation: 38,302

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Cryttexx, KNTMartin, ridhoemgl, Unconnected and 5 guests