Putting a flash .swf file within the EXE file

StealthRT
08-15-2005, 05:39 PM
Hey all i am just wondering if i can put a flash swf file within the EXE file for my program so that i would not have to use C:\dir\movie.swf to call it up. Just like it does with pictures, it stores them inside the EXE file without having to call them from outside.

Reason being i dont want people to know that i am using the flash movie in my program and go and either delete it/ rename it or see how things work when they just play it in a flash player.

Any ideas?

Thanks for your time,
David

jlm
08-15-2005, 08:27 PM
I think you might be able to do this with an OLE control, if not, just do what I do when I want to hide files from users. SImply rename your flash from "Myflashmovie.swf" to something like "tacx115.ocx" that way it just looks like some system file. then point your shockwave flash object at that renamed file. any extension should work. I use *.dat alot. or my initials *.jlm, anything will work.

Cerian Knight
08-15-2005, 08:55 PM
Of course. Too easy. Add a shockwaveflash object and set the .Embed=True (and .Playing=True?)
The swf file automatically embeds when you type in the path into the .Movie property and hit enter.
Make the exe and see for yourself!

juanstiller
11-10-2005, 06:24 PM
Of course. Too easy. Add a shockwaveflash object and set the .Embed=True (and .Playing=True?)
The swf file automatically embeds when you type in the path into the .Movie property and hit enter.
Make the exe and see for yourself!

Hey cerian: im trying your method, but when i try the .exe the movie is not loaded. If i try to specify the code manually it gave me compilation error

i tried:
swf1.EmbedMovie

any hints?

Thanks.
Juan

Cerian Knight
11-20-2005, 03:40 PM
First thing: No code is required on the form.
Next: Manually set the property SWF1.EmbedMovie to True
Next: Manually set the property SWF1.Movie to the url location of the movie e.g.:
file://C:\Documents and Settings\MyName\Desktop\Downloads\this_land.swf

Notice the file was located on my local hard drive, so I used file:// instead of http://
Also notice that as soon as you set the .Movie property to a valid file, it begins playing in the develpment environment...without running the project. This is because SWF1.Playing is set to True by default. If you did want to add code to the form, it might be to toggle this property.

That is it. Compile it to see a whopping exe, a bit larger than your swf.

Whyme
11-20-2005, 04:09 PM
I would use something like when I want a help file I use

'open your file
Shell "C:\WINDOWS\notepad.exe " & App.Path & "\Help.txt", vbNormalFocus

Cause if you use App.Path it looks in the path of your app

reboot
11-20-2005, 04:51 PM
ShellExecute would be better. What about on machines where there is no Windows directory?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum