【问题标题】:Add new function in decompiling *.swf file在反编译 *.swf 文件中添加新功能
【发布时间】:2017-06-29 23:20:30
【问题描述】:

我使用 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.desktopDirector.resolvePath("y our_file_name.txt");

签入 Flash CS6

导入 flash.filesystem;

我没有这个库

adobe AIR 已安装

我该如何解决这个问题

谢谢!

【问题讨论】:

    标签: actionscript-3 flash air adobe decompiling


    【解决方案1】:

    Flash CS6 > 菜单文件 > 发布设置。

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

    然后,你要导入类,而不是包:

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

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

    【讨论】:

    • 要在 JPEXS Free Flash Decompiler 中使用 flash.Filesystem.FileStrem,您必须使用大写字母。谢谢!
    猜你喜欢
    • 2011-03-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-11
    • 2011-01-16
    • 1970-01-01
    • 1970-01-01
    • 2010-09-10
    相关资源
    最近更新 更多