0
votes

I have two flex applications Main.mxml(where I have a button called loadDataViewer) and ViewData.mxml. What I want is when the user press the loadDataViewer button, the application ViewData.mxml will open in a new window. Is there any way to do it in Flex?

SWFLoader class looks interesting but I think it will load the other appliation inside the Main application which I don't want. I also saw that there is ExternalInterfaceAPI which can be used to open a url browser but not sure if I can reference the swf file of VewData application. As suggested here( http://learn.adobe.com/wiki/display/Flex/Local+Connections ) that LocalCOnnection can be used to reference one flex application in another but that's only when both applications are open I guess. Any suggestion to guide me to the right direction wouild be greatly appreciated.

2

2 Answers

3
votes

You could embed your viewData swf to an HTML file, and either do any of the following:

Call External Interface...

var url:String = 'myViewData.html';
ExternalInterface.call('window.open("' + url + '")');

or

Call the navigateToURL method...

var url:String = 'myViewData.html';
var urlReq = new URLRequest(url);
navigateToURL(urlReq,'_blank');
-1
votes