Need help with flash and .txt files

http://www.kirupa.com/developer/mx/multiple_dynamictext.htm
http://www.kirupa.com/developer/mx/externaldata.htm

there are 2 examples for loading external text…

as for your other question, yes you can save to an external text file using Flash and PHP…i added an example, and here is a brief explaination…

First, upload these files to the same directory on your server…
secret.swf, secret.html, write.php, and textdata.txt .

How it works:

The Name, and Message Input text boxes have Variable names of
name, and message respectively…

the actions on the submit button are:
[AS]
on (release) {
loadVariablesNum(“write.php”, 0, “POST”);
gotoAndStop(2);
}
[/AS]

So, when you press the button, it communicates with the write.php file on your sever which is set up like this…


<html>
<body>

<? 

// Let's declare the 2 variables: 

$name = $_POST['name']; 
$message= $_POST['message']; 

// Let's open the file we want to put the data in: 

if($REQUEST_METHOD == 'POST'){ 
$file = "textdata.txt"; 
$fp = fopen($file, "a+"); 

// Write to the file: 

fwrite($fp, $_POST['name'] . ":" . $_POST['message'] . "
");fclose($fp); 
} 
?> 


</body>
</html>

The php file, saves the name/message to the external text document textdata.txt…ofcoarse you can customize it to your needs…this just an example of how it can be done…