I don't know why you must use your sumFun, but try this:
<mx:NumericStepper id="ns06" value="{Number(stepperSumFunc( ns01.value,
ns02.value,
ns03.value, ns04.value, ns05.value))}"/>
And describe any further errors in detail.
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of JRBower
Sent: Saturday, January 12, 2008 12:03 AM
To: [email protected]
Subject: RE: [flexcoders] Adding several NumericSteppers = Total
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.
Thanks,
James
Alex Harui wrote:
>
>
>
> Add up the 5 and set the value of the NumericStepper. What does your
> code look like?
>
>
>
> ________________________________
>
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of JRBower
> Sent: Friday, January 11, 2008 7:28 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.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
<http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total-tp147507
6>
> 4p14769497.html
>
<http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total-tp147507
<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-tp1475076
4p14770341.html
<http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total-tp147507
64p14770341.html>
Sent from the FlexCoders mailing list archive at Nabble.com.