Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
flashx.textLayout.edit 
TextScrap 
Packageflashx.textLayout.edit
Classpublic class TextScrap
InheritanceTextScrap Inheritance Object

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The TextScrap class represents a fragment of a text flow.

A TextScrap is a holding place for all or part of a TextFlow. A range of text can be copied from a TextFlow into a TextScrap, and pasted from the TextScrap into another TextFlow.

See also



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
Creates a TextScrap object.
TextScrap
  
Creates a duplicate copy of this TextScrap object.
TextScrap
  
[static] Creates a TextScrap object from a range of text represented by a TextRange object.
TextScrap
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Constructor Detail

TextScrap

()Constructor
public function TextScrap(textFlow:flashx.textLayout.elements:TextFlow = null)

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Creates a TextScrap object.

Use the createTextScrap() method to create a TextScrap object from a range of text represented by a TextRange object.

Parameters
textFlow:flashx.textLayout.elements:TextFlow (default = null) — if set, the new TextScrap object contains the entire text flow. Otherwise, the TextScrap object is empty.
Method Detail

clone

()method
public function clone():flashx.textLayout.edit:TextScrap

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Creates a duplicate copy of this TextScrap object.

Returns
flashx.textLayout.edit:TextScrap — TextScrap A copy of this TextScrap.

createTextScrap

()method 
public static function createTextScrap(range:flashx.textLayout.elements:TextRange):flashx.textLayout.edit:TextScrap

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Creates a TextScrap object from a range of text represented by a TextRange object.

Parameters

range:flashx.textLayout.elements:TextRange — the TextRange object representing the range of text to copy.

Returns
flashx.textLayout.edit:TextScrap