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.
Shridhar Kulkarni
Points:0
Posts:0
Answered

3/28/2011 4:09:16 AM

Title: Setting Numeric Stepper Value


Hello.
I am using Numeric stepper in my component.
I am having following concept,
when i press the downbutton of Numeric Stepper and when it comes to maximum value, again the value of Numeric Stepper comes to 0
Like when maximum value is 60, then after 60 it will come to minimum value say 0 . roundwise

Plase Help me in that



1
cf_flex
Points: 240
Posts:0
3/31/2011 5:06:28 AM



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;
}

2
cf_flex
Points: 240
Posts:0
Accepted Answer
3/31/2011 5:10:49 AM





<mx:Script>
<![CDATA[
private function changeMinStepper(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 maximum="60" minimum="-1" maxChars="2" change="changeMinStepper(event)"/>


3
Shridhar Kulkarni
Points: 0
Posts:0
4/18/2011 10:54:38 PM



Thanks Buddy...!

Its working....

Thanks to AskMeFlash.com

4
Shridhar Kulkarni
Points: 0
Posts:0
Accepted Answer
4/18/2011 11:04:36 PM



It can be done with one property also "allowValueWrap = true/false" of Numeric Stepper

AskMeFlash Rocks


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