通过 Flash 跟踪设置区域内的鼠标按下坐标

发布于 2024-07-16 02:35:54 字数 425 浏览 6 评论 0原文

我的页面有一个全屏 Flash 对象,带有居中的固定内容区域(其余背景)。

在不接触 Flash 源的情况下,我想添加“链接”来设置内容区域内的位置来运行脚本(例如 ajax、事件跟踪) - 类似于图像映射。

需要: - 任何页面点击都会将点击的 x/y 坐标与查找表进行比较,如果坐标位于“链接”区域内,则运行脚本 - 记住坐标是 Flash 中的固定内容区域,与浏览器无关。 Flash 动画和交互性仍能正常工作吗?

尝试过的选项:

  • 设置 flash wmode=transparent 并放置一个包含覆盖活动区域的链接的 div 这在 IE 中有效,但 Firefox 会禁用 div 层下 Flash 文件的交互性

My page has a full screen flash object with a centered fixed content area (the rest background).

Without touching the flash source, I want to add "links" to set places within the content area to run script(s) (eg. ajax, event tracking) - similar to an image map.

Needed: - any page click compares the clicked x/y coordinates to a lookup table and if coordinates are within a "link" region, run a script - remember the coordinates are of the fixed content area within flash, not relative to the browser. will the Flash animation and interactivity still work as normal?

Options tried:

  • set flash wmode=transparent and place a div containing links covering active area
    This works in IE but Firefox disables the interactivity of the Flash file under the div layer

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

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

发布评论

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

评论(1

欲拥i 2024-07-23 02:35:54

AFAIK Internet Explorer 是唯一允许透明内容下的元素接收点击事件的浏览器,因此图像映射不起作用。

我不相信有办法完成你想做的事情。

不过,如果您可以编辑 Flash 源,您可以在那里捕获事件,然后通过ExternalInterface 将单击的坐标发送到 javascript。

AFAIK Internet explorer is the only browser that allows click events to be received by elements under transparent content, so an image map won't work.

I do not believe there is a way to accomplish what you are trying to do.

Though, If you could edit the flash source you could capture the event there and then send the coordinates of the click to javascript through ExternalInterface.

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