您现在的位置是:首页
>
Flash下载 把Flash文件转换为Exe文件
把Fla h文件转换为Exe文件 下面的代码把一个Fla h文件转换为exe文件 fu ctio Swf Exe S D F: tri g : tri g //S = Source file wf /

把Flash文件转换为Exe文件
下面的代码把一个Flash文件转换为exe文件 function Swf Exe(S D F: string): string;//S = Source file (swf)//D = Destionation file (exe)//F = Flash PlayervarSourceStream DestinyStream LinkStream: TFileStream;flag: Cardinal;SwfFileSize: Integer;beginResult := something error ;DestinyStream := TFileStream Create(D fmCreate);tryLinkStream := TFileStream Create(F fmOpenRead or fmShareExclusive);tryDestinyStream CopyFrom(LinkStream );finallyLinkStream Free;end;SourceStream := TFileStream Create(S fmOpenRead or fmShareExclusive);tryDestinyStream CopyFrom(SourceStream );flag := $FA ;DestinyStream WriteBuffer(flag SizeOf(Integer));SwfFileSize := SourceStream Size;DestinyStream WriteBuffer(SwfFileSize SizeOf(Integer));Result := ;finallySourceStream Free;end;finallyDestinyStream Free;end;end;procedure TForm Button Click(Sender: TObject);beginSwf Exe( c:somefile swf c:somefile exe c:Program FilesMacromediaFlash MXPlayersSAFlashPlayer exe );end; 有了这个 你就可以制作自己的Flash贺卡了 lishixinzhi/Article/program/Delphi/201311/24736 很赞哦! (1058)