mardi 26 mai 2015

How to access Movieclips individually in a for loop

Hi lets say that mySaveNewT.data.myNText = 20, and 20MovieClips(newText) are populated on stage, and when newText gets clicked i want to change the visibility to false.

  1. How do I reference each MovieClip thats get clicked, without having every MovieClip visibility = false????... i.e if ( MC[2], MC[10] gets clicked, but the rest aren't)

  2. and how do I push this into an Array???

Thank you!!!

    for (var i: Number = 0; i < mySaveNewT.data.myNText; ++i) {
            newText = new tbox();
            newText.x = -220;
            newText.y = -513 + i * 69 + 0 * 3.8;
            VWD.addChild(newText);
    }

Aucun commentaire:

Enregistrer un commentaire