sanjeev
sanjeev

Reputation: 23

Writing data into a text file in Adobe Flex

I am new to Adobe Flex. I want to write some data stored in a string variable into a text(txt) file. Can some one add sample code here would be helpful for me. Thanks.

Upvotes: 2

Views: 6183

Answers (4)

JeffryHouser
JeffryHouser

Reputation: 39408

If you're creating web based apps, the file will have to be created on the server, and you should look for information in that using the technology of your choice. ColdFusion uses the cffile tag, as one example.

FileReference.save will give your user the ability to save a file, but you have limited control in naming or location.

If you're using AIR, you can save information to the local drive using the File class.

Upvotes: 1

splash
splash

Reputation: 13327

Since Flash Player 10 you can use the FileReference.save() method.

Upvotes: 1

Robert Bak
Robert Bak

Reputation: 4236

You can write to files if you're targetting Flash 10. Read this article to find out how to do it: http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-in-flash-player-10/

Upvotes: 2

Robusto
Robusto

Reputation: 31883

You cannot write to files in Flash, but you can if it's an AIR app. Review the File class in Adobe livedocs.

Upvotes: 1

Related Questions