I am trying to make a function happen when three movie clips have particular x and y functions, (so it is tested on 6 values) on flash AS3. From my time using game maker, I am pretty sure the if function is what I should use, but I don't know any more than that. Help please!
That is assuming that your movieclips are named mc1, mc2, and mc3. Just change the 10 to any value. Also, if is not a function, it is a comparison. Neither are x or y, they are values.
so actually using parenthesis does make a difference in the way that the statement is interpreted. for example:
if( (x==1 && y==1) && z==1 )
in this condition, if if BOTH x=1 AND y=1 the first part results in true - so all of the arguments in this statement must result in true however:
if( (x==1 || y==1) && z==1 )
in this condition, if EITHER x=1 OR y=1 the first part results in true - so in this case the first part of the condition is only dependent on one of the two values being true.
by surrounding the arguments with parenthesis you are in effect creating a 'sub-condition' or really just an evaluation of the statements inside the parenthesis - actually the 'if' isn't even necessary, try this sometime:
var n:int=1; trace( (n==1) );
the result of the operation is true - no IFs, ands or butts (lol)