Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用<embed>这样的标签时:
<embed>
<embed src="flashfile.swf" autostart="true"></embed>
它可能不会自动播放。
但是,如果我像这样使用其他 fromat:
<embed src="flashfile.wmv" autostart="true"></embed>
它会运作良好。为什么?
我不相信 autostart 属性是 flash 对象解释的东西。embed 标签对嵌入的对象如何处理传递的任何属性或参数没有任何规范,因为它完全取决于创建对象的供应商的判断。所以,本质上,wmv embed 会监听一个名为 autostart 的属性,而 swf 则不会。
Flash 嵌入实际上会自动启动,但如果有一些 ActionScript 会停止动画或发生其他任何事情,那么您无能为力。如果 swf 对象启用了外部接口,则可以使用 JavaScript 与对象交互。除此之外,你无能为力。
我希望这能提供一些见解!