您如何使用 Flash 对象作为链接? [英] How do you use a flash object as a link?
问题描述
是否可以使用嵌入在 HTML 中的 Flash 文档作为链接?
Is it possible to use a flash document embedded in HTML as a link?
我试着像这样用 a
包裹 object
元素:
I tried just wrapping the object
element with an a
like this:
<a href="http://whatever.com">
<object ...>
<embed ... />
</object>
</a>
在 Internet Explorer 中,这使它像链接一样在状态栏中显示位置,但它不执行任何操作.
In Internet Explorer, that made it show the location in the status bar like a link, but it doesn't do anything.
我只有 .swf 文件,所以我无法在 ActionScript 中添加点击处理程序.
I just have the .swf file, so I can't add a click handler in ActionScript.
推荐答案
虽然对象确实应该响应被包装在 a href 标签中,但您可以在 vim 中打开 swf 并只放入一个 _root.onPress=function(){getURL("http://yes.no/");};
或者如果它是 AS3,像 _root.addEventHandler(MouseEvent.PRESS, function (e:event) {getURL("http://yes.no/");});
但是,如果编辑 swf 是您的路线,那么使用 一个工具.
Though the object really should respond to being wrapped in an a href tag, you could open the swf in vim and just throw in an _root.onPress=function(){getURL("http://yes.no/");};
or if it's AS3, something like _root.addEventHandler(MouseEvent.PRESS, function (e:event) {getURL("http://yes.no/");});
But if editing the swf is your route, you'd likely have more success with a tool for the purpose.
这篇关于您如何使用 Flash 对象作为链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!