PDA

View Full Version : Help with TextField.restrict


swive
06-03-2004, 02:44 PM
Flash MX

In the first frame of my movie, I have a textfield with the name 'text1'

I also have some frame actions in the first frame:

text1.restrict = "0-9";
text1 = "";

When I test this movie, I am still able to enter characters into the text field. Even if I take out the second line I can still enter characters. Why?

-K

CyanBlue
06-03-2004, 03:19 PM
It shouldn't be... It looks like 'text1' is the variable name of your textField... You need to make sure that you are referencing it with the textField instance name rather than the variable name when using with the 'restrict'...

Please keep one question to one thread... Thank you... :)

swive
06-03-2004, 03:23 PM
i understand.

and sorry about that.

CyanBlue
06-03-2004, 03:24 PM
Not a problem... Did that solve your problem??? :)

swive
06-03-2004, 03:25 PM
that did it.

is there going to be a problem if my variable name and instance names are the same?

CyanBlue
06-03-2004, 03:26 PM
Um, nope... But I advise you NOT to use variable name for the textField UNLESS you are exporting for F5 for your own sake... :)