How do I create a popup from Flex without a browser toolbar?

4.1k Views Asked by At

I'm trying to launch a popup window from Flex, but the popup window needs to have certain properties as one can usually specify with the JavaScript window.open. For example, the popup window should not have a browser toolbar or URL box.

I've tried using navigateToURL, which works fine, but I can't find a way to specify the popup window properties.

I've tried using ExternalInterface.call, but the popup gets blocked when calling window.open directly, or even creating a custom JS function that calls window.open.

Help!

Thanks!

3

There are 3 best solutions below

2
On

I don't think it's even possible to disable the browser toolbar or URL box in a lot of browsers (I certainly do not allow it on any of the browsers I use).

If you're using navigateToURL, why can't the page you're opening run the JS to try to disable the toolbar and URL? I think you can also attach attributes to the URL if you wanted to send properties over.

1
On

You can use PopUpManager class of Flex for creating custom pop up box.

This example may help you. Custom PopUp

0
On

Check out AndrewT's blog about checking for popup blockers. If not blocked, then use ExternalInterface; otherwise use the flex popup.

Detecting Popup Blockers

Or better yet, use SWFAddress v2.3 (javascript and AS3) modules. The AS3 has SWFAddress::popup() facade that proxies the poup call to the javascript. You can modify the SWFAdress.js popup function to use Andrew's logic and return a status. This would be a best practice: leveraging superlative SWFAddress library from flex for deeplinking, google analytics, and popups.