Ajax file request.

Get help using Construct 2

Post » Mon Dec 30, 2013 2:02 am

I'm trying to load in a text file using ajax. The file is in my files and was working fine when I was loading it from another layout. I needed to move the loading procedure to a new layout and now I can't get even the most basic of Ajax commands to work.

All I have now is :

On start of layout : Ajax Request Games.txt (tag "games")

Ajax (On 'games' completed) : Do something.

This isn't working at all. The event never triggers.

As I said, this worked fine in a different layout but now this most basic set of commands isn't triggering. Is there something I'm missing? The Ajax object is still in my project as is the file.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Mon Dec 30, 2013 2:51 am

Did you include the same event sheet that has the AJAX request inside it for the new layout?
B
17
S
6
Posts: 348
Reputation: 2,608

Post » Mon Dec 30, 2013 3:42 am

Yes, it's on the correct event sheet. It's a new layout, so new event sheet and I just transferred the commands over to the new event sheet.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Mon Dec 30, 2013 7:52 pm

AjaxLayouts.capx

Should work. Here's a sample.
ImageImageImage
B
71
S
21
G
220
Posts: 3,648
Reputation: 123,725

Post » Mon Dec 30, 2013 11:02 pm

Thanks, dunno what I was doing wrong but it fixed now. Think I'd spent so much time fixing it that I'd just broke it further, so I just rewrote that part from scratch and now it works fine.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633


Return to How do I....?

Who is online

Users browsing this forum: ultrafop and 9 guests