开发者

Can a Flash Application read the host page's DOM?

开发者 https://www.devze.com 2022-12-09 04:43 出处:网络
I know Silverlight has this capability, and I have no experience in Flash Development - I need a Flash applicati开发者_开发百科on to read data in a hidden div on the host page.

I know Silverlight has this capability, and I have no experience in Flash Development - I need a Flash applicati开发者_开发百科on to read data in a hidden div on the host page.

Can this be done?


At the least, you could use the ExternalInterface to get stuff via JavaScript.


Yes. In Actionscript 3 (not sure about 2) you can use the ExternalInterface object to execute any Javascript against the DOM of the page your Flash app is placed on.

ExternalInterface also gives the Javascript on your page the ability to call functions in your Flash app.

ExternalInterface - ActionScript 3.0

0

精彩评论

暂无评论...
验证码 换一张
取 消