I have a very large XML file which has like 40000 data, and when I try to load the XML using Actionscript3, and then populate the data into an Array, I get the following Error:
A script has executed for longer than the default timeout period of 15 seconds.
Is there a way to bypass this timeout issue? Here is the sample XML
<Map>
<Data>0</Data>
<Data>1</Data>
<Data>2</Data>
<Data>3</Data>
// continue for many many times
<Data>39999</Data>
</Map>
The line break seems to be at the for loop. The code is like this
var aNumberArray:Array = new Array( 200 * 200 );
var nRowIndex:int = 0;
for ( ; 200 > nRowIndex; ++nRowIndex ) {
var nColumnIndex:int = 0;
for ( ; 200 > nColumnIndex; ++nColumnIndex ) {
var nIndex:int = nColumnIndex + nRowIndex * 200;
// assume cXMLMap is already a pre read XML class
aNumberArray[ nIndex ] = new int( cXMLMap.Data[ nIndex ] );
}
}
I am suspecting that the cXMLMap.Data[ nIndex ] is taking alot of time to get the variable from the XML.
Please advice.