header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
mitch
Points:0
Posts:0

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!



1
Flash_Guy
Points: 850
Posts:0
9/20/2011 8:37:38 PM



you can simply set the desired value on change event handler of the Numeric stepper.

2
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)"/> 



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 0+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions