views:

108

answers:

2

I know Silverlight has this capability, and I have no experience in Flash Development - I need a Flash application to read data in a hidden div on the host page.

Can this be done?

+2  A: 

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

steamer25
+2  A: 

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

Justin Niessner
I believe in AS2 `fscommand` provides a similar functionality.
Amarghosh
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://media.varheroes.com/flash/flashtest.swf cannot access http://apps.facebook.com/feline-frenzy/flashtest/. at flash.external::ExternalInterface$/_initJS() at flash.external::ExternalInterface$/addCallback() at flashtest_fla::MainTimeline/frame1()
Fahim Akhter
@Fahim - That's a cross domain security issue. Do a little googling...or ask another question here on SO.
Justin Niessner
apps.facebook.com does not provide a crossdomain.xml
Fahim Akhter