tags:

views:

281

answers:

2

My windows application hosts a Flex application via the IE ocx. I have a button on my flex canvas that when pressed should spawn the users default browser, open to his or her home page.

When the click handler looks like this it works fine:

 private function OnClickedInternetImage() : void
{
 var url:String = "http://stackoverflow.com";
 var request:URLRequest = new URLRequest(url);
 flash.net.navigateToURL(request);  // default browser instantiated, opens url
}

If url is a null string I expected that it would open the default browser to its default url, but instead the navigateToUrl statement is ignored.

I can pass an event from my flash canvas back to the hosting windows application, which knows how to spawn a browser to its default page, but that's a lot of trouble.

Is it possible for Flex 3 to spawn a new browser to the brower's default home page? If so, how?

A: 
navigateToURL(new URLRequest("about:blank"), "_blank");

Popup blockers etc. will get in the way though.

adam
A: 

Adam is closest, but Flash can't do what I want, I have to use the Windows api from the windows app that is framing my flash application.

Jim In Texas