Document object
117
Note:
You can’t use this method to set values for read-only properties, such as
element.elementType
,
element.top
, and
element.left
.
value
Specifies the value to set in the specified Element property.
Returns
Nothing.
Description
Method; sets the specified
Element
property on selected object(s) in the document. This method
does nothing if there is no selection.
Example
The following example sets the width of all selected objects to 100 and the height to 50:
fl.getDocumentDOM().setElementProperty("width", 100);
fl.getDocumentDOM().setElementProperty("height", 50);
document.setElementTextAttr()
Availability
Flash MX 2004.
Usage
document.setElementTextAttr(
attrName
,
attrValue
[,
startIndex
[,
endIndex
]] )
Parameters
attrName
A string that specifies the name of the
TextAttrs
property to change.
attrValue
The value to which to set the
TextAttrs
property. For a list of property names and
expected values, see
“Property summary for the TextAttrs object” on page 299
.
startIndex
An integer value that specifies the index of the first character that is affected. This
parameter is optional.
endIndex
An integer value that specifies the index of the last character that is affected. This
parameter is optional.
Returns
A Boolean value:
true
if at least one text attribute property is changed;
false
otherwise.
Description
Method; sets the specified
textAttrs
property of the selected text items to the specified value.
For a list of property names and allowable values, see
“Property summary for the TextAttrs object”
on page 299
. If the optional parameters are not passed, the method sets the style of the currently
selected text range, or the whole text field if no text is selected. If only
startIndex
is passed, the
method sets that character’s attributes. If
startIndex
and
endIndex
are passed, the method sets
the attributes on the characters starting from
startIndex
up to, but not including,
endIndex
. If
paragraph styles are specified, all the paragraphs that fall within the range are affected.
Summary of Contents for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Page 1: ...Flash JavaScript Dictionary ...
Page 16: ...16 Contents ...
Page 40: ...40 Chapter 2 Top level functions ...
Page 368: ...368 Chapter 3 Objects ...