8 Replies Latest reply on Jul 13, 2009 1:32 PM by robsteven192

    controlling multiple symbols in as2


      I am making pacman in as2 for fun, and I was wondering how to get multiple pellet mc'  hittest to work. I tried to do a for loop that went through each of the pellets by number i.e. pellet[i] in a for loop with each pellet being number pellet1 pellet2 pellet3 so on... I tried putting it in the first frame of the fla both in an enter frame function and just by itself.

           Is there anytway to get a for loop to work like that or would you reccomnd some other way of doing each pellet?



      with (_root) {
              for (i=0; i>=3; i++) {
                  if (pacman.hitTest(ball[i])) {
                      ball[i]._x = -5;
                      score += 10;