9 Replies Latest reply on Mar 13, 2010 5:25 AM by Static1991

    For Loops  question

    Static1991

      hey there this should be an easy question i just can't find out how to wite the code

       

       

      atm i have something similar to this:

       

      for(i = 1; i<25; i++){

       

            if (_root.char.hitTest(_root.walli)){

            Wallcollison = true;

            } else {

            Wallcollision = false;

           }

      }   

       

       

      the code above may not be exactly what i have but my code is at Univeristy i hope you guys understand what i mean lol it doesn't work but what i want to happen is for the i value to change and for it to cycle through the WALL movieclips and do a hit test for each

       

      i = value 1

      hit test wall1

      i = value 2

      hit test wall2

       

      until all the walls have been hit tested. im mainly a C++ programmer at university doing a computer games course this is my first time using flash so be gentle with me lol  i can't believe how simple this problem seems but im unable to solve it due to a lack of knowledge in flash syntax

       

      thanks for you help guys