Avg. Rating 4.7

Problem

Opening external html in a pop-up using navigateToURL or ExternalInterface opens a new browser window. Once the window is open your Flex app has no control over it. Instead you need to be able to control the pop-up within your Flex application.

Solution

Use Flex-iFrame and TitleWindow to pop-up external html that can be controlled by Flex.

Detailed explanation

I wanted to be able to have complete control over any HTML information I pop-up from my Flex 3 application. Using navigateToURL or ExternalInterface opens a new browser window and once that window is opened, my Flex application had to control over that window.

I created a simple example using Flex-iFrame and a TitleWindow to open external HTML information with Flex 3, and still have complete control over the window that pops-up.

In the example, I just pop-up the window. But additional benefits are that you can close the pop-up with the view that you popped it up with, and style it to match the rest of your application.

Demo: http://www.brentlamborn.com/examples/popup/

Source: http://www.brentlamborn.com/examples/popup/srcview/index.html

 NOTE:  As I posted this, I noticed Firefox 3 and Opera have trouble rendering the content inside the pop-up. IE and Chrome work ok. I will check into this and get the sample fixed.

Brent Lamborn

Report abuse

Related recipes