ActionScript 3 Adobe AIR - 将文本保存到本地文本文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 Adobe AIR - 将文本保存到本地文本文件相关的知识,希望对你有一定的参考价值。

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" );
}

以上是关于ActionScript 3 Adobe AIR - 将文本保存到本地文本文件的主要内容,如果未能解决你的问题,请参考以下文章