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.
请注意,Flash体验确实显示在Firefox中,但是当我执行跟踪并实际运行应用程序时,无法读取值。这让我头疼了一天,我很难过。如果有人对此有任何指导,我们将非常感激。
6 个解决方案
#1
3
have you tried
你有没有尝试过
<param name="movie" value="Main.swf?foo=1" />
An 'oldschool' way of passing parameters to the SWF.
将参数传递给SWF的'oldschool'方式。
#2
1
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.
我刚刚在Fx 3.6中运行了以下内容,它运行正常。我不确定你的版本为什么不起作用。它可能与无效属性有关。它位于带有doctype set的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>
#3
1
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.
在访问属性之前,请确保时间线上至少有5个帧。或者如果在代码中等待一段时间。问题是玩家有时在第一帧没有价值。后来他们会在那里。
#4
1
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.
可能是Firefox中的Flash Player插件有不同的版本,或者花费更多时间将参数输入到swf中。尝试使用计时器或ENTER_FRAME侦听器进行延迟调用,以查看您的参数是否设置了延迟。
private function checkProgress(event : TimerEvent) : void
{
// check if loaderInfo.parameters is set
}
#5
0
i use this embed (and yes, it contains embed tag) for my invisible mp3 player and it warks everywhere:
我使用这个嵌入(是的,它包含嵌入标签)为我的隐形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>
#6
0
For Fire Fox use EMBED TAG under Object Tag as
对于Fire Fox,在Object Tag下使用EMBED TAG
#1
3
have you tried
你有没有尝试过
<param name="movie" value="Main.swf?foo=1" />
An 'oldschool' way of passing parameters to the SWF.
将参数传递给SWF的'oldschool'方式。
#2
1
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.
我刚刚在Fx 3.6中运行了以下内容,它运行正常。我不确定你的版本为什么不起作用。它可能与无效属性有关。它位于带有doctype set的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>
#3
1
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.
在访问属性之前,请确保时间线上至少有5个帧。或者如果在代码中等待一段时间。问题是玩家有时在第一帧没有价值。后来他们会在那里。
#4
1
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.
可能是Firefox中的Flash Player插件有不同的版本,或者花费更多时间将参数输入到swf中。尝试使用计时器或ENTER_FRAME侦听器进行延迟调用,以查看您的参数是否设置了延迟。
private function checkProgress(event : TimerEvent) : void
{
// check if loaderInfo.parameters is set
}
#5
0
i use this embed (and yes, it contains embed tag) for my invisible mp3 player and it warks everywhere:
我使用这个嵌入(是的,它包含嵌入标签)为我的隐形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>
#6
0
For Fire Fox use EMBED TAG under Object Tag as
对于Fire Fox,在Object Tag下使用EMBED TAG