# Password buttons

**URL:** <https://forum.kirupa.com/t/password-buttons/282537>\
**Category:** Uncategorized\
**Created:** [February 23, 2009, 2:38pm UTC](https://forum.kirupa.com/t/password-buttons/282537 "2009-02-23T14:38:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kagamushu](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kagamushu](https://forum.kirupa.com/u/kagamushu)\
**Post date:** [February 23, 2009, 2:38pm UTC](https://forum.kirupa.com/t/password-buttons/282537/1 "2009-02-23T14:38:24Z")

</div>

Hello, i am using a password as3 script in my flash page. Instead of entering a password though, i would like there to several buttons on the scene so that one would have to select the proper buttons to enter the site. I have tried all kinds of ways to with buttons but nothing seems to work. Here is my code which works with the password entry:

submit\_btn.addEventListener(MouseEvent.CLICK,subClick);  
failed\_txt.background = false;  
failed\_txt.border = false;  
var myPass:String;  
function subClick(eventMouseEvent):void{  
myPass = pass\_txt.text;  
if(myPass == “password”){  
gotoAndPlay(“hidden”);  
}else{  
failed\_txt.text = “Please enter a valid password.”;  
}  
}  
Any ideas?  
thanks
