PC Review


Reply
Thread Tools Rate Thread

How do I extract an embeded flash movie from PowerPoint?

 
 
=?Utf-8?B?c2VhYmFzc19qYg==?=
Guest
Posts: n/a
 
      22nd Nov 2005
I know how to embed Flash movies but how do I extract them once they have
been embeded and get them back into .swf form?
 
Reply With Quote
 
 
 
 
Troy @ TLC Creative
Guest
Posts: n/a
 
      22nd Nov 2005
Do a SAVE AS and choose SAVE FOR WEB (HTML). Then go into the assets folder
and you will find the .swf file.

--
--
Troy Chollar
TLC Creative Services
<< Microsoft MVP, PowerPoint >>

"seabass_jb" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I know how to embed Flash movies but how do I extract them once they have
> been embeded and get them back into .swf form?



 
Reply With Quote
 
 
 
 
=?Utf-8?B?c2VhYmFzc19qYg==?=
Guest
Posts: n/a
 
      22nd Nov 2005
This doesn't work. I have tried this. The embedded flash file just comes up
as an image. Any other ideas?

"Troy @ TLC Creative" wrote:

> Do a SAVE AS and choose SAVE FOR WEB (HTML). Then go into the assets folder
> and you will find the .swf file.
>
> --
> --
> Troy Chollar
> TLC Creative Services
> << Microsoft MVP, PowerPoint >>
>
> "seabass_jb" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I know how to embed Flash movies but how do I extract them once they have
> > been embeded and get them back into .swf form?

>
>
>

 
Reply With Quote
 
yang572033@yahoo.com
Guest
Posts: n/a
 
      23rd Nov 2005
Hi, I saw an artical about how to extract .swf from PPT files and
think it's quite useful, hope it helps.
---------------------------------------------
We had a Power Point Presentation file given us a few days ago with an
embedded flash file which we needed to extract to use on the website.


We couldn't find any way to do this. We could drag and drop the swf
onto another presentation, we could even drag the object onto the
desktop. This created a scrap file which was rather annoying.


However, this led me to the discovery of the NeverShowExt registry key.

I managed to rename the scrap to a have a .swf extension, but still no
cookie.


So I started digging around the scrap to see if I could find the swf
object inside and after reading an introduction to SWF I found what I
was looking for.


Now I just wanted to extract this binary data from the scrap file, and
I wanted to do it the hard way!


So I wrote a small amount of code to look through a file and extract
the goodies. The main part of the code was to take a byte array and
copy that into my SWF struct - using the
System.Runtime.InteropServices.Marshal class.


After a bit of messing around the code runs like a dream. The final
executable takes 2 parameters the first is the file containing the SWF
and the second is the file to write the SWF.


using System;
using System.IO;
using System.Runtime.InteropServices;


namespace FlashExtractor
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//assume param 1 is the location of the
shockwave file
byte[] file = new
byte[Marshal.SizeOf(typeof(swf))];


FileStream fs = File.Open(args[0],
FileMode.Open,
FileAccess.Read,FileShare.Read);
int i=0;
//go through the file byte by byte
//could I have seeked this?
while (i<fs.Length-8)
{
//set the position in the file
fs.Position = i;
//read off 8 bytes worth of data to put
into the swf struct
fs.Read(file,0, 8);
IntPtr ptr =
Marshal.AllocHGlobal(file.Length);
Marshal.Copy(file, 0x0, ptr,
file.Length);
swf s = (swf)
Marshal.PtrToStructure(ptr, typeof(swf));


// if the struct header is FWS then we
may have a flash file
if (s.header1==0x46 && s.header2==0x57
&& s.header3==0x53)
{
//we have the identity of a
flash file
Console.WriteLine("Found the
header of a flash file");
Console.WriteLine("Version:
{0}", s.version);
Console.WriteLine("Size: {0}",
s.size);


//if the size of the fws is <
length of the file
if (s.size + i<=fs.Length)
{

Console.WriteLine("Attempting to write the file to {0}",
args[1]);
FileStream fw =
File.OpenWrite(args[1]);



Console.WriteLine("Allocation byte array of {0} length", s.size);
byte[] b=new
byte[s.size];



Console.WriteLine("Reseting the file back to position: {0}", i);
fs.Position = i;



Console.WriteLine("Reading from {0} to {1}", i, s.size);

fs.Read(b,0,(int)s.size);



Console.WriteLine("Writing byte array back to disk");
fw.Write(b, 0,
b.Length);


fw.Close();
break;
}
else
{
Console.WriteLine("The
file is not of the correct size file: {0},
{1}", s.size, fs.Length);
}


}
i++;
}
fs.Close();


}


}


[StructLayout (LayoutKind.Sequential, Pack = 0x1)]
struct swf
{
public byte header1;
public byte header2;
public byte header3;
public byte version;
public UInt32 size;
}



}


In theory this could be used to extract many forms of embedded binary
data.
---------------------------------------
http://www.sameshow.com
A practical yet easy-to-use software to convert PowerPoint to Flash for
publishing on Web or emailing to others
---------------------------------------

 
Reply With Quote
 
New Member
Join Date: Mar 2012
Posts: 1
 
      20th Mar 2012
Sorry to revive a zombie thread but this was the first result when looking for this on Google.


I had exactly this problem and have written a blog post here (http://blog.interrupt3h.com/?p=250) that addresses the issue.


The steps I followed were :


1. Open PowerPoint file and ensure that it is saved as .pptx (the new XML Office format)
2. Rename the .pptx as a .zip file
3. Open the .zip file in winrar/winzip or your preferred utility
4. Navigate to the .\ppt\activeX directory in the archive
5. Extract all the .bin files to another directory
6. Run the php script (here) on it


Anyone with better PHP skills than I may be able to get it to run directly over the ppt (or even unzip the pptx automagically) but at least this way you can also extract from pptx as well.


Hope it helps anyone Googling this issue.

bb
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
a flash embeded movie will not let me go to the next slide in ppt. =?Utf-8?B?bW9uYXNtYWRhbGk=?= Microsoft Powerpoint 9 30th Apr 2010 07:37 PM
Re: How to set the URL property of a embeded WMP object in orderto play an embeded mp3? Robert M. Franz [RMF] Microsoft Word Document Management 0 21st Apr 2009 12:12 PM
How can I extract the .wav audio embeded in a slide? Browneyedgurl2 Microsoft Powerpoint 7 29th Oct 2008 05:29 AM
flash movie isn't embeded in Powerpoint2007 SJWannabe Microsoft Powerpoint 8 10th Oct 2008 07:11 PM
how to download movie embeded inside a flash movie... John Jay Smith Freeware 8 26th May 2006 09:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:39 PM.