« A Major Brightcove.com Update | Main | CBS and More from Brightcove »

Using Multiple IFrames With Flex

If you're looking for a way to get multiple HTML pages in a Flex application without using Apollo, check out this code. It's an update to the Embedding HTML code which allows multiple iframes in a page. I haven't tested it myself, so let me know if there's any issues with it. I would give credit for the update to the code, but the person who wrote it is being humble and asked not to be mentioned. So you can just thank me instead. :)

Comments (8)

Thanks for the update.

The code works really well when switching between tabs now.

One thing I noticed though is that if you move around the components, the IFrame is hidden, but never made visible again. I see the event -
Event.REMOVED_FROM_STAGE is registered, but there does not seem to be one for when the parent component is automatically added back to the stage.

Any ideas?

Mohamed:

Just run into your problem by accident... try putting each iframe component inside a canvas component.

Josh:

I ran into a problem using the Iframe under HTTPS and using Firefox.

If you have any listboxes in your application with multi select = true then they wont work. I havent fully pinpointed the issue to the Iframe, but i have definitely pinned it down to the wrapper i am using which so far the only odd thing about it is the iframe code additions.

Has anyone else ran into this?

This update is great. I am using the IFrame for a news reader because of the html limitations of the Flash Player. One problem I did find is that I have to "manually" remove the IFrame when scrolling through a list of of stories using a next/previous button.

Hello Brian,

I have been using your code for a while now. I wanted the original component to be more encapsulated so I have created a modified version.

You can download the code from the demo:

http://ccgi.arutherford.plus.com/website/flex/iframe/HTMLTest/

On my website I have written a little about this:

www.netthreads.co.uk.

All the best
Alistair.

Sean:

Yes, your IFrame is great. However mine does not work in FireFox either ...

Does anyone know how to fix this ?

Regards,
Sean.

richard:

Great component. I have a quick question. I can only get to work if i use a tab control I cannot get it to render on a panel or canvas.

Thanks for the help

Richard

Raymond:

Hi Richard,

I have exactly the same problem.
I like the IFrame component but I would verry much like to use it without the tabs. For example using a canvas or panel.

Can anyone please provide an example how to do this ?

thnx,
Raymond