# OR Operator with the IF Conditional

**URL:** <https://forum.kirupa.com/t/or-operator-with-the-if-conditional/326720>\
**Category:** random\
**Created:** [January 7, 2012, 2:32am UTC](https://forum.kirupa.com/t/or-operator-with-the-if-conditional/326720 "2012-01-07T02:32:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jimpi](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@Jimpi](https://forum.kirupa.com/u/Jimpi)\
**Post date:** [January 7, 2012, 2:32am UTC](https://forum.kirupa.com/t/or-operator-with-the-if-conditional/326720/1 "2012-01-07T02:32:14Z")

</div>

[COLOR=#333333][FONT=Verdana]I am making a game in Adobe Flash Professional CS5 Using AS3. You have to click each one of eyes on a face and they will each turn into crosses. All 4 different eyes are movie clips. I have 3 different mouths that are also movie clips and am trying to make it so that when both eyes are normal his mouth is smiling, when one (either right or left) eye is a cross he has a straight mouth, and when both eyes are crosses the face has a sad mouth. I am stuck trying to use the IF conditional with the OR operator to make it so that no matter what eye you click, as long as one is a cross the face will have a straight mouth. I have tested it and it looks like the error is line 21 (in bold).[/FONT][/COLOR]

Eye1 is the left normal eye  
Eye2 is the right normal eye  
Eye3 is the left cross eye  
Eye4 is the right cross eye  
Mouth1 is the smile mouth  
Mouth2 is the straight mouth  
Mouth3 is the sad mouth

[COLOR=#333333][FONT=Verdana]Here is my code so far:

[/FONT][/COLOR]

```auto
Eye3.visible = false;
Eye4.visible = false;
Mouth2.visible = false;
Mouth3.visible = false;

Eye1.addEventListener(MouseEvent.CLICK, fl_ClickToHide);

function fl_ClickToHide(event:MouseEvent):void
{
    Eye1.visible = false;
    Eye3.visible = true;
}

Eye2.addEventListener(MouseEvent.CLICK, fl_ClickToHide_1);

function fl_ClickToHide_1(event:MouseEvent):void
{
    Eye2.visible = false;
    Eye4.visible = true;
}

if (Eye1.visible == false || Eye2.visible == false){
Mouth1.visible = false;
Mouth2.visible = true;
}

```
