I have this movie that where you go to a random-frame.
If you answer right that frame is removed from the Array.
If you answer wrong the frame stayes in the Array.

It works well but there seems to be one problem.
Every time you come to frame 2 first. But even if you answer right on that question that frame comes back again. And it should not.

Here is the code outside the Randomframe-movie:

var Nummer = new Array(2, 3, 4, 5, 6, 7);
var isCorrect = true;
var currNum;

function randomNum() {
if (Nummer.length == 1) {
if (!isCorrect) {
return currNum;
} else {
if ( bra == 5){
return 8;
}
if ((bra >= 6) && (bra <=14)) {
return 11;
}
if (bra >= 15){
return 15;
}
}
}
var newNum = Nummer.splice(random(Nummer.length), 1);
if (!isCorrect && currNum != undefined) {
Nummer.push(currNum);
}
currNum = newNum;
return newNum;
}
//////

And the on the Random-frames looks like this:

t1.onRelease = function() {
_parent.isCorrect = true;
gotoAndStop(_parent.randomNum());
spelaUPP("bra");
_parent.bra++;
trace("numbers left:" + _parent.Nummer + "tryck:" + _parent.bra);

};
/////
function fel(a){
a.onRelease = function() {
_parent.isCorrect = false;
gotoAndStop(_parent.randomNum());
spelaUPP("fel");
_parent.bra++;
trace("numbers left:" + _parent.Nummer + "tryck:" + _parent.bra);
}
};
/////
fel(f1a);
fel(f1b);
fel(f1c);
///

Anyone who see the error?