什么意思?不解。关于第二个问题,请看下面代码:
procedure Swf2Exe(SwfFileName, ExeFileName: string);
var
ResStream: TResourceStream;
ExeMem, SwfMem: TMemoryStream;
SwfFileSize: Longint;
ExeFlag: Cardinal;
begin
ExeMem := TMemoryStream.Create;
try
//加Flash单独播放器文件
ResStream := TResourceStream.Create(HInstance, 'SWFPLAYER', RT_RCDATA);
try
ExeMem.CopyFrom(ResStream, ResStream.Size);
finally
ResStream.Free;
end;
//加swf文件
SwfMem := TMemoryStream.Create;
try
SwfMem.LoadFromFile(SwfFileName);
ExeMem.CopyFrom(SwfMem, SwfMem.Size);
SwfFileSize := SwfMem.Size;
finally
SwfMem.Free;
end;
// 追加FA123456标志
ExeFlag := $FA123456;
ExeMem.WriteBuffer(ExeFlag, SizeOf(Integer));
// 追加SWF文件长度
ExeMem.WriteBuffer(SwfFileSize, SizeOf(Integer));
//保存文件
ExeMem.SaveToFile(ExeFileName);
finally
ExeMem.Free;
end;
end;
一个Flash exe文件是由以下部分组成:
单独的Flash播放器+swf文件+FA123456+swf文件大小