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 (4)
Yes, without extra HTML but looks like it works only on IE.
Posted by dantheman | October 1, 2007 8:37 AM
Posted on October 1, 2007 08:37
How can you prevent this to take over your Flex app:
if (top.location != self.location) {
top.location = self.location.href;
}
Posted by All_Done | October 5, 2007 12:37 PM
Posted on October 5, 2007 12:37
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;
itemFrame.setVisible(true);
xitem.addChild(itemFrame);
parent.addChild(xitem);
}
Posted by Kevin | December 30, 2007 12:42 AM
Posted on December 30, 2007 00:42
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.
Posted by Brian Deitte | January 1, 2008 1:03 PM
Posted on January 1, 2008 13:03