Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: VALIDATING INPUTTED TEXT
From: Manuel S.-Harguindey
Date: Tue, 27 Feb 2001 23:14:57 -0000

Hello, Ian,
Well, for example you can put a validation button in the movie the input
text
resides, say with the variable string as its identifier.
In that button you can attach a on(release) method in which put a code
like
the following that checks if its valid and if so corrects to a
two-decimal-digits number

on(release){
//string is asumed to hold the input value
num = Number(string);
valid = !isNaN(string);
if (valid) {
// converts to xxx.xx
num = Math.floor(100*num)/100;
//do something here with num, go to a frame of whatever, since it is
valid

}
}

Best regards,
Manuel.
Ian Richardson escribi�:






[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]