View Full Version : [MX] Multiple "IF" conditions?
Keith130
June 3rd, 2003, 12:36 PM
How can I put multiple conditions into an IF block? I have tried the following and it doesnt work ;
if(_root.neo.hitTest(_root.camera2)) & (camera2Off = true){
I have also tried two &'s but that doesnt work ether
lostinbeta
June 3rd, 2003, 12:42 PM
Your parenthesis are a bit off.....
if(_root.neo.hitTest(_root.camera2) && camera2Off == true){ }
or
if(_root.neo.hitTest(_root.camera2) && (camera2Off == true)){ }
This might work too...
if(_root.neo.hitTest(_root.camera2) && camera2Off){ }
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
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.