网上看到这个资料.
字段
 类型
 备注
 
标识
 8位
 标识字节:F代表未压缩C代表已压缩(SWF6以后的版本特有)
 
标识
 8位
 代表W
 
标识
 8位
 代表S
 
版本号
 8位
 代表SWF文件的版本,比如0x06代表SWF6
 
文件长度
 32位
 整个文件的所占的字节数
 
帧大小
 RECT结构
 SWF场景的大小,单位为1twip(1/20像素)
 
帧速度
 16位
  
 
帧数
 16位
 影片总的帧数目
  The header begins with a three-byte Signature of either 0x46, 0x57, 0x53 (“FWS”) or 0x46,0x57, 0x43 (“CWS”). An FWS signature indicates an uncompressed SWF file; CWS indicatesthat the entire file after the first 8 bytes (that is, after the FileLength field) has been compressed using the open standard ZLIB. The data format used by the ZLIB library is described by Request for Comments (RFCs) documents 1950 to 1952. CWS file compression is only permitted in SWF version 6 or later.文件头以三个标识符开始,他们不是0x46, 0x57, 0x53 (“FWS”)就是0x46,0x57, 0x43 (“CWS”).一个FWS标识表示该文件是未压缩文件.CWS标识表示整个文件,在前八个字节,也就是文件长度字段之后所有的内容,都是开放标准ZLIB压缩过的.用ZLIB库的数据格式,在1950 到1952年的Request for Comments (RFCs)文档中有所描述.CWS仅在SWF6以后才允许使用. A one-byte Version number follows the signature. The version number is not an ASCII character,but an 8-bit number. For example, for SWF 4 the version byte is 0x04, not the ASCII character‘4’ (0x35).在标识符之后的一个字节是版本号.这个版本号不是一个ASCII字符,而是一个8位的数字.例如,SWF4文件的版本号是0x04,不是ASCII字符”4”(0x35). The FileLength field is the total length of the SWF file including the header. If this is anuncompressed SWF (FWS signature), the FileLength field should exactly match the file size. Ifthis is a compressed SWF (CWS signature), the FileLength field indicates the total length of thefile after decompression, and thus will generally not match the file size. Having the uncompressed size available can make the decompression process more efficient.文件长度字段代表包括文件头整个文件的总长度.如果是一个未压缩的SWF文件(FWS标识符),文件长度字段表示文件的精确大小;如果是一个压缩的SWF文件(CWS标识),文件长度字段表示解压后文件的大小,这样一般就不是实际文件的大小了.让未压缩(解压后)的大小可见,则可以使解压过程更加有效. The FrameSize field defines the width and height of the movie. This is stored as a RECTstructure, meaning that its size may vary according to the number of bits needed to encode thecoordinates. The FrameSize RECT always has Xmin and Ymin of 0; the Xmax and Ymaxmembers define the width and height (see Using Bit Values).帧大小字段表示影片的宽度和高度.它存在一个RECT结构中,表示它的大小可以根据坐标(四个点的坐标)数值的变化而变化.文件大小RECT通常是这样的形式:Xmin和Ymin成员都为0;Xmax和Ymax成员声明宽度和高度.然后我就写了下面的代码:procedure TForm9.btn1Click(Sender: TObject);
type
  TFlashRect = record
    Xmin,Ymin:Integer;
    Xmax,Ymax:Integer;
  end;
  PFlashRect = ^TFlashRect;
var
  Fs:TFileStream;
  rc:PFlashRect;
  a:array [0..3] of Byte;
  i:PInteger;
  c:Integer;
begin
  with TOpenDialog.Create(Self) do
  begin
    if Execute() then
    begin
      fs:=TFileStream.Create(FileName,fmOpenReadWrite);
//      ShowMessagefmt('%D',[fs.Size]);
//      Fs.Seek(0,soFromBeginning);
//      Fs.Read(a,4);
//      Fs.Read(i^,SizeOf(Integer));
//      c:=i^;
      Fs.Seek(8,soFromBeginning);
      Fs.Read(rc^,SizeOf(TRect));
      ShowMessageFmt('x:%D,y:%d',[rc^.Xmax div 20 , rc^.Ymax div 20]);
      Free;
      Fs.Free;
    end;
  end;
end;
难道这个rect和我们程序里面的rect定义不一样,我下了adobe的pdf看了下,貌似很有猫腻.
The Nbits field determines the number of bits used to store the coordinate values Xmin, 
Xmax, Ymin, and Ymax. Say the coordinates of the rectangle are as follows:
Xmin = 127 decimal =    1111111 binary
Xmax = 260 decimal =   100000100 binary
Ymin =  15 decimal =       1111 binary
Ymax = 514 decimal = 1000000010 binary
Nbits is calculated by finding the coordinate that requires the most bits to represent. In this 
case, that value is 514 (01000000010 binary) which requires 11 bits to represent. The 
rectangle is stored as the following table shows:
Nbits UB[5] Bits in each rect value field
Xmin SB[Nbits] x minimum position for rect
Xmax SB[Nbits] x maximum position for rect
Ymin SB[Nbits] y minimum position for rect
Ymax SB[Nbits] y maximum position for rect
RECT
Field Type and Value Comment
Nbits UB[5] = 1011 Bits required (11)
Xmin SB[11] = 00001111111 x minimum in twips (127)
Xmax SB[11] = 00100000100 x maximum in twips (260)
Ymin SB[11] = 00000001111 y minimum in twips (15)
Ymax SB[11] = 01000000010 y maximum in twips (514)看的不是很懂.讨论下,高手们.谢谢