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). 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 = lineWidth100;
cursor_mc._yscale = lineWidth100;
}
theStepper.addEventListener(“change”, oStepperListener);
Any help is appreciated, since I can’t find any other info on this particular issue.
Thanks,
Haig