How do load from a textfile into a textbox

Just started using Construct 2? Post your questions here

Post » Thu Nov 06, 2014 11:46 am

I have a single text box and various images in my layout.

Depending on what image is clicked I'd like the text box to load a different external text file. I have everything set up but can't seem to find a way to load different text files into the sane text box (one at a time obviously :D )

Can anyone point me in the right direction please? Any help would be appreciated. :)
Posts: 383
Reputation: 11,276

Post » Fri Nov 07, 2014 2:16 pm

You could use Ajax with project files...

Import the external text files to the Files folder.
Add the Ajax object to your layout.
When the image is clicked, call the Ajax action - 'Request Project File' and choose the appropriate text file.
Then use the Ajax event, 'On Completed' to set the text box to AJAX.LastData.

forum answer - ajax and text box.png
You do not have the required permissions to view the files attached to this post.
Posts: 16
Reputation: 711

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests