告诉 swf 检查其加载的页面并切换到正确的页面
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的意思是有人热链接您的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.
使用 ActionScript 检查页面 url;
Check the page url with ActionScript;