Can we create a txt file from the data inputs in flash.
I am using some variables in swf called form an external txt file. Can we by any chance call the variable values…update the vlaues… in flash and save them in that particular txt file (overwritte the exisiting one)
Well the url quoted wouldn’t help discoverme, Jubba.
It would look different this way actually, it’s like updating the textfile content instead of adding.
Here is a php script that would help you, if you can’t arrange the flash part, let me know.
<?
$datafile = "textfile.txt";
$data = "&variable1=" . $_POST['variable1'];//variable1 is from flash
$data .= "&variable2=" . $_POST['variable2'];//variable2 is from flash
$file = @fopen($datafile, 'w');
if (!$file) {
print "&result=error";
exit;
}
fwrite($file, $data);
fclose($file);
print "&result=success";
?>
The idea of this code is neither adding nor updating, it is simply rewriting the textfile with the specified values given from flash! Well I think it does what you need, discoverme.
I didn’t really read the post lol. I just saw Flash and writing to a text file so I posted all the files that I knew were on the forum that had to do with Text files and PHP.