如何在 Firefox 中仅使用对象嵌入标签来获取 flashvars?

发布于 2024-09-01 13:45:36 字数 789 浏览 5 评论 0原文

我试图生成一个仅嵌入代码的 标记,并且无法让 Firefox 沿着 FlashVars 值传递 Flash。这似乎在我尝试过的其他地方都有效,但在 Firefox 中失败了。以下是我正在使用的嵌入示例:

<参数名称=“allowFullScreen”值=“true”/> <参数名称=“bgcolor”值=“#ffffff”/> <参数名称=“质量”值=“高”/> <参数名称=“菜单”值=“假”/>>

请注意,Flash 体验确实显示在 Firefox 中,但当我进行跟踪并实际运行应用程序时,无法读取值。这让我摸不着头脑一天,我很困惑。如果有人对此有任何指导,我们将不胜感激。

I am trying to generate an <object> tag only embed code and cannot get Firefox to pass Flash along the FlashVars values. This seems to work everyplace else that I've tried it but fails in Firefox. Here is a sample of the embed that I'm using:

<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="550" height="400" id="Main" align="middle" data="Main.swf">
<param name="movie" value="Main.swf" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="true" />
<param name="bgcolor" value="#ffffff" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="FlashVars" value="foo=1" />
</object>

Please note that the Flash experience does show up in Firefox but when I do traces and actually run the application this fails to read the values. This has had me scratching my head for a day and I'm pretty stumped. If anyone has any guidance on this it would relly be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

愿与i 2024-09-08 13:45:36

您是否尝试过

<param name="movie" value="Main.swf?foo=1" />

向 SWF 传递参数的“老派”方法?

have you tried

<param name="movie" value="Main.swf?foo=1" />

An 'oldschool' way of passing parameters to the SWF.

终陌 2024-09-08 13:45:36

我刚刚在 Fx 3.6 中运行了以下命令,效果很好。我不确定为什么你的版本不起作用。这可能与无效属性有关。它位于带有 doctype 集的 XHTML 严格文档中。

<object type="application/x-shockwave-flash" data="movie.swf" width="100" height="100">
    <param name="movie" value="movie.swf" />
    <param name="salign" value="lt" />
    <param name="flashvars" value="foo=bar" />
</object>

i just ran the following in Fx 3.6 and it works fine. i'm not sure why your version isn't working. it might have something to do with the invalid attributes. this is housed within an XHTML strict document with doctype set.

<object type="application/x-shockwave-flash" data="movie.swf" width="100" height="100">
    <param name="movie" value="movie.swf" />
    <param name="salign" value="lt" />
    <param name="flashvars" value="foo=bar" />
</object>
一直在等你来 2024-09-08 13:45:36

在访问属性之前,请确保时间线上至少有 5 帧。或者如果在代码中等待一段时间。问题是玩家有时在第一帧上没有值。稍后他们就会在那里。

Make sure you either have at least 5 frames on the time line before you access the properties. Or if in code wait a while. The issue is the player sometimes doesn't have the value on the first frame. Later they will be there.

世界等同你 2024-09-08 13:45:36

可能是您的 Firefox 中的 Flash Player 插件版本不同,或者将参数输入 swf 需要更多时间。尝试使用计时器或 ENTER_FRAME 侦听器进行延迟调用,以查看您的参数是否设置有延迟。

private function checkProgress(event : TimerEvent) : void
{
    // check if loaderInfo.parameters is set
}

It could be that your Flash Player plugin in Firefox has a different version or takes a little more time getting the parameters into the swf. Try Making a delayed call with a timer or an ENTER_FRAME listener to see if your parameters is set with a delay.

private function checkProgress(event : TimerEvent) : void
{
    // check if loaderInfo.parameters is set
}
凶凌 2024-09-08 13:45:36

我将这个嵌入(是的,它包含嵌入标签)用于我的隐形 mp3 播放器,它到处都会发出声音:

<object style="position:fixed" id="1pixPlayer" width="1" height="1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="transparent" name="wmode">
<param value="1pxMp3.swf" name="movie">
<param value="always" name="allowScriptAccess">
<param name="flashvars" value="id=1&var=val&var1=val1">
<embed name="1pixPlayer" width="1" height="1" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" src="1pxMp3.swf" flashvars="id=1&var=val&var1=val1"></object>

i use this embed (and yes, it contains embed tag) for my invisible mp3 player and it warks everywhere:

<object style="position:fixed" id="1pixPlayer" width="1" height="1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="transparent" name="wmode">
<param value="1pxMp3.swf" name="movie">
<param value="always" name="allowScriptAccess">
<param name="flashvars" value="id=1&var=val&var1=val1">
<embed name="1pixPlayer" width="1" height="1" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" src="1pxMp3.swf" flashvars="id=1&var=val&var1=val1"></object>
故事↓在人 2024-09-08 13:45:36

对于 Fire Fox,请在对象标签下使用 EMBED TAG 作为

For Fire Fox use EMBED TAG under Object Tag as

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文