简体   繁体   English

在C#Webform中包含.SWF文件

[英]Including a .SWF file in a C# Webform

I'm currently working on a project where i need to include a application page for users. 我目前正在开发一个项目,我需要为用户提供一个应用程序页面。 I need the users to access few .SWF flash games through this page. 我需要用户通过此页面访问几个.SWF Flash游戏。 I created a folder named applications in the Application and imported the .SWF files into that. 我在应用程序中创建了一个名为applications的文件夹,并将.SWF文件导入其中。 After that I tried directly linking them using a hyperlink on my page, but they don't seem to open :/ am i missing something? 之后,我尝试使用我页面上的超链接直接链接它们,但它们似乎没有打开:/我错过了什么? or is there something else i need to do before that? 还是在那之前我还需要做些什么呢?

Would really appreciate it if you can help 如果你能提供帮助,真的很感激

Thank you 谢谢

I don't think you can just hyperlink to your .swf file. 我认为你不能只是超链接你的.swf文件。 According to this site, and your using Dreamweaver or FrontPage, you can just insert it from the Insert menu (or something of the kind). 根据站点以及您使用的Dreamweaver或FrontPage,您只需从“插入”菜单(或类似的东西)中插入它即可。 If you aren't using either of those two, you can edit you .swf file in Flash and choose "Export as HTML" from the file menu (or where ever it is) and then just copy the source code of the resulting file to your webpage. 如果你没有使用这两者中的任何一个,你可以在Flash中编辑你的.swf文件并从文件菜单中选择“导出为HTML”(或者在任何地方)然后只需将生成的文件的源代码复制到你的网页。

Normally, you should be able to open .swf files directly in your browser, although embedding the swf into your html is often a good idea, you don't have to. 通常,您应该能够直接在浏览器中打开.swf文件,尽管将swf嵌入到您的html中通常是个好主意,但您不必这样做。 If the url in your address bar shows an adress ending with '.swf' you can test if a swf has loaded by right clicking in your browser window, if you see the flash context menu (zoom in, zoom out, etc) Your swf has loaded. 如果地址栏中的网址显示以“.swf”结尾的地址,则可以通过右键单击浏览器窗口来测试是否已加载swf,如果您看到Flash上​​下文菜单(放大,缩小等)您的swf装了。

If your swf has loaded, but nothing else happens, there can be many other reasons for this. 如果您的swf已加载,但没有其他任何事情发生,可能有许多其他原因。

Where did you get the swf game files? 你在哪里获得了swf游戏文件? If you copied them from another site it's very likely that the swf is supposed to load other files (game assets (images), settings (xml) etc) before the game can be played. 如果你从其他网站复制它们,很可能swf应该在玩游戏之前加载其他文件(游戏资产(图像),设置(xml)等)。

Sometimes the execution of (actionscript) code in a swf is triggered by script in the html page it is embedded in. 有时,swf中的(actionscript)代码的执行是由嵌入的html页面中的脚本触发的。

It's not entirely clear what you are trying to do.... 你要做的事情并不完全清楚......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM