# What is wrong with this code?

**URL:** <https://forum.kirupa.com/t/what-is-wrong-with-this-code/268455>\
**Category:** Uncategorized\
**Created:** [August 14, 2008, 1:14am UTC](https://forum.kirupa.com/t/what-is-wrong-with-this-code/268455 "2008-08-14T01:14:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eg19689](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@eg19689](https://forum.kirupa.com/u/eg19689)\
**Post date:** [August 14, 2008, 1:14am UTC](https://forum.kirupa.com/t/what-is-wrong-with-this-code/268455/1 "2008-08-14T01:14:21Z")

</div>

var users:Array = [“Mike”, “Todd”, “Jimmy”];

enter\_btn.addEventListener (MouseEvent.CLICK, onClick);

function onClick (evt:MouseEvent):void  
{  
for (var i:Number = 0; i \< users.length; i++)  
{  
if (users\* == user\_txt.text)  
{  
out\_txt.text = “Access Granted”;  
}  
else  
{  
out\_txt.text = “Access Denied”;  
}  
}  
}

//When I run it it does not work. Help, anyone?Ⓜ
