# For loop with 2 conditions?! stuck

**URL:** <https://forum.kirupa.com/t/for-loop-with-2-conditions-stuck/310382>\
**Category:** Uncategorized\
**Created:** [June 8, 2010, 8:48pm UTC](https://forum.kirupa.com/t/for-loop-with-2-conditions-stuck/310382 "2010-06-08T20:48:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbucker](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@humbucker](https://forum.kirupa.com/u/humbucker)\
**Post date:** [June 8, 2010, 8:48pm UTC](https://forum.kirupa.com/t/for-loop-with-2-conditions-stuck/310382/1 "2010-06-08T20:48:14Z")

</div>

Hi!

I need to perform some action within only one for loop, under 2 conditions, so I wrote something like this :

for(var i:Number=myVar1; (i\<myVar2 && i \<myVar3) || (i\>myVar2); i++){ …}

Well it seems Flash is running crazy when I’m compiling and firing this loop.  
Is there restriction or another way to write this ?

Thank you!
