Restricting input fields?

I know I can tell flash that I explicitly want a few keys to work, but is there any way to tell it I don’t want keys to work on the input field?

For example If I want all of the numbers to work except for the number 9 I have to do

text1.restrict = “012345678”;

Can’t I do something like

text1.restrict != “9”;