SWF 无法使用 JPEXS 打开,因为它是压缩的!!.
当文件(例如:swf、jpeg、mp3、mp4)不在任何程序中打开,是检查是否format使用 a 字节是正确的十六进制编辑器 https://www.google.com/search?q=hex+editor.
检查您的文件字节:
通常 SWF 文件以字节开头43 57 53
(eg:"CWS"
) 甚至字节46 57 53
(eg: "FWS"
).
Solution:
解压缩 ZLib 的两个选项。一种是通过 AS3 代码,另一种是通过外部 (Windows) 工具。
Option 1)使用AS3解压。
试试这个代码逻辑:
import Zlib; //do import of API
....
public var zlibdecomp :Zlib; //create instance variable
....
public var fileBytes :ByteArray = new ByteArray;
public var swfBytes :ByteArray = new ByteArray;
//# SWF original file bytes load
fileBytes = ... ; //your loading code here
//# Decompress loaded into new SWF bytes
zlibdecomp = new Zlib; //create new ZLIB instance in variable
swfBytes = zlibdecomp.uncompress( fileBytes ); //update with decompress version
trace("swfBytes length (DEFLATED) : " + swfBytes.length); //is 8,617,377 bytes??
中的字节swfBytes
现在可以保存为文件new.swf
这将在 JPEXS 中正确打开。使用 fileReference API 将 AS3 字节保存到磁盘。
Option 2) 使用外部 ZLib 工具。
Using OffZip http://aluigi.altervista.org/mytoolz.htm#offzip (for WindowsOS)您可以解压SWF。
这是直接 OffZip 文件 http://aluigi.altervista.org/mytoolz/offzip.zip. Copy Offzip.exe
进入像这样的文件夹c:\offzip\
.
现在通过运行打开命令行cmd.exe
. Type cd\offzip\
(press enter
)。或者只需按住shift
并右键单击 Offzip 文件夹,然后选择“在此处打开命令窗口”.
Type offzip -a vpt.swf
(press enter
).
你应该看到这样的输出......
C:\offzip>offzip -a vpt.swf
Offzip 0.4
by Luigi Auriemma
e-mail: [email protected] /cdn-cgi/l/email-protection
web: aluigi.org
- open input file: vpt.swf
- zip data to check: 32 bytes
- zip windowBits: 15
- seek offset: 0x00000000 (0)
+------------+-----+----------------------------+----------------------+
| hex_offset | ... | zip -> unzip size / offset | spaces before | info |
+------------+-----+----------------------------+----------------------+
0x00000000 .
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.................................................................... 8496131 ->
8617377 / 0x0081a403 _ 0 8:7:26:0:1:2657f334
- 1 valid compressed streams found
- 0x0081a403 -> 0x00837da1 bytes covering the 100% of the file
现在输出文件00000000.cws
可以在JPEXS中打开。您可以将其重命名为00000000.swf
.