2 Replies Latest reply on Feb 15, 2010 2:02 PM by kglad

    Simple script causes FlashPlayer10 to run slowly - why?

    uomodicuore2

      Hi,

      I'm loading 6 variables from a text file to populate an array, then using setInterval to populate two textfields every 5 seconds.  IE7 gives me the "A script in this file is causing Flash Player 10 to run slowly do you want to abort this script?"

       

      It runs fine locally, but when I upload it, it won't work. Files are in the same folder in each case.

       

      Here is the entire script.  Is there anything I can do?

       

      stop();
      //Load the external data
      names=new LoadVars();
      names.load('donordb.txt');
      names.onLoad=function(){
      d= new Array();
      e= new Array();
      donorCount=names.donorCount; //count of how many donors there are in the donordb.txt file
      for(j=0;j<=donorCount;j++){ //loop only the necessary amount of times

       

      d[j]=names["d"+j];        //donor variables
      e[j]=names["e"+j];   //text on the brick variables
      }   //end for loop
      numTake=0; //start the interval on the right number
      donorRotation=function(){
      numTake++;  //increment through the donor names
      brick.brickText.text=e[numTake];
      brick.donorText.text="Donated by:\n"+d[numTake];
      if(numTake==donorCount){
        numTake=0; //reset the number
      }//end if numTake loop
      }//end donorRotation function
      startRotation=setInterval(donorRotation,5000);  //call the function every 5 seconds
      }//end onLoad function

       

      Thanks everyone!

      -Mark