Still getting stuck on the number formatting thing.
What I have is a director movie that I'm trying to translate into flash.
My director code to get rid of commas reads like this:
--Get rid of commas
put field "dollars 1" into Gcomma
repeat with n=1 to length(Gcomma)
if char of Gcomma = "," then delete char of Gcomma
end repeat
All it does is looks at a string and deletes commas (with the input
fields I'm having in my project, it's going to be common for people to
input numbers like "50,000.00" - and when I try to convert that field
into a Number, I get a NaN result.
Not really a request for a site test (I realize this isn't the place),
but it may clarify what I'm trying to attempt
Seems to me there should be a simple way to do this - but for the life
of me, I can't figure it out (and, yes, I am definately a newbie at
this)
THX!
What I have is a director movie that I'm trying to translate into flash.
My director code to get rid of commas reads like this:
--Get rid of commas
put field "dollars 1" into Gcomma
repeat with n=1 to length(Gcomma)
if char of Gcomma = "," then delete char of Gcomma
end repeat
All it does is looks at a string and deletes commas (with the input
fields I'm having in my project, it's going to be common for people to
input numbers like "50,000.00" - and when I try to convert that field
into a Number, I get a NaN result.
Not really a request for a site test (I realize this isn't the place),
but it may clarify what I'm trying to attempt
Seems to me there should be a simple way to do this - but for the life
of me, I can't figure it out (and, yes, I am definately a newbie at
this)
THX!