Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to extract swf from Flash Projector (EXE) Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
18-Sep-03
Category
Multimedia
Language
Delphi 3.x
Views
114
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Joko Rivai

How to extract swf from Flash Projector

Answer:

1   procedure ExeToSWF(ExeFile, aSWF: string);
2   var
3     p: pointer;
4     f: file;
5     sz,
6       swfsize: integer;
7   const
8     SWF_FLAG: integer = $FA123456;
9   begin
10    if not fileexists(ExeFile) then
11    begin
12      messagebox(Application.Handle, pchar('File not found'), pchar('Error'),
13        MB_ICONERROR);
14      exit;
15    end;
16    assignfile(f, ExeFile);
17    reset(f, 1);
18    seek(f, filesize(f) - (2 * sizeof(integer)));
19    blockread(f, sz, sizeof(integer));
20    if sz <> swf_flag then
21    begin
22      messagebox(Application.Handle, pchar('Not a valid Projector Exe'), 
23  pchar('Error'),
24        MB_ICONERROR);
25      closefile(f);
26      exit;
27    end;
28    blockread(f, swfsize, sizeof(integer));
29    seek(f, filesize(f) - (2 * sizeof(integer)) - swfsize);
30    getmem(p, swfsize);
31    blockread(f, p^, swfsize);
32    closefile(f);
33    assignfile(f, aSWF);
34    rewrite(f, 1);
35    blockwrite(f, p^, swfsize);
36    closefile(f);
37    freemem(p, swfsize);
38    messagebox(Application.Handle, pchar('SWF Extracted'), pchar('Succes'),
39      MB_ICONINFORMATION);
40  end;
41  
42  Example:
43  
44  procedure TForm1.Button1Click(Sender: TObject);
45  begin
46    ExeToSWF('C:Desktopflash.exe', 'C:Desktopf.swf');
47  end;
48  
49  end.


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC