3 Replies Latest reply: Mar 3, 2010 11:12 PM by kglad RSS

    or statement inside hitTestObject()? in Flash CS4 (AS3)

    Me2LoveIt2 Community Member

      Hi again,

       

      I encountered yet another problem i would like to know more about. In my project I have a line of code which looks like this:

       

      if(my_mc_0.hitTestObject(my_mc_1 || my_mc_2));

      I assumed it would read like this: If my_mc_0 hits(graphically) my_mc_1 OR my_mc_2 it will execute the code of the if statement.

      BUT that's not true it executes as though it is written like this: if(my_mc_0.hitTestObject(my_mc_1));

       

      Is this a syntax error or not possible or only possible in a different method? ...maybe there is a different function?

       

      Thank you for any help.