# Need Help with Listeners

**URL:** <https://forum.kirupa.com/t/need-help-with-listeners/150936>\
**Category:** flash\
**Created:** [June 11, 2005, 11:07pm UTC](https://forum.kirupa.com/t/need-help-with-listeners/150936 "2005-06-11T23:07:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haig\_Larsen](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@Haig\_Larsen](https://forum.kirupa.com/u/Haig_Larsen)\
**Post date:** [June 11, 2005, 11:07pm UTC](https://forum.kirupa.com/t/need-help-with-listeners/150936/1 "2005-06-11T23:07:48Z")

</div>

I decided to finally learn how to use components, so I built a simple drawing application using UI components to control the brush size and color ([http://www.brainsforlunch.com/drawingapp.html](http://www.brainsforlunch.com/drawingapp.html)). I thought I was doing pretty good until I realized that the size of the brush only changes when the Numeric Stepper is clicked on with the mouse. If you enter a number into it instead and then hit enter, the size of the brush doesn’t change. Is this normal, or do I need to set up another Listener to react to keyboard input? Here’s the code for the listener where “cursor\_mc” is the name of the movie clip representing the brush size

var oStepperListener:Object = new Object();  
oStepperListener.change = function(oEventObject){  
lineWidth = oEventObject.target.value;  
cursor\_mc.\_xscale = lineWidth_100;  
cursor\_mc.\_yscale = lineWidth_100;

}  
theStepper.addEventListener(“change”, oStepperListener);

Any help is appreciated, since I can’t find any other info on this particular issue.

Thanks,  
Haig
