Q:

Flash AS3 How to display a random item from an xml list then remove that item from the list so it will not be reused

I'm using Flash AS3 trying to display random questions from an xml list on stage. When the user clicks an option it should move on to another question but the one they got should be removed from the list so it will not come back.
I have the randomize part okay but can't figure out how to remove the question from the list.
Here is the section I have.
function randomizeQuestion():void {
    var numOfQuestions:Number = xmlData.item.length();
    var shuffledNumbers:Array = new Array(randomAns.length);
    var randomPos:Number = 0;

    //Randomizes selected question
    currentQuestion = int(Math.random() * numOfQuestions);

    //Randomizes answer numbers
    for (var i:int = 0; i < shuffledNumbers.length; i++)
    {
        randomPos = int(Math.random() * randomAns.length);
        shuffledNumbers[i] = randomAns.splice(randomPos, 1)[0];
    }

    randomAns = shuffledNumbers;

    correctAns = xmlData.item[currentQuestion].children().(hasOwnProperty("@correct"));
}

A:

Try to get index:
correctAnsIndex = xmlData.item[currentQuestion].children().(hasOwnProperty("@correct")).childIndex();

or if more elements, to get first one:
correctAnsIndex = xmlData.item[currentQuestion].children().(hasOwnProperty("@correct"))[0].childIndex();

then use delete where appropriate, like here:
delete xmlData.item[correctAnsIndex];

