Click here to Skip to main content
15,891,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to use swf inside my exe from c++
Just to make a window and use the swf as the content of it.
I want to build it as exe that the swf dont goes with the exe as external file but as an inside file that plays with the exe.

I found this link which for some works fine for others not.
swf2exe download | SourceForge.net[^]

I am from the ones that i cant run it without errors.
After the build i have the same error about
C++
IServiceProvider is automatically excluded
i forced not to exclude it in code but again the window opens from the exe but no swf plays inside it.

Can anyone tell me if this code is good for making my exe running with swf inside and how am i going to make it run properly with the swf ?

Any kind of tip or help is much appreciated
Posted
Comments
Mohibur Rashid 20-Jan-16 19:06pm    
First of all, Flash application has the functionality to create executable from the swf.
Another wacky idea would be convert the entire swf file into base64, copy the text file in your source code as literal string. in the process convert it back and run from your module ;)
Nocs_ 20-Jan-16 21:03pm    
mohibur i liike your idea if it is what i want to make
First of all let me clear it out again.
I want to create an exe in c++ so i can use extra functions from c++ that flash dont have, inside this c++ exe that i will create i want to have a flash.swf but not as external but inside it, when it builds the exe the flash.swf should be inside it.
No other swf needed to be loaded if i take the exe to other pc that dont have flash player.
Thats what i try to make for the moment

1 solution

Quote:
I am trying to use swf inside my exe from c++
- not exactely sure what you mean here 'inside'

Well, in 'the old days' (of VC6), I remember doing this sort of this as a prototype for a small project - Im not sure how/why/where they came from [*1], but Im pretty sure there was a Shockwave ActiveX component on my Dev machine and I added that to my MFC Dialog based VC project. The Shockwave content itself, I embedded in the exe as a resource - now, given Im an old fogy who relies on previous experience first, I personally would be looking at doing that in whichever newer VC environment I;d be using - this How to play swf files in win32 C++ Directx[^] may be another option

I 'guess' if you have a Shockwave exe as you appear to indicate, you could include that as an embedded resource in your program, 'unpack' it to a file on disk and execute it as a separate process, and delete the file when the viewing has finished

[*1] Apparently, Adobe [something] plays Shockwave Flash AND has an ActiveX component it installs - might be worth Googling for
 
Share this answer
 
Comments
Nocs_ 20-Jan-16 21:08pm    
Thank you Garth for your reply, i checked the link you proposed me before i post, I just need something more than just a player website like in my exe.I dont want my swf to be external and plays through the builded exe i want to be inside the c++ builded exe.
If you have anything in mind guide me cause i am on my search for such way but too many stuff around c++ with flash and nothing handy till now

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900