在 html 中嵌入 flash

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1333202/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 00:42:31  来源:igfitidea点击:

Embed flash in html

htmlflashembed

提问by Johan

In chrome, ie and safari this is not a problem, but in firefox it is.

在 chrome、ie 和 safari 中,这不是问题,但在 Firefox 中却是。

I use <object>for my flashclip.

<object>用于我的 flashclip。

<object type="application/x-shockwave-flash"> 
    <param name="movie" value="myclip.swf" /> 
    <param name="quality" value="high" /> 
</object>

What am I doing wrong?

我究竟做错了什么?

回答by Johan

After some testing, this works fine:

经过一些测试,这工作正常:

<object type="application/x-shockwave-flash" data="myclip.swf" 
    width="550" height="400"> 

    <param name="movie" value="myclip.swf" />
    <param name="quality" value="high" />
</object>

Firefox needed both data, widthand height.

Firefox 需要data,widthheight.

回答by James Wheare

For cross browser flash embedding, you need to use both<object>and <embed>tags, nested inside one another, and it might also help to include the dataattribute on the <object>like this:

对于跨浏览器的闪存嵌入,你需要使用两个<object><embed>标签,嵌套在彼此,这也可能有助于包括data该属性<object>是这样的:

<object type="application/x-shockwave-flash" data="myclip.swf"> 
    <param name="movie" value="myclip.swf" />
    <param name="quality" value="high" />
    <!-- Sandwich the embed tag inside the object tag -->
    <embed src="myclip.swf" quality="high" />
</object>

Alternatively, I'd suggest using the swfobjectjavascript micro-library for robust cross browser flash embedding.

或者,我建议使用swfobjectjavascript 微型库来实现强大的跨浏览器 Flash 嵌入。

回答by George Profenza

Use both object and embed tag. Some browsers use the tag and 'name' to get to the swf, others use and 'id'

使用对象和嵌入标签。一些浏览器使用标签和“名称”来访问 swf,其他浏览器使用“id”

回答by sui

The code is <embed src="helloworld.swf">.

代码是<embed src="helloworld.swf">