looping through an Array to change visibility of MC
Hey to anyone , lets say i have a for() loop that creates an instance of a movieClip newText, which contains textfields inside that get pushed through an Array, and are displayed again by the array when my app is reinitiated.
and in newText i also have a button inside that deletes the information(options), and when that button is pressed another MC(delete) pops up over newText.
What is my best approach to check if this button has been pressed? should i create another Array that passes "true" to the Array, and check if ( arrayCheck["???"] == true) { what do i do here};...etc i'm lost.
because i want to make MC(delete) visibility = true; when the app is reinitiated for the instances of newText, when (options) button has been clicked; any ideas would be highly appreciated????
BELOW IS MY FOR LOOP I HAVE ALREADY
________________________________________________________________________________________________________________________________________________________________________________
var kellog: Number = -5;
//this variable sets in Array index at 1
var general: Number = -1;
for (var i: Number = 0; i < mySaveNewT.data.myNText; ++i) {
newText = new tbox();
newText.x = -220;
newText.y = -513 + i * 69 + 0 * 3.8;
kellog += 6; // this places each array index at the correct textfield in newText
kellogs += 6; // this places each array index at the correct textfield in newText
trace(kellogs, " total cereal");
newText.CN.text = String(unwrap.mySaveData.data.myDataArray[kellog]);
newText.DF.text = String(unwrap.mySaveData.data.myDataArray[2 + kellog + general]);
newText.Ad.text = String(unwrap.mySaveData.data.myDataArray[3 + kellog + general]);
newText.PN.text = String(unwrap.mySaveData.data.myDataArray[4 + kellog + general]);
newText.tap.text = String(unwrap.mySaveData.data.mynText[kellogs]);
newText.tip.text = String(unwrap.mySaveData.data.mynText[kellogs + generals]);
newText.OT.text = String(unwrap.mySaveData.data.myDataArray[5 + kellog + general]);
VWD.addChild(newText);
myDataArrayInProgram = unwrap.mySaveData.data.myDataArray;
myNTextAddition = unwrap.mySaveData.data.mynText;
}
