TextSnapshot


Object
    |
    +-TextSnapshot

public class TextSnapshot
extends Object

TextSnapshot objects let you work with static text in a movie clip. You can use TextSnapshot objects, for example, to layout text with greater precision than that allowed by dynamic text, but still access the text as read-only.

You don't use a constructor to create a TextSnapshot object; it is returned by the MovieClip.getTextSnapshot() method.

Availability: ActionScript 1.0; Flash Player 7 - The SWF file must be published for Flash Player 6 or later, and must be played in Flash Player 7 or later.

See also

getTextSnapshot (MovieClip.getTextSnapshot method)

Property summary

Properties inherited from class Object

constructor, __proto__, prototype, __resolve


Method summary

Modifiers

Signature

Description

 

findText(startIndex:Number, textToFind:String, caseSensitive:Boolean) : Number

Searches the specified TextSnapshot object and returns the position of the first occurrence of textToFind found at or after startIndex.

 

getCount() : Number

Returns the number of characters in a TextSnapshot object.

 

getSelected(start:Number, [end:Number]) : Boolean

Returns a Boolean value that specifies whether a TextSnapshot object contains selected text in the specified range.

 

getSelectedText([includeLineEndings:Boolean]) : String

Returns a string that contains all the characters specified by the corresponding TextSnapshot.setSelected() method.

 

getText(start:Number, end:Number, [includeLineEndings:Boolean]) : String

Returns a string that contains all the characters specified by the start and end parameters.

 

getTextRunInfo(beginIndex:Number, endIndex:Number) : Array

Returns an array of objects that contains information about a run of text.

 

hitTestTextNearPos(x:Number, y:Number, [closeDist:Number]) : Number

Lets you determine which character within a TextSnapshot object is on or near the specified x, y coordinates of the movie clip containing the text in the TextSnapshot object.

 

setSelectColor(color:Number) : Void

Specifies the color to use when highlighting characters that were selected with the TextSnapshot.setSelected() method.

 

setSelected(start:Number, end:Number, select:Boolean) : Void

Specifies a range of characters in a TextSnapshot object to be selected or not.

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch



Version 8

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00002825.html