document.setTextRectangle()
Availability
Flash MX 2004.
Usage
document.setTextRectangle( boundingRectangle )
Parameters
boundingRectangle
text item should flow. For information on the format of
document.addNewRectangle()
Returns
A Boolean value:
true
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
If the text is horizontal and static, the method takes into account only the width value
passed in
boundingRectangle
If the text is vertical (and therefore static), the method takes into account only the height
value passed in
boundingRectangle
the text.
If the text is dynamic or input, the method takes into account both the width and height
values passed in
boundingRectangle
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
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})
A text rectangle object that specifies the new size within which the
.
if the size of at least one text field is changed;
boundingRectangle
; the height is automatically computed to fit all the text.
; the width is automatically computed to fit all
, and the resulting rectangle might be larger than
(the height is automatically computed to fit all the text).
boundingRectangle
otherwise.
false
are used as follows:
Document object
, see
161
Need help?
Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?