-
[F8] parseInt(TextInput.text) is stripping my decimal
I’m using flash 8 and programming with as1.
I have a question about the parseInt() function.
I'm pulling a number from a TextInput component and am noticing that the parseInt() function is deleting the numbers decimal.
Example: if I have 13.5 in a textInput and pull it out via:
parseInt(TextInput.text)
It will give me 13 even.
Does anybody know how to retain my decimal in this case?
Thanks!
-
5+5=55
ParseInt only parses integers, or whole numbers, so it truncates the decimal... use parseFloat instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|