Is there a sensible way to trap key input into an input field? I'm looking for an equivalent to something like this in Director:

on keyDown me
   if ("abcde" contains the key) then pass
   if the key = backspace then alert("can't delete")
   if the key = return then go next
end

I know it's possible to restrict key input with TextField.restrict, but I'm looking for something a bit more flexible than that. What I've been doing up to now is to listen for an onChanged event, undo the change, then do what I want to do, which is working but seems like an awful waste of resources!

Now I think about it, perhaps the best solution is to use TextField.restrict(""), and then enter the text manually at the insertion point. Hmm.

Danny

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to