Read From A Tex File

Get help using Construct 2

Post » Thu Apr 12, 2012 10:26 pm

Hi i want to read from a note.txt file, i don't understand how to even start doing that
B
4
Posts: 10
Reputation: 600

Post » Fri Apr 13, 2012 8:22 am

Two possible ways
-) ajax - read it with php
-) custom plugins: file reader, csv, Json, call js
Depends on where is the file, on the server or at the user..
Joe72012-04-13 08:27:20
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Sat Apr 14, 2012 9:48 am

Currently the file is local but eventually i want the file to be server based. How do i got about with ajax?

but also could you point me to one of these plugins too?FookinNora2012-04-14 09:50:35
B
4
Posts: 10
Reputation: 600

Post » Sat Apr 14, 2012 11:29 am

What do you want to do with that file? Only reading its content or modify it?
If you want to read its content then the easiest way is using a custom plugin like load Json or csv.. in the plugin thread are examples how to do that..
Joe72012-04-14 11:32:48
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Sat Apr 14, 2012 9:24 pm

you don't need php to read a textfile with ajax.
B
10
S
5
G
1
Posts: 37
Reputation: 1,631

Post » Sun Apr 15, 2012 2:00 am

yeah thank you very much i will look at the plugins, and if you do know of a tutorial using ajax, i know i don't need it for what i want to do now but I do have some ideas that would be possible with the php work

and thanks for the help big love
B
4
Posts: 10
Reputation: 600

Post » Mon Apr 16, 2012 3:14 pm

Hi me again :),
               So i've been playing with AJAX, can it not return a value in preview mode? i'm accessing a .php file on a free hosting website "http://www.dailycrossword.site40.net/Sun.php" and when i use set text to ajax.lastdata it returns nothing is that because i'm trying it in preview mode?
B
4
Posts: 10
Reputation: 600

Post » Mon Apr 16, 2012 3:23 pm

Sorry think i answered my own question i hosted the game on and it returned a string but only the 'Title' the first word in the string is this because i've not formated the .php file incorrectly? When i added more to the first line it returned that so how do i read the next line?FookinNora2012-04-16 15:32:06
B
4
Posts: 10
Reputation: 600


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 25 guests