Problem using the navigateToURL() method


hi,

 

i trying use opening multiple windows 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 code:

 

<?xml version="1.0"?> <!-- wrapper/navigatetomultipleurls.mxml --> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" creationcomplete="openwindows(0)">   <mx:script><![cdata[      import flash.net.navigatetourl;      private var listingdata:array=[         "http://www.google.com",          "http://www.adobe.com",          "http://www.usatoday.com"      ];       private function openwindows(n: number):void {         if (n < listingdata.length) {            navigatetourl(new urlrequest(listingdata[n]), '_blank');            calllater(calllater, [openwindows, [n+1]]);         }      }   ]]></mx:script>    </mx:application> 

 

but using datagrid , arraycollection data provider select 1 or more rows have url want 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 when select 2 or more rows open url except one, example if select 3 rows opens 2, if select 4 opnes 3 , on.

 

i dont know why happening, using ie7 dont know if has it.

 

i hope me

 

thanks!

has un debug o un trace de la variable intnumer. esta empieza en cero? donde

le cambias el valor?



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???