# Strange If statement responce

**URL:** <https://forum.kirupa.com/t/strange-if-statement-responce/286372>\
**Category:** flash\
**Created:** [April 14, 2009, 5:20pm UTC](https://forum.kirupa.com/t/strange-if-statement-responce/286372 "2009-04-14T17:20:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mavoric](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@mavoric](https://forum.kirupa.com/u/mavoric)\
**Post date:** [April 14, 2009, 5:20pm UTC](https://forum.kirupa.com/t/strange-if-statement-responce/286372/1 "2009-04-14T17:20:08Z")

</div>

I’ve worked out where the problem is, but I don’t know why flash is picking it up as a problem…

I’m looping through an array and checking the elements to see if an element contains this text.

the array is as following  
array\_container[0] = ‘\_A\_1’;  
array\_container[1] = ‘\_a\_2’;

```auto

        for(var i = 0;i<_root.array_container.length; i++)
        {
            lookfor = '_A_1';
            current = _root.array_container*;
            trace('----'+current+'----'+lookfor+'----');
            if(lookfor==current)
            {
                trace('FOUND '+_root.array_container*);

            }
            trace(_root.array_container*);
        }

```

i’ve narrowed down the problem to being the variable ‘current’. If I replace the dynamic part to the string ‘\_A\_1’ it works. That is why I entered the trace just above to see what its is checking against. I can see that they are both the same, but flash thinks otherwise.

Any assistance is greatly appreciated, and thanks in advance for any reply 🙂
