MovieClip
871
getTextSnapshot (MovieClip.getTextSnapshot
method)
public getTextSnapshot() : TextSnapshot
Returns a TextSnapshot object that contains the text in all the static text fields in the specified
movie clip; text in child movie clips is not included. This method always returns a
TextSnapshot object.
Flash concatenates text and places it in the TextSnapshot object in an order that reflects the
tab index order of the static text fields in the movie clip. Text fields that don't have tab index
values are placed in a random order in the object, and precede any text from fields that do
have tab index values. No line breaks or formatting indicates where one field ends and the
next begins.
The contents of the TextSnapshot object aren't dynamic; that is, if the movie clip moves to a
different frame, or is altered in some way (for example, objects in the movie clip are added or
removed), the TextSnapshot object might not represent the current text in the movie clip. To
ensure that the object's contents are current, reissue this command as needed.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability:
ActionScript 1.0; Flash Player 7 - SWF files published for Flash Player 6 or later,
playing in Flash Player 7 or later.
Returns
TextSnapshot
- A TextSnapshot object that contains the static text from the movie clip.
Example
The following example shows how to use this method. To use this code, place a static text field
that contains the text "TextSnapshot Example" on the Stage.
var textSnap:TextSnapshot = this.getTextSnapshot();
trace(textSnap.getText(0, textSnap.getCount(), false));
See also
TextSnapshot
NO
T
E
You can't specify a tab index value for static text in Flash. However, other products may
do so (for example, Macromedia FlashPaper).
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...