Skip to main content
Participant
September 15, 2006
Question

Newbie Question

  • September 15, 2006
  • 4 replies
  • 337 views
Hi,
im new to acionscript.

i tried to do some math operations , i have one input text and one output box , in a push of the button i want the input text to times 5 , so this is the syntax :

on (release) {
output - input*5
}
after trigering the outbox shows "Nan".

what am i doing wrong?

Tx
S
This topic has been closed for replies.

4 replies

samifox27Author
Participant
September 16, 2006
its not working Tim.
Participating Frequently
September 15, 2006
Oops! Sorry about that.

It should be:

output.text = String(Number(input.text) * 5);

Tim

samifox27Author
Participant
September 15, 2006
its not.are u sure that AScript 2 has this function String Number()?
Participating Frequently
September 15, 2006
Try this:

output.text = StringNumber(input.text) * 5);

Also, just note that if the text inside the input box is not a number, output will always say NaN.

Tim