Monday, October 03, 2005

Formatted Text Input Component by Darron Schall

Darron Schall completed this new component extending the Macromedia V2 Text Input component. The example adds a formatted mask onto the text input to make data entry much simpler for the end user.


Usage could not be easier. Within the component properties panel, simply designate an import Mask and the component will auto-format all text entered into the component. The 'text' property will return the fully formatted value but the new 'value' property will return just the input data without the mask.

trace( tiUsPhone.text );
// Output: (555) 333 - 4444

trace( tiUsPhone.value );
// Output: 5553334444


The masks are created using the following "input placeholder" characters
"#" - any digit (0-9)
"a" - lowercase letter
"A" - uppercase letter
"Z" - any letter
"*" - any letter or digit


Nice example Darron.

This example is available with full source and documentation within Flash® by Example.

More to come.

Ted :)

0 Comments:

Post a Comment

<< Home