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.
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
How can we make the same work on a Popup?
Posted by Steve | August 27, 2008 10:08 PM
Posted on August 27, 2008 22:08
Hi I use flex with java and IFrame don't work on firefox but on IE works fine. Help me.
Posted by Daniel | September 16, 2008 4:36 PM
Posted on September 16, 2008 16:36
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()
{
super();
this.addEventListener(Event.RENDER,
function(e:Event):void{moveIFrame();}
);
}
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.
Posted by Frank Gadeia | October 8, 2008 10:42 AM
Posted on October 8, 2008 10:42
Hi,
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!
Posted by balu | January 5, 2009 8:48 AM
Posted on January 5, 2009 08:48
I have the same problem that Balu. I'm using Flex 3 and when I compile an run, the iframe content doesn't apear.
Posted by Leo | January 7, 2009 10:27 AM
Posted on January 7, 2009 10:27
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.........
Posted by Rajeev kumar | March 25, 2009 7:10 AM
Posted on March 25, 2009 07:10
hi, thanks for the great work. the iframe positioning is broken in ie8. any plans for a fix?
Posted by Z | May 2, 2009 11:40 AM
Posted on May 2, 2009 11:40
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.
Posted by Gamesaddict 5 | April 28, 2010 3:43 AM
Posted on April 28, 2010 03:43
Hi..
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..
Posted by Isslah | October 25, 2010 9:44 PM
Posted on October 25, 2010 21:44
Is it possible to do that without any Html code?
Respond please.
Posted by Ben Beckman | December 10, 2010 7:09 AM
Posted on December 10, 2010 07:09