9/20/2011 4:57:39 PM
Title:
Numeric Stepper Question
I am having a hard time making the numeric stepper increment the way I want. I need to get the numeric stepper to increment .1,.3.5,.7,etc. I expected this to work if I set the value to .1 and step size to .2 . Unfortunately, this isn't the case. Flash seems to increment incorrectly on the first click, but works correctly after that. Any help would be great!
9/20/2011 8:37:38 PM
you can simply set the desired value on change event handler of the Numeric stepper.
Rayan
Points: 700
Posts:0
9/20/2011 9:31:59 PM
Flex stepper allow only even steps, try following code to make stepper step odd values.
<mx:Script>
<![CDATA[
private function changeStepper(event:NumericStepperEvent):void{
if(event.target.value == -1 || event.target.previousValue < -1){
event.target.value = 59;
}else if(event.target.value == 60 || event.target.nextValue > 60){
event.target.value = 00;
}
}
]]>
</mx:Script>
<mx:NumericStepper change="changeStepper(event)"/>