Extending Flash |
|
|
|
| Objects > Document object > document.setTextRectangle() | |||
Flash MX 2004.
document.setTextRectangle(boundingRectangle)
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().
A Boolean value: true if the size of at least one text field is changed; false otherwise.
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:
boundingRectangle; the height is automatically computed to fit all the text. boundingRectangle; the width is automatically computed to fit all the text.boundingRectangle, and the resulting rectangle might be larger than needed to fit all the text. However, if the parameters specify a rectangle size that is too small to fit all the text, the method takes into account only the width value passed in boundingRectangle (the height is automatically computed to fit all the text).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})
|
|
|
|