# OR in an if function!?

**URL:** <https://forum.kirupa.com/t/or-in-an-if-function/271400>\
**Category:** flash\
**Created:** [September 22, 2008, 7:08pm UTC](https://forum.kirupa.com/t/or-in-an-if-function/271400 "2008-09-22T19:08:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![odiecreversed](https://avatars.discourse-cdn.com/v4/letter/o/43a26b/32.png) [@odiecreversed](https://forum.kirupa.com/u/odiecreversed)\
**Post date:** [September 22, 2008, 7:08pm UTC](https://forum.kirupa.com/t/or-in-an-if-function/271400/1 "2008-09-22T19:08:55Z")

</div>

What do you put in an if function for ‘or’ (|)? I thought it’d be kinda the same as you write an and if function, like ‘&&’.

```auto

if ((mouseY>mc1.x) | (Math.random()>0.5){
trace("Whoohoo!")
}

```

Any ideas? C:-)
