[haXe] Getting values of TextInput with Arctic
Asger Ottar Alstrup
asger at area9.dk
Wed Jan 31 16:31:09 CET 2007
Hi,
I was wondering if it is possible to get access what is written in a
> TextInput? And if yes, how? If no, is there a way to implement the features?
The documentation in ArcticBlock for TextInput says:
/**
* An input text. Text Font/Size/Color can be specified along with
initial text content in the subset of HTML which Flash understands.
* The validator callback is called on each change in Flash 8, but only
on loss of focus in Flash 9. You can use this callback to
* extract the contents of the text input.
* All fields of the style parameter is copied verbatim to the textinput
object. This allows you to customize the text input in
* all detail, but it's up to you to make sure this works in both Flash
8 & 9.
*/
TextInput(html : String, width : Float, height : Float, ?validator :
String -> Bool, ?style : Dynamic,
?maxChars : Int, ?numeric : Bool, ?bgColor : Int, ?focus : Bool,
?embeddedFont : Bool);
So, you get the contents of the TextInput in the "validator" callback. Usage
is illustrated in the ArcticTest example - just search for TextInput.
If that is not good enough, you can wrap the TextInput block with an Id
block, and then use getRawMovieClip to get to the MovieClip containing the
TextInput and then access it directly.
I'm considering to change the API for the TextInput. Suggestions are
welcome.
Regards,
Asger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20070131/e951d9b2/attachment.htm
More information about the Haxe
mailing list