为SWF嵌入新对象

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了为SWF嵌入新对象相关的知识,希望对你有一定的参考价值。

Hey guys, I struggled a little to find a crossbrowser, non repetitive params way to embed swfs; this object embed works flawlessly for me in all browsers - ie7, ie8, safari, chrome, firefox. Why is swfobject and YouTube using this format - http://code.google.com/p/swfobject/wiki/documentation ( scroll to static embed ) ? The flaw with that is that you have to change width/height/flashvars 2 times rather then my method where it's only one ...

So anybody knows why they are using that ? Does it work in IE6 ( I can't test this .. ) ? If that's the case - I don't care about ie6:D
  1. <p>
  2. <object type="application/x-shockwave-flash" data="preview.swf" width="915" height="360" id="flashcontent" style="visibility: visible; "><param name="movie" value="preview.swf"><param name="menu" value="false"><param name="allowScriptAccess" value="always"><param name="scale" value="noscale"><param name="allowFullScreen" value="true"><param name="wmode" value="opaque"><param name="flashvars" value="xml=xml/gallery2.xml">
  3. </p>
  4.  
  5. <p>
  6. <object type="application/x-shockwave-flash" data="preview.swf" width="915" height="360" id="flashcontent" style="visibility: visible;">
  7. <param name="movie" value="preview.swf"><param name="menu" value="false"><param name="allowScriptAccess" value="always">
  8. <param name="scale" value="noscale"><param name="allowFullScreen" value="true"><param name="wmode" value="opaque">
  9. <param name="flashvars" value="xml=xml/gallery2.xml">
  10. </p>

以上是关于为SWF嵌入新对象的主要内容,如果未能解决你的问题,请参考以下文章

SWF对象嵌入代码

HTML 另一个嵌入swf与对象和嵌入

HTML SWF对象嵌入

SWF 对象参数 - scale 或 scaleMode

嵌入式 SWF 文件大小错误

如何隐藏嵌入式 swf 的文件名?