# Problem with my function

**URL:** <https://forum.kirupa.com/t/problem-with-my-function/176014>\
**Category:** Uncategorized\
**Created:** [January 19, 2006, 4:53pm UTC](https://forum.kirupa.com/t/problem-with-my-function/176014 "2006-01-19T16:53:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkcidstudio](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@pkcidstudio](https://forum.kirupa.com/u/pkcidstudio)\
**Post date:** [January 19, 2006, 4:53pm UTC](https://forum.kirupa.com/t/problem-with-my-function/176014/1 "2006-01-19T16:53:00Z")

</div>

greetings. I posted this problem yesterday and thought it was solved. unfortunately I was having some issues on where it was going on release. could someone please take a look and offer some advise.  
thank you for the help, i have included the flash file.

////////////script//////////////

enter.onPress=function(){  
checkPassword(pwd) (password);  
}

/////////function/////////////////  
var passwords:Array = new Array();  
var userPages:Array = new Array();  
//////////Array///////////////////  
passwords[0] = “0pt1mum06”;  
userPages[0] =“managers\_page.htm”, “txt”;  
passwords[1] = “test”;  
userPages[1] = “test.htm”, “txt”;  
//////passwords and desitnations///  
function checkPassword(pwd) {  
for (p=0; p\<passwords.length; p++) {  
if (pwd == passwords[p]) {  
inputStatus = “Access granted!”;  
getURL(userPages[p]);  
} else {  
inputStatus = “Access Denied!”;  
getURL(“error.htm”, “txt”);  
}  
}  
}

/////////////////////////////
