# as3 non mouse event function

**URL:** <https://forum.kirupa.com/t/as3-non-mouse-event-function/297410>\
**Category:** flash\
**Created:** [October 1, 2009, 5:04pm UTC](https://forum.kirupa.com/t/as3-non-mouse-event-function/297410 "2009-10-01T17:04:20Z")\
**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:** [October 1, 2009, 5:04pm UTC](https://forum.kirupa.com/t/as3-non-mouse-event-function/297410/1 "2009-10-01T17:04:20Z")

</div>

Hello,  
i have a password game where users need to select the correct 3 buttons to progress to the next stage. The 3 buttons that need to be selected are: pwd\_btn1, pwd\_btn2,pwd\_btn3. After, the user must click on “submit\_btn” to verify if they have chosen the correct buttons.  
So far everything works fine.  
So what i would like to happen is that once the 3 buttons are selected, and before the submit\_btn is clicked, a function is triggered that will apply a glow effect to the submit\_btn, indicating to the user to click on it. I know i have to make a function that is not a non mouse event but i don’t know how.  
Any help would be greatly appreciated, thanks

submit\_btn.addEventListener(MouseEvent.CLICK,verify\_pw);

failed\_txt.border = false;  
var myName:String;  
var myPass:String;

function verify\_pw(eventMouseEvent):void{  
myName = name\_txt.text;  
myPass = pass\_txt.text;  
if(myName == “user1” && myPass == “pwd\_btn1pwd\_btn2pwd\_btn3”){  
gotoAndPlay(“hidden”);  
}  
}
