# How to create txt file in flash using asp

**URL:** https://forum.kirupa.com/t/how-to-create-txt-file-in-flash-using-asp/118158
**Category:** Uncategorized
**Created:** [August 3, 2004, 7:41am UTC](https://forum.kirupa.com/t/how-to-create-txt-file-in-flash-using-asp/118158 "2004-08-03T07:41:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![new\_bird](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@new\_bird](https://forum.kirupa.com/u/new_bird)
#### Post date: [August 3, 2004, 7:41am UTC](https://forum.kirupa.com/t/how-to-create-txt-file-in-flash-using-asp/118158/1 "2004-08-03T07:41:28Z")

</div>

i reading from the tutrioal “saving from data”  
[http://www.flash-db.com/Tutorials/saving/savingData.php](http://www.flash-db.com/Tutorials/saving/savingData.php)?  
but some i dun understand  
i follow up the thing but it didnt create the txt file

action scpipt

* * *

submit.onPress = function(){  
if(Title.text!="" && Comments.text !="" && Image.text!=""){  
myData.Title = Title.text  
myData.Comments = Comments.text  
myData.Image = Image.text  
myData.sendAndLoad(“save.asp”, myData, “POST”) //asp  
}  
}  
myData = new LoadVars()  
myData.onLoad = function(){  
if(this.writing==Ok) {  
gotoAndStop(2)  
status.text = “Submited data was saved”  
}  
else status.text = “Error in saving submitted data”  
}  
stop()

* * *

\<%  
'Dim variables  
Dim objFSO  
Dim objTextStream  
Dim PathFile  
'Look for the path to current directory, change to match your directory based on root  
PathFile = Server.MapPath("/Flash/anastasio.txt")  
'Create the filesystem Object  
set objFSO = createobject(“Scripting.FileSystemObject”)  
'Open the file: if doesn’t exists, create it  
Set objTextStream = objFSO.OpenTextFile(PathFile, 2, True)  
'Write to the data file  
objTextStream.Write “Title=” & Request(“Title”) & “&Comments=” & Request(“Comments”) & “&Image=” & Request(“Image”)  
'Say OK to Flash  
Response.Write “writing=Ok”  
'Clean objects  
objTextStream.Close  
Set objTextStream = Nothing  
Set objFSO = Nothing  
%\>
