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
26
S
6
G
4
Posts: 456
Reputation: 5,853

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
18
S
6
Posts: 348
Reputation: 2,633

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
26
S
6
G
4
Posts: 456
Reputation: 5,853

Post » Mon Dec 30, 2013 7:52 pm

AjaxLayouts.capx

Should work. Here's a sample.
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

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
26
S
6
G
4
Posts: 456
Reputation: 5,853


Return to How do I....?

Who is online

Users browsing this forum: BiffanyPFH, dop2000 and 28 guests