# Loop logic problem

**URL:** <https://forum.kirupa.com/t/loop-logic-problem/159687>\
**Category:** flash\
**Created:** [August 19, 2005, 9:55am UTC](https://forum.kirupa.com/t/loop-logic-problem/159687 "2005-08-19T09:55:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ozeona](https://avatars.discourse-cdn.com/v4/letter/o/cab0a1/32.png) [@Ozeona](https://forum.kirupa.com/u/Ozeona)\
**Post date:** [August 19, 2005, 9:55am UTC](https://forum.kirupa.com/t/loop-logic-problem/159687/1 "2005-08-19T09:55:03Z")

</div>

Hi

i currently having a problem of looping in flash. When i try to use an “if else” to compare 2 arrays like

```auto
if (array1* == array2*) {} else{}

```

, it only check the one that has similar array. Since im not sure if its understood , its something like this now.

![](http://host.picturewizard.com/2005-6/319193/0.gif)

However, i want it to be able to check through every element in the second array. Like…

![](http://host.picturewizard.com/2005-6/319193/1.gif) ![](http://host.picturewizard.com/2005-6/319193/2.gif)

Im sure theres codes for this…unless im much mistaken but i could not think of it.
