Tuesday, December 16, 2008

Flash IsNumber

Make new Flash File
Add one Input Text box Instance Name is "txtNummer"
Add one Dynamic Text Instance Name is "LblErr"
Add one button Instance Name is "submit_btn"
Select Fist Frame1 and Past code

Code:
function IsNumber(numberText):Boolean {
if (int(numberText) == 0) {
LblErr.htmlText = "*Enter Number Only.";
return true;
}
LblErr.htmlText = "";
return true;
}

submit_btn.clickHandler = function() {
if (!IsNumber(txt)) { Selection.setFocus(txtNummer);
}
};

No comments: