actionscript-3 - 增加反编译*.swf文件的新功能

标签 actionscript-3 flash air adobe decompiling

我使用 JPEXS Free Flash Decompiler 10.0.0 反编译了 *.swf 文件

要添加新功能,请将字符串保存到文本文件

代码:

package 
{
   ...
   import flash.filesystem.*;       //  my code

   public class NewSocket extends SecureSocket
   {

      ....

      public function send(param1:String) : void
      {
       //  my code
         var file : File = File.desktopDirector.resolvePath("your_file_name.txt");
         var fs : FileStream = new FileStream();
           fs.open(file, FileMode.WRITE);
           fs.writeUTFBytes(param1);
           fs.close();
       //  my code

         ...
      }     
      ...      
   }
}

我收到消息“不是字符串类型……”

这个字符串

var file : File = File.desktopDirector.resolvePath("y our_file_name.txt");

检查 Flash CS6

import flash.filesystem;

我没有这个库

adobe AIR 已安装

如何解决这个问题

谢谢!

最佳答案

Flash CS6 > 菜单"file">“发布设置”。

Flash CS6 Publish Settings

右上角有一个“目标”下拉列表。您应该选择一个带有 AIR int it 的选项,否则 AIR 类将不可用,并且 Flash 将不会编译使用 AIR 类的代码。

然后,您将导入类,而不是包:

// Import one class.
import flash.filesystem.File;

// Import all the package classes.
import flash.filesystem.*;

关于actionscript-3 - 增加反编译*.swf文件的新功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42179220/

相关文章:

ios - 从 AS3 保存到 XML(最终用于 iOS)

ios - Instagram 过滤 RGBA 值

apache-flex - Flex 移动应用程序中的 https 证书存在问题

apache-flex - SQLStatement.execute() - 一条语句中的多个查询

apache-flex - 使用 Adob​​e AIR 启动 EXE (Serproxy)

actionscript-3 - AS3 - 如何使用鼠标事件的像素/点检测而不是对象检测

actionscript-3 - Flash SecureSocket 和 RSA 私钥

actionscript-3 - 文本区域未正确更新,缺少字符

c++ - 我可以在浏览器呈现之前访问 Flash 数据吗?

flash - 究竟什么是Flash播放器?