Hi,

read a programming or flash manual, or subscribe to the newbie list.
This is not meant harshly but these questions are so basic that you
are doing yourself (and us) a favor by sharpening your axe before you
set off in the woods.

You do:
>    resultTxt.text = parseInt(resultTxt.text) + 
> (event.target.selection.value).toString();

as in:
string = number + string

so yeah an implicit type cast will occur, appending your string to
your number. If you want to add them make sure you do:
string = ""+ (number+number);

regards,
JC


On Tue, May 20, 2008 at 3:07 AM, rlyn ben <[EMAIL PROTECTED]> wrote:
> how can i add a radiobutton value from the number at resultTxt.text... here 
> is my code.. it wont do the math.. all it does is puts the value right beside 
> the numbers at resultTxt.text.. help..
>
> stop();
>
> var gRB:RadioButtonGroup = RadioButtonGroup.getGroup("genderGroup");
> gRB.addEventListener(MouseEvent.CLICK, genderHandler);
>
> function genderHandler(event:MouseEvent):void {
>    trace("event.target.selection.name", event.target.selection.name);
>    trace("event.target.selection.value", event.target.selection.value);
>    trace("resultTxt.text", resultTxt.text);
>
>    switch(event.target.selection.name) {
>        case "maleRB":
>            maleRB.value = 1;
>            break;
>        case "femaleRB":
>            femaleRB.value = 0;
>            break;
>    }
>    resultTxt.text = parseInt(resultTxt.text) + 
> (event.target.selection.value).toString();
> }
>
>
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to