新增反编译*.swf文件功能
Add new function in decompiling *.swf file
我使用 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
...
}
...
}
}
我收到消息 "Not a type string №.."
这个字符串
var file : File = File.desktopDirector.resolvePath("y
our_file_name.txt");
签入 Flash CS6
import flash.filesystem;
我没有这个图书馆
adobe AIR 已安装
我该如何解决这个问题
谢谢!
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 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
...
}
...
}
}
我收到消息 "Not a type string №.."
这个字符串
var file : File = File.desktopDirector.resolvePath("y our_file_name.txt");
签入 Flash CS6
import flash.filesystem;
我没有这个图书馆
adobe AIR 已安装
我该如何解决这个问题
谢谢!
Flash CS6 > 菜单文件 > 发布设置。
在右上角有一个目标下拉列表。您应该选择一个带有 AIR int 的选项,否则 AIR 类 将不可用并且 Flash 将不会编译使用 AIR 类.
的代码然后,您要导入 类,而不是包:
// Import one class.
import flash.filesystem.File;
或
// Import all the package classes.
import flash.filesystem.*;