actionscript-3 - 使用 FileReference 在 ActionScript 3.0 中保存文件

标签 actionscript-3 filereference

你好,我有一个 ActionScript 3.0 游戏

我一直在浏览互联网,我发现了这样的东西

var file:FileReference = new FileReference();
file.addEventListener(Event.SELECT, _onRefSelect);
file.addEventListener(Event.CANCEL, _onRefCancel);

var ba:ByteArray = new ByteArray();
ba.writeUTFBytes(xmlUsers);

//save into drive
file.save( ba, "myXML.xml" ); 

但我收到此错误:

Call to a possibly undefined method save through a reference with static type flash.net:FileReference.

最佳答案

将编译器设置更改为版本 10

默认为 9

关于actionscript-3 - 使用 FileReference 在 ActionScript 3.0 中保存文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8875432/

相关文章:

python - 如何找到哪个文件是 "initiator"Python

javascript - 为什么加载js一次就不行了,而css却可以呢?

javascript - 从 ObjectiveC 到 ECMAscript

javascript - 如何让javascript与flash通信(对象#<HTMLObjectElement>没有方法

apache-flex - 弹性 : DeepCopy of FileReference

actionscript-3 - Flash AS3 FileReference-一次选择并上传多个文件

apache-flex - Flex FileReference.browse() 打开一个保存对话框——不是一个打开的对话框

javascript - 从 Javascript 调用 ActionScript 函数

flash - Vector map() 在 ActionScript 3 中如何工作?

ios - 构建移动应用程序时,如果 iPhone/iPad 上的屏幕锁定,Flash Builder 调试器会终止