7/12/2006

SWF Header Format


Offset Value Meaning
---------------------------- --------------------- ----------------------------
0x00 0x46 = 'F' Uncompressed
0x43 = 'C' Compressed using ZLIB
(SWF 6 or later)

0x01 0x57 = 'W' Always 'W'

0x02 0x53 = 'S' Always 'S'

0x03 0x06 Version Number (SWF 6)
0x07 Version Number (SWF 7)

0x04 - 0x07 FileLength FWS -> Entire file size in bytes.
CWS -> Indicate the decompressed file size
in bytes.


0x08 (bit[7:3]) nBits nBits need by the following four field

depend on nBits Xmin(Signed Integer) Xmin of Frame Size (Always 0)

depend on nBits Xmax(Signed Integer) Xmax of Frame Size

depend on nBits Ymin(Signed Integer) Ymin of Frame Size (Always 0)

depend on nBits Ymax(Signed Integer) Ymax of Frame Size

After Ymax (2 Bytes) FrameRate (U16) Desired playback rate in fps.

After FrameRate (2 Bytes) FrameCount(U16) Total number of frames in this SWF.

沒有留言: