# Simplebutton and TextInput components vs me

**URL:** <https://forum.kirupa.com/t/simplebutton-and-textinput-components-vs-me/207389>\
**Category:** flash\
**Created:** [November 16, 2006, 10:19pm UTC](https://forum.kirupa.com/t/simplebutton-and-textinput-components-vs-me/207389 "2006-11-16T22:19:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![liquidFusion](https://avatars.discourse-cdn.com/v4/letter/l/4bbf92/32.png) [@liquidFusion](https://forum.kirupa.com/u/liquidFusion)\
**Post date:** [November 16, 2006, 10:19pm UTC](https://forum.kirupa.com/t/simplebutton-and-textinput-components-vs-me/207389/1 "2006-11-16T22:19:14Z")

</div>

Argh.

I´ve got 2 textInput boxes (username and password) and a simplebutton named login as a setup. Basically, what I want to do is to capture the text the user will type in and pass that along to a public function. But for some reason I don´t seem to be able to get the data the user types in…

… help me out please. This sucks 🙂

```auto

// loading class
var myLogin:loginRoutine = new loginRoutine();

this.login_mc.label_usrName.setFocus();
this.login_mc.btn_login.toggle = true;

// listener approach
var loginListener:Object = new Object();
loginListener.click = function(eventObj:Object) {
	var usrName:String = THIS IS WHAT I DON`T GET
          var usrPwd:String = ???
         // calling class method
	myLogin.btnSubmit();
};

this.login_mc.btn_login.addEventListener("click", loginListener);

```

Thanks heaps folks. You always help me out, and I really appreciate it.
