C#:加载一个嵌入式瑞士法郎成闪光的ActiveX没有临时文件 [英] C#: Loading an embeded swf into an flash activex without a temporary file

查看:125
本文介绍了C#:加载一个嵌入式瑞士法郎成闪光的ActiveX没有临时文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目需要包含在一个单一的exe文件,我的最终应用是完全的自我。我已经合并的可执行文件和使用ILMerge的DLL(assmebly合并实用程序)。我在托管C#应用程序的闪存Active X控件,我还嵌入了一个SWF文件,我需要加载到闪光控制到C#应用程序作为一个嵌入式的资源。

My project requires that my final application be completely self contained in a single exe. I am already combining the executable and dlls using ILMerge (assmebly merge utility). I am hosting an flash active x control in a C# application and I have embedded the one swf i need to load into the flash control into the c# application as an embeded resource.

这个问题表明如何写的资源到一个临时文件,但不希望创建临时文件为我的处境。 。这就产生了一个问题,因为Active X控件的loadMovie方法只接受指向要加载的文件中的字符串

This question shows how to write the resource to a temporary file, but it is undesirable to create temporary files for my situation. This creates a problem because the active x control loadMovie method only accepts a string pointing to the file to be loaded.

我的问题是:是否有可能动态加载嵌入式SWF资源到Flash Active X控件,而无需创建一个临时文件?

推荐答案

我最终的解决方案用是将所有必需的SWF文件打包成一个包装SWF的库。

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

然后我设置ActiveX控件包装SWF的电影财产,并设置标志嵌入的activex控件为true。这直接嵌入了SWF到ActiveX控件。我不碍着任何负载在C#,而我只是呼吁Active X控件初始化已经内嵌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.

基本上如果IM嵌入资源,也没有必要做在C#中,我可以将其嵌入到SWF。然后我做了我在闪存包装SWF所有装卸。

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.

这篇关于C#:加载一个嵌入式瑞士法郎成闪光的ActiveX没有临时文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆