PDA

View Full Version : post to a text file


glennn
07-20-2002, 07:32 PM
what is the simplest way to post a variable to a text file?
thanks
glennn

CyanBlue
07-20-2002, 10:58 PM
Sorry... stupid question...

Is the sentence below the same thing as your question if I rephrase???

What is the simplest way to write a variable to a text file???

I am not good at that post/get thing... So... I'm asking again... :)

xxlm
07-21-2002, 04:34 PM
php script... (or other script).
But i think that flash have a function/object to write to a text file...
I THINK !

:)

I look if it really exist !

xxlm
07-21-2002, 04:42 PM
server side, use php:
http://www.actionscript.org/tutorials/intermediate/dynamic_counter_php3/index3.shtml

client side use MMSave(target,filename); :
http://www.actionscript.org/tutorials/intermediate/save_a_local_copy_of_file/index.shtml

:)

simail
07-21-2002, 04:48 PM
use loadVariables on a button instance.
loadVariables("myTextFileWithPath.txt",this,"Post");

regards
simail

xxlm
07-21-2002, 04:58 PM
Are you sure simail? This is not to load var from a CGI script or text file...

What glennn want is to write on a text file isn't it? And you're way don't (I think)...
:(

simail
07-21-2002, 05:00 PM
sorry thought i better be a bit more specific. the variable will be loaded into an input box first and then posted, is that what you want?

regards
simail

xxlm
07-21-2002, 05:18 PM
Don't see what you want to do with... If you want to use loadVariables or loadVariablesNum U have to link a CGI script in which you have the script to write in the txt file... And if you want to send flash var to this script - so it can write this var in the text file - you don't need to put them into a input/dynamic textbox. Your var have to be on the same path as your loadVariables targeted mc... That's all

But I really don't see how you want it working without CGI script with the loadVariables method...:confused:

simail
07-21-2002, 06:05 PM
of cours!:o
don't know what made me think flash could post to a text file directly. apologies suitable emabarassment.
regards
simail

xxlm
07-21-2002, 06:11 PM
Doesn't matter !
;)

sumul
07-21-2002, 07:50 PM
So the final answer, as xxlm pointed out, is that you need a server-side scripting language (PHP, CGI, ASP) if this is going to be something on the 'net. If this is going to be something run on a local machine, then you can use the MMSave thing.