document.setTextRectangle()

Availability

Flash MX 2004.

Usage

document.setTextRectangle(boundingRectangle)

Parameters

boundingRectangle A text rectangle object that specifies the new size within which the text item should flow. For information on the format of boundingRectangle, see document.addNewRectangle().

Returns

A Boolean value: true if the size of at least one text field is changed; false otherwise.

Description

Method; changes the bounding rectangle for the selected text item to the specified size. This method causes the text to reflow inside the new rectangle; the text item is not scaled or transformed. The values passed in boundingRectangle are used as follows:

Example

The following example changes the size of the bounding text rectangle to the specified dimensions:

fl.getDocumentDOM().setTextRectangle({left:0, top:0, right:50, bottom:200})