User Guide
<textbox> 469
Attributes
id
String; represents a unique identification string that is used by the extensibility features to
identify the control and access the value it returns.
literal Boolean value; if true, the value that is returned from this control is enclosed by
quotation marks (""). If
false, which is the default setting, the returned value does not have
quotation marks.("").
maxlength Number; sets the maximum number of characters that can be entered.
multiline Boolean value; if true, more than one line of input is allowed. If false, which is
the default setting, only one line of input is allowed.
size Number; an integer that sets the width of the input field using the average character
width.
tabindex Number; an integer that represents the control’s position in the tab order (available
only on Windows).
value String; default text that appears in the textbox.
Child tags
None.
Parent tag
<dialog>, <hbox>, <row>
, <vbox>
Description
Control tag; creates a control that allows input of text.
Example
The following example uses the JavaScript API to create a new command that appears on the
Commands menu. Create two files, as described in this section, and place them in your
Commands folder in your user-level configuration folder. For more information, see
“Configuration folders installed with Flash” in Getting Started with Flash.
First, create a file named scale.jsfl in your Commands folder. Place the following code into the file
and save the file:
// Create an XML to UI dialog box using the XML definition
// in the scale.xml file
var scaleDlg = fl.getDocumentDOM().xmlPanel( fl.configURI + "Commands/
scale.xml" );
if (scaleDlg.dismiss == "accept") {
// Place the values of xScale and yScale from the dialog box
// into local variables. The code casts (converts) the values from the
// dialog box to a number before assigning them to the local variables
// because the scaleSelection() method takes numbers as parameters.
var xScale = Number(scaleDlg.xScale);
var yScale = Number(scaleDlg.yScale);