sameera
sameera

Reputation: 11

Interaction between flex and iframe

I have a flex application and there is an Iframe(HTML code) inside the flex App. How do i trigger an event from Iframe and listen to it in flex app or call AS method in flex app from the JS in Iframe? I need to pass some info as well to the parent flex application.

Upvotes: 1

Views: 177

Answers (1)

Timur Koshel
Timur Koshel

Reputation: 179

You can use ExternalInterface (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html) for it.

For example, to call method try:

if (ExternalInterface.available) {
    ExternalInterface.call("myMethod", { id: 'somedataID' } );
}

Upvotes: 1

Related Questions