Flash:除 Internet Explorer 之外的所有内容均出现错误行为

发布于 2024-07-23 01:26:36 字数 629 浏览 7 评论 0原文

我是一个十足的 Flash n00b,但我遇到了困难,我认为在这里发布我的问题值得一试,即使它可能太复杂而无法在这里有效传达。

我的客户想要一个 Flash 介绍(哎呀!),所以我制作了它,以便生成一个带有指向网站上其他页面的链接的菜单。 为了最大程度地减少烦人的访问者,我使用 cookie 来确定用户是否已经在主页上,如果是,则跳过整个动画并仅显示菜单。

我正在使用 ActiveContent JavaScript 库将 Flash 嵌入到我的页面中。 我通过查询字符串(例如 myflash.swf?animation=false)向 Flash 文件传递​​一个值,并在 Flash 中使用 gotoAndPlay() 读取该值跳到动画的最后一帧。 我正在使用 ActionScript 3。

在 Internet Explorer 8 中,并且仅在 IE 中,它可以按预期工作。 不幸的是,没有其他浏览器这样做; 它们都显示完整的动画。 cookie 工作正常,但 Flash 完全忽略了 gotoAndPlay 命令。

因为我真的不知道自己在做什么,所以我可能做错了。 就像我说的,我知道在不发布大量代码的情况下这是不可能的,但是有人有任何想法吗?

I'm a complete Flash n00b, but I'm having difficulty and I thought posting my question here was worth a shot, even if it's probably too complex to effectively convey here.

My client wanted a Flash intro (yuck!) so I made it so that it results in a menu with links to other pages on the site. To minimize annoying visitors, I'm using a cookie to determine if the user was already on the home page, and if so skip the whole animation and just show the menu.

I'm using the ActiveContent JavaScript library to embed Flash to my page. I'm passing a value to the Flash file via the query string (e.g., myflash.swf?animation=false) and in Flash when reading that value using gotoAndPlay() to jump to the last frame of the animation. I'm using ActionScript 3.

In Internet Explorer 8, and only IE, it works as intended. Unfortunately, no other browsers do this; they all show the full animation. The cookie is working correctly, but it's like Flash is totally ignoring the gotoAndPlay command.

Since I don't really know what I'm doing, I've probably done this wrong. Like I said, I know this is a longshot without posting gobs of code, but anyone have any ideas?

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

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

发布评论

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

评论(2

只是偏爱你 2024-07-30 01:26:36

由于您不太可能遇到 Flash bug,因此我认为您在每个浏览器处理将变量传递到嵌入中的想法方面遇到了差异。 虽然对于任何给定的浏览器来说这可能是可以修复的,但在每个浏览器中都有效的修复可能是很麻烦的(尤其是对于旧的浏览器)。 当然,在对所有内容进行测试之前,您永远不会真正知道自己是否安全。

查看 SharedObject< 会更加可靠/a>. SO 本质上是 cookie,只不过 Flash 播放器自行存储和检索它们,而不通过浏览器。 (它们也没有序列化,您可以只存储布尔值或其他值。)这回避了浏览器处理嵌入方式的任何差异。 这还意味着,即使查看者在 IE 中检查该网站,然后在 Firefox 中打开它,您仍然可以看出他们已经看过介绍。

Since it's unlikely you have a flash bug, I'd presume that you're running into differences in how each browser handles the idea of passing variables into embeds. While that's probably fixable for any given browser, a fix that works in every browser may be hairy (especially with older browsers). And of course you never really know you're safe until you test in everything.

It would be a lot more robust to look at SharedObject. SOs are essentially cookies, except that the Flash player stores and retrieves them itself, without going through the browser. (They're also not serialized, you can just store a Boolean or whatever.) This sidesteps any differences in how browsers deal with embeds. It also means that if even if a viewer checks the site in IE and then later opens it in Firefox, you can still tell they've already seen the intro.

勿挽旧人 2024-07-30 01:26:36

在我看来,flash 工作正常(因为它在 IE 中工作),但不知何故,参数没有从其他浏览器传递到 flash。 我建议在闪存中添加一些内容,以确保您确实获得了所需的参数。 然后在不同的浏览器中检查是否通过。

如果您可以发布用于嵌入 Flash 的 ActiveContent 调用,这将有助于查看将参数传递给 Flash 影片的方式是否有问题。

It seems to me the flash is working correctly (since it is working in IE), but somehow the parameter isn't passed to the flash from the other browsers. I suggest adding something in the flash to make sure you are actually getting the parameter you are expecting. Then check in the different browsers to see if it is getting passed.

If you could post the ActiveContent call you are using to embed the flash, that would help to see if there is anything wrong with how it is passing the argument to the flash movie.

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