« Invite-free Aftermix on Brightcove.TV | Main | I'm doing Javascript work now »

HTML in Flex (Without the Extra HTML)

Alistair Rutherford has extended the existing component for displaying HTML in Flex, and unlike the previous work by Christophe and me, this component only needs one simple HTML change, handles multiple HTML windows, and figures out the visibility automatically. Great work that you can read about, see an example, or get the source.

Comments (14)


Yes, without extra HTML but looks like it works only on IE.


How can you prevent this to take over your Flex app:

if (top.location != self.location) {
top.location = self.location.href;


I'm trying to add an iFrame to a vbox in a using the addchild method,
then adding that vbox to a tabnavigator(again using addchild method) but doesnt seem to work....
do you have an example of add your iframe using addchild??

code as follows;
private function addTabItem(parent:DisplayObjectContainer, tabTitle:String, URLSource:String):void{

var xitem:VBox = new VBox;
xitem.label = tabTitle;
xitem.name = tabTitle;
xitem.id = tabTitle;
xitem.height = parent.height;
xitem.width = parent.width;

var itemFrame:IFrame = new IFrame;

itemFrame.id = 'fr_' + parent.numChildren + 1;
itemFrame.name = 'fr_' + parent.numChildren + 1;
itemFrame.source = URLSource;
itemFrame.height = xitem.height-30;
itemFrame.width = xitem.width - 30;
itemFrame.x = xitem.x+30;
itemFrame.y = xitem.y+30;


dantheman, All_Done, and Kevin, I would go to Alistair's web site and ask him about the code, as I'm assuming these questions are all about his version of the iframe work. I'd also check out his site for newer versions, as I have seen a couple blog posts on his site about iframes.


How can we make the same work on a Popup?


Hi I use flex with java and IFrame don't work on firefox but on IE works fine. Help me.

Frank Gadeia:

I've found a bug on scrolling the container, the iframe did not move with the container. I've solved adding the event listener below to the constructor.

public function IFrame()


So I got another bug, the width of the container is the width of the iframe, but the visible width inside the scrolling container is different, I only need to get the visible width and that should do the trick. When I discover how to do that I post here.


when i download the source of the iframe project and imported in the flex builder and when i run the project its not working. i am not able to see any tab or any thing. Can any body help me in sloving this issue Please!


I have the same problem that Balu. I'm using Flex 3 and when I compile an run, the iframe content doesn't apear.

Dear sir..
thanks for great posting when i download the source of the iframe project and imported in the flex builder and when i run the project its not working. i am not able to pages. Can any body help me in sloving this issue Please!thanks in advance...guide me is there any additional file or modification is required...thanks.........


hi, thanks for the great work. the iframe positioning is broken in ie8. any plans for a fix?

I am having an issue where everythings working fine when running it from flex but if you export it or run it outside of the bin-debug folder nothing except the background loads. Any suggestions? i'm sure it must be something simple.



It seems the link provide is broken..Could you provide the new link to download the source because I really really need to use the IFrame into my project..

Ben Beckman:

Is it possible to do that without any Html code?

Respond please.