Topic: Variables from input text (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
![]() I've been playing around with creating motion with ActionScript that is dependent on numbers entered by a user. code: if (object._x < 350) {
|
Maniac (V) Inmate From: Boston, MA, USA |
![]() Uh - sorta skimping on the details, eh? |
Maniac (V) Inmate From: Boston, MA, USA |
![]() |
Paranoid (IV) Mad Scientist From: Houston, TX, USA |
![]() Cool stuff Steve... |
Maniac (V) Inmate From: Boston, MA, USA |
![]() 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 concatenates the two numbers, instead of adding them: object's x becomes 225! on the first loop instead of 27. |
Maniac (V) Inmate From: Boston, MA, USA |
![]() Okay. Quick consult w/ the almighty Moock. |
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
![]() Ahhhhhhhhhhhhhhhh, muchas gracias once again. |
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
![]() |
Maniac (V) Inmate From: Boston, MA, USA |
![]() Ugggh. |
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
![]() he he I guess you've got a point there Steve. |