0
Community Beginner
,
/t5/animate-discussions/convert-string-to-number/td-p/3175006
Jan 04, 2011
Jan 04, 2011
Copy link to clipboard
Copied
I want to convert a textbox value to numric value and i use a code like this :
- var n:Number = Number(myTextbox.text);
when i trace the variable (n) it gives me 0. although when i trace myTextbox.text , it gives me the right value.
why ?
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Participant
,
Jan 04, 2011
Jan 04, 2011
Hi,
Have you tried to use parseFloat() instead of a direct cast?
Cheers,
Rui
Participant
,
LATEST
/t5/animate-discussions/convert-string-to-number/m-p/3175007#M81966
Jan 04, 2011
Jan 04, 2011
Copy link to clipboard
Copied
Hi,
Have you tried to use parseFloat() instead of a direct cast?
Cheers,
Rui
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

