# \[MX\] Multiple "IF" conditions?

**URL:** <https://forum.kirupa.com/t/mx-multiple-if-conditions/22387>\
**Category:** flash\
**Created:** [June 3, 2003, 4:36pm UTC](https://forum.kirupa.com/t/mx-multiple-if-conditions/22387 "2003-06-03T16:36:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith130](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@Keith130](https://forum.kirupa.com/u/Keith130)\
**Post date:** [June 3, 2003, 4:36pm UTC](https://forum.kirupa.com/t/mx-multiple-if-conditions/22387/1 "2003-06-03T16:36:39Z")

</div>

How can I put multiple conditions into an **IF** block? I have tried the following and it doesnt work ;

[AS]if(\_root.neo.hitTest(\_root.camera2)) & (camera2Off = true){[/AS]

I have also tried two **&'s** but that doesnt work ether

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 4:42pm UTC](https://forum.kirupa.com/t/mx-multiple-if-conditions/22387/2 "2003-06-03T16:42:25Z")

</div>

Your parenthesis are a bit off…  
[AS]if(\_root.neo.hitTest(\_root.camera2) && camera2Off == true){ }[/AS]

or

[AS]if(\_root.neo.hitTest(\_root.camera2) && (camera2Off == true)){ }[/AS]

This might work too…

[AS]if(\_root.neo.hitTest(\_root.camera2) && camera2Off){ }[/AS]

Note: When setting things to true or false you can use the variable name itself to check for true or !+variable name for false in an if statement… for example…

camera2Off = camera2Off is true  
!camera2Off = camera2Off is false
