OZONE Asylum
Forums
Multimedia/Animation
Variables from input text
This page's ID:
11223
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Do you get what happened? Me neither. I mean I know what, just not why. The input value is being treated as a string, not a numeric value. So if the object starts at 22 and you input 5 into the text field, it [b]concatenates[/b] the two numbers, instead of adding them: object's x becomes 225! on the first loop instead of 27. How did I figure this out? My friend trace(); Using the Number() function is a hack. I'm sure there is a cleaner, better way. I just haven't figured it out yet, and Number() works, so go for it!
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »