Quote:
Originally Posted by judthryn
The code bellow saves the text in tMessage to the users computer. The code opens a dialog box that lets the user save the file to the local file system.
var tFR:FileReference = new FileReference();
var tMessage:String = 'Hello World';
tFR.save(tMessage, '.txt');
That is actually all the code you need. But lets explain what you can do with it. The class FileReference has a method called save with the following defenition.
public function save(data:*, defaultFileName:String = null):void
|
It worked for me but it saves it as a file.
Questions:
Is there a way i can have is save with a .uc extension?
Is there a way i can have it save over a previous version without asking the user for the file name and the "Do you want to replace question"?