MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 469

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Attributes
String; represents a unique identification string that is used by the extensibility features to
id
identify the control and access the value it returns.
Boolean value; if
literal
quotation marks (""). If
quotation marks.("").
Number; sets the maximum number of characters that can be entered.
maxlength
Boolean value; if
multiline
the default setting, only one line of input is allowed.
Number; an integer that sets the width of the input field using the average character
size
width.
Number; an integer that represents the control's position in the tab order (available
tabindex
only on Windows).
String; default text that appears in the textbox.
value
Child tags
None.
Parent tag
<dialog>, <hbox>,
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);
the value that is returned from this control is enclosed by
true,
, which is the default setting, the returned value does not have
false
, more than one line of input is allowed. If
true
,
<row>
<vbox>
, which is
false
<textbox>
469

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents