all groups > flash actionscript > october 2006 >
You're in the

flash actionscript

group:

nodeValue and a NaN problem



Re: nodeValue and a NaN problem Raymond Basque
10/12/2006 3:00:30 PM
flash actionscript: I changed my regional settings to test this, and it looks like there's no
support for international number formats -- and there's no indication it
will change with AS3.

So you'll need to parse your string data and replace the separators before
you can convert the string data.

21,22 would need to become 21.22

1 222,23 would need to become 1,222.23

etc...

Re: nodeValue and a NaN problem Raymond Basque
10/12/2006 3:07:41 PM
Correction. The parser doe not allow thousands separators, so

1 222,23 would need to become 1222.23

nodeValue and a NaN problem Burak Delice
10/12/2006 8:09:25 PM
hi,

i take a value from XML like this :
var num:Number= Number(votes.childNodes
[i].childNodes[1].firstChild.nodeValue

in XML value is(xml file is below) : 21,22

but, num variable is become NaN?? if I dont use Number, there is no
problem, i took 21,22, but when I multiple it with a number or Convert it to
Number(like above) result is NaN?

why?
<?xml version='1.0' encoding='UTF-8'?>
<results>
<vote>
<id>1</id>
<name>text</name>
<count>10</count>
<percentage>21,22</percentage>
</vote>
</results>

regards,
Burak

Re: nodeValue and a NaN problem Burak Delice
10/13/2006 12:00:00 AM
thankyou very much....


[quoted text, click to view]

AddThis Social Bookmark Button