3 Replies Latest reply on Jun 4, 2009 6:16 PM by Michael Borbor

    Problem using the navigateToURL() method




      I am trying to use the Opening multiple windows with the navigateToURL() method example


      http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=passingarguments_086_12.html


      this is the code:


      <?xml version="1.0"?>
      <!-- wrapper/NavigateToMultipleURLS.mxml -->
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="openWindows(0)">
           import flash.net.navigateToURL;
           private var listingData:Array=[
           private function openWindows(n: Number):void {
              if (n < listingData.length) {
                 navigateToURL(new URLRequest(listingData[n]), '_blank');
                 callLater(callLater, [openWindows, [n+1]]);


      but i am using a datagrid and an ArrayCollection as data provider then i select one or more rows where i have an url that i want to open:


      private function Abrir_Documento(intNumero:Number):void
        var strRuta:String; 
        var url:URLRequest;
        if (intNumero < dg_Documentos.selectedItems.length)
          strRuta = dg_Documentos.selectedItems[intNumero].DOC_RUTA;   
          url = new URLRequest(strRuta);
          navigateToURL(url, '_blank'); 
          callLater(callLater, [Abrir_Documento, [intNumero + 1 ]]);


      the problem is when i select 2 or more rows i only get open all the url except one, for example if i select 3 rows it only opens 2, if i select 4 it only opnes 3 and so on.


      I really dont know why is this happening, i am using IE7 i dont know if this has something to do with it.


      I hope someone could help me