C#: Loading an embeded swf into an flash activex without a temporary file

一世执手 提交于 2019-12-06 07:14:23

The solution i ended up using was to package all the required swf files into the library of a wrapper swf.

Then i set the movie property of the activex control to the wrapper swf, and set the embed flag on the activex control to true. This embeds that swf directly into the activex control. I dont ever do any loading in the C#, rather i just call the play() method on the active x control to initialize the swf file that has been embeded.

Basically if im embedding a resource, there is no need to do it in the C#, i can just embed it in the swf. I then did all my loading and unloading in the flash wrapper swf.

ahmedsafan86

you can add the swf file to the resources then at runtinme read the file as an array of bytes the send it to this function

System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(YourForm));
System.Byte[] data = (System.Byte[])(resources.GetObject("FileName"));
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!