如何列出一个Flash元素暴露提供回调回调、元素、Flash

2023-09-09 21:28:18 作者:{.难!产

有没有一种方法来查询一个嵌入式Flash元素,以确定可以在其上通过JavaScript执行的有效方法?

Is there a way to query an embedded flash element to determine the available methods that can be executed on it via JavaScript?

编辑: 目前看来,在IE浏览器这么简单

It appears that in IE it's as simple as

for ( i in flashNode ) {
    alert(i);
}

在很多点击,它们会出现一些列举的最后成员。

After much clicking, they will be some of the very last members enumerated.

仍然无法在Firefox确定这虽然。

Still not able to determine this in Firefox though.

推荐答案

虽然可以通过枚举得到回调<对象>在IE DOM节点,它们混合在使用DOM节点的所有其他的属性和它们不能是不保持已知属性的列表,以它们免受比较,然后采取两组的差异progamatically区分。

While it is possible to get the callbacks by enumerating the <object> DOM node in IE, they are mixed in with all the other properties of the DOM node and they are unable to be progamatically distinguished without keeping a list of known properties to compare them against and then taking the difference of the two sets.

这个方法是有问题的,因为性能可以任意添加到任何DOM节点。更糟的是,它只能在IE浏览器。火狐(也可能是其他人)不返回回调作为一个属性&LT;对象&gt; DOM节点

This approach is questionable since properties can be arbitrarily added to any DOM node. Worse, it only works in IE. Firefox (and possibly others) does not return callbacks as a property of the <object> DOM node.