Document object
71
document.addNewText()
Availability
Flash MX 2004.
Usage
document.addNewText(
boundingRectangle
)
Parameters
boundingRectangle
Specifies the size and location of the text field by providing locations in
pixels for
left
,
top
,
right
,
and
bottom
. The method applies the current text attributes. It
should be followed by calling
setTextString()
to populate the new text box.
Returns
Nothing.
Description
Method; inserts a new empty text field. See
document.setTextString()
.
Example
The following example creates a new text field in the upper left corner of the Stage and then sets
the text string to
"Hello World
":
fl.getDocumentDOM().addNewText({left:0, top:0, right:100, bottom:100});
fl.getDocumentDOM().setTextString('Hello World!');
document.align()
Availability
Flash MX 2004.
Usage
document.align(
alignmode
[,
bUseDocumentBounds
] )
Parameters
alignmode
A string that specifies how to align the selection. Valid values for
alignmode
are
"left"
,
"right"
,
"top"
,
"bottom"
,
"vertical center"
, and
"horizontal center"
.
bUseDocumentBounds
A Boolean value that, if set to
true
, causes the method to align to the
bounds of the document. Otherwise, the method uses the bounds of the selected objects. The
default is
false
. This parameter is optional.
Returns
Nothing.
Description
Method; aligns the selection. See
document.distribute()
,
document.setAlignToDocument()
, and
document.getAlignToDocument()
.
Содержание FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Страница 1: ...Flash JavaScript Dictionary ...
Страница 16: ...16 Contents ...
Страница 40: ...40 Chapter 2 Top level functions ...
Страница 368: ...368 Chapter 3 Objects ...
Страница 386: ...386 Chapter 4 C Level Extensibility ...