So I have an array like so
var i:int;
for (i=0; i< points.length; i++) {
if (TotalScore >= points[i])
{
ach.scroll.content["ach"+i].text = "Unlocked";
ach.scroll.content["ach"+i].textColor = 0x9900cc;
}
}
That displays achievements on an interface.
But what I also want to do is display when an achievement is unlocked using a popup with another interface… results. The popup lets a player know they have unlocked an achievement without having to go to the achivements interface everytime. The popup must only display once until the next achievement is reached. The popup is set to ‘true’.
So …
I know it has something to do with nested loops. Somewhere in there I have to tell it to play the popup once prior to the results interface but still show each achievement as unlocked on the achievements interface.
I tried to add a new for loop but it either displays the popup every time or doesn’t show all the achievements when they are reached.