I don't know if this is the best way to do this, but this seems to work:

private function OpenListings():void{
     var listingData:Array=/*an array of links*/;
     ExternalInterface.call("openURLs",listingData);
}

And a function in Javascript in the wrapper:

function openURLs(urls){
        for(i=0;i<urls.length;i++){
                window.open(urls[i],'_blank');
        }
}

I think the reason you can't have multiple navigateToURL's in the same
function because of the way the HTTPService call works.

-Chris


--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> wrote:
>
> Try iterating through the array elements:
> 
> private function OpenListings():void{
>     var listingData:Array=/*an array of links*/;
>     for (var i = 0; i < listingData.length; i++){
>         navigateToURL(new URLRequest(listingData[i]),'_blank');
>     }
> }
> 
> 
> --- In flexcoders@yahoogroups.com, "Chris Waguespack" 
> <cjwprostar@> wrote:
> >
> > I'm trying to make a link button that opens multiple links in
> > different windows/tabs.
> > Right now I have click calling this function
> > 
> > private function OpenListings():void{
> >      var listingData:Array=/*an array of links*/;
> >      var link:String=new String();
> >      for each(link in listingData){
> >           navigateToURL(new URLRequest(link),'_blank');
> >      }
> > }
> > 
> > This only opens the last link in the array. Is there any way to 
> open
> > more than one link at once?
> > 
> > Thanks,
> > Chris
> >
>








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to