0
votes

Is it possible to override the default focus event on the in-built TextField class? So for example when a textfield gains focus a custom event is triggered rather than the default one? I know we can use the onSetFocus event, however we have over 1200 swfs that use TextFields so want to do it on a global scope rather than having to modify each individual swf.

The idea is that on an Android tablet selecting a TextField brings up the android keyboard that not only shrinks the flash content, but defaults to the alpha keyboard when all we want is numeric (it's a Maths app).

1

1 Answers

0
votes

You can't override the event, but you can extend the TextField class by setting the onSetFocus method on its prototype object:

TextField.prototype.onSetFocus = function () { trace ("onSetFocus"); }