I am making a small research to convert a .swf file to an .exe file. I intend to build an .exe file with its resources which are .swf files. I will use this .exe file as a template later and just replace the resources with the .swf file which I want to convert. During the development I discover that I had a problem which I still did not solve. I could never load a .swf file in my application before. There are always problem when I tried to use the OCX control provided by Adobe.
It happens always with Visual Studio 2005 at my computer although I registered it and re-registered it many times. I think there is a conflict between the version of .ocx control which I use and the version which VS 2005 expects. So today I tried with Visual Studio 2008 with the hope that it will work. So I do as following to insert a flash player to my application.
1. Right click on Toolbox window –> Choose Items…
2. Wait for a moment. On new window, click on Tab “COM Components” –> Shockwave Flash Object –> Click OK.
3. If it was successful, you would see the object Shockwave Flash Object on the Toolbox windows.
4. Drag and Drop this component on Form.
5. Rename the control to chartFlashPlayer .Add this code to Form_Load event.
private void Form1_Load(object sender, EventArgs e) { chartFlashPlayer.LoadMovie(0, "D:\\fmared.swf"); }
6. Run form and I get it run. Ju hu.
I know this post may contain nothing helpful but anyways it’s first time that I can load .swf file in my application my computer at home. I feel happy. In next step I will try to load .swf file from resources and create a program to change the resource section so that I can replace with the file which I want. I hope everything will run smoothly. For more detailed instructions, you can follow this link http://www.adobe.com/devnet/flash/articles/stock_history.html
Hi. I have read your artice.
With me, it very helpfull. Thank you very much.
Hello,
I can’t find the Shockwave flash object under my COM objects? I’m using VS2005. Can any one please help me?.
@Saad: Read this blog to solve your problem http://hintdesk.com/visual-studio-shockwave-flash-object-not-in-com-components/
you need to import a flash pluggin (dll) in to ur project.
follow the link :http://www.flash-control.net
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)
I am getting this exception.Please help.
@Vishal: Set your project only run with 32 bit operating system and it will work.
Dear all,
I install a flash player and add shockwaveflashobject in my tools. I have another problem.
when I run the application file form ….bindebugmyPrj.exe it run correctly. But when I move myPrj.exe file into the other folder (for example Desktop), an error occurred. I get this error :
Could not load file or assembly ‘AxInterop.ShockwaveFlashObjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.”:”AxInterop.ShockwaveFlashObjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Is there anyone who how can I fix this problem?
thanks in advance
You have to copy the dll with. Exe file needs dll file to run.
hi can you explain how can i load resource .swf files into ShockWave Flash Player?thanks for all.:D
@Auther: See step 5 in the post to see how you can load SWF to flash player.