1 Reply Latest reply on Dec 19, 2006 2:50 PM by cinemaguy

    XML and Array issue

      I've created an array that loads data from an XML file. Now, when a button is pressed I want this array to delete all previous elements found in the array and add new elements coming from the same XML file. So I created a function called arrayUpdate, here it is...

      function arrayUpdate():Void{
      myArray.splice(myArray.length);
      }

      When the button is pressed it first calls this arrayUpdate function and then calls the other function which loads the specific data from the XML file. But I can't get it to work. It just keeps adding new data to the old data. Did I do something wrong here?