/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public var file:FileReference = new FileReference(); public function doSave( event:Event ):void { // txtField is the instance name of a text field with contents to save. var data:ByteArray = new ByteArray(); data.writeMultiByte ( txtField.text, "utf-8" ); file.save( data, "myfile.txt" ); }
Comments
