# Need Help with If statement

**URL:** <https://forum.kirupa.com/t/need-help-with-if-statement/329014>\
**Category:** flash\
**Created:** [July 13, 2012, 3:09pm UTC](https://forum.kirupa.com/t/need-help-with-if-statement/329014 "2012-07-13T15:09:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wortic](https://avatars.discourse-cdn.com/v4/letter/w/91b2a8/32.png) [@wortic](https://forum.kirupa.com/u/wortic)\
**Post date:** [July 13, 2012, 3:09pm UTC](https://forum.kirupa.com/t/need-help-with-if-statement/329014/1 "2012-07-13T15:09:54Z")

</div>

So, in my actions layer I have something like  
if (variable1 == true && variable2 == true)  
{ some stuff  
}  
variable1 and variable 2 are global variables.  
later on the same page  
I change the values of variable 1 and variable 2 to false.  
After that I set them to true again  
Also when I trace, I can clearly see that both are set to true again. However “some stuff” doesnt work for the second time. It only works on stage entrance. I tried using for, instead of if, didn’t make any difference.
