Here's the code I have for returning the total to display in a Label.

private function stepperSumFun( val1:int, val2:int, val3:int, val4:int,
val5:int):String { 
return (val1+val2+val3+val4+val5).toString();

<mx:Label text="{stepperSumFunc( ns01.value, ns02.value, ns03.value,
ns04.value, ns05.value)}"/>

What I'd like to do, for example:

<mx:NumericStepper id="ns06" value="{stepperSumFunc( ns01.value, ns02.value,
ns03.value, ns04.value, ns05.value)}"/>

But it returns an error.



Alex Harui wrote:
> 
>  
> 
> Add up the 5 and set the value of the NumericStepper.  What does your
> code look like?
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of JRBower
> Sent: Friday, January 11, 2008 7:28 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Adding several NumericSteppers = Total
> 
>  
> 
> 
> Can someone help?
> 
> I have 5 numericsteppers and I would like to be able to display their
> total
> in a sixth NumericStepper. 
> 
> ns01 + ns02 + ns03 + ns04 + ns05 = nsTotal06
> 
> How can I do this?
> 
> Thanks,
> 
> James
> 
> -- 
> View this message in context:
> http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total-tp1475076
> 4p14769497.html
> <http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total-tp147507
> 64p14769497.html> 
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total-tp14750764p14770341.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to