告诉 swf 检查其加载的页面并切换到正确的页面

发布于 2024-07-19 18:22:02 字数 132 浏览 3 评论 0原文

Google 已对我的 .swf 文件建立索引,因此它会在浏览器中自行加载 ( example.com/FL_map_page.swf )

我需要 .swf 检查它是否已加载到 .html 页面上,如果没有则切换到正确的页面。

Google has indexed my .swf file, so it’s loading by itself in a browser
( example.com/FL_map_page.swf )

I need for the .swf to check to see if it is loaded on the .html page and if not switch to the correct page.

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

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

发布评论

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

评论(2

初熏 2024-07-26 18:22:02

您的意思是有人热链接您的swf 文件或者它只是在没有页面的情况下加载? 您可以使用 javascript 创建一个桥,以便除非您从页面加载 javascript,否则 swf 不会执行。 您还可以避免使用 javascript 并使用网站后端(PHP 或其他)生成的 flashvar 来进行此检查。 您可以尝试将浏览器重定向到该页面,并简单地显示应该查看的页面的 URL,以防重定向失败。

You mean someone is hot linking your swf file or it's just being loaded without the page? You could create a bridge with javascript so that the swf doesn't execute unless you load the javascript from the page. You could also avoid using javascript and use flashvars generated by your web site's backend (PHP or whatever) to make this check. You can attempt to redirect the browser to the page and simnply show the URL to the page where it is supposed to be viewed in case the redirect fails.

在你怀里撒娇 2024-07-26 18:22:02

使用 ActionScript 检查页面 url;

import flash.external.*;
var url;

function getURL() {
    url = ExternalInterface.call("window.location.href.toString");
}

Check the page url with ActionScript;

import flash.external.*;
var url;

function getURL() {
    url = ExternalInterface.call("window.location.href.toString");
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文