Constructor for the Text2Curve class

Availability

Flash Player 7.

Usage

new Text2Curve ([usrText:String, [fontName:String, [textSize:Number, [hexColor:String, [crvType:String,
 [crvParam:Object, [showLine:Boolean, [myclip_mc:MovieClip]]]]]]]]) : Text2Curve;

Parameters

usrText The text to be placed along the curve.

fontName Embedded font name or linkage identifier of a font symbol in the library.

textSize An integer that indicates the point size.

hexColor The color of text. String, color value in hex format; for example, FF0000 is red, and 00FF00 is green.

crvType A string that indicates one of pre-defined curve types. Valid types are "arc_round" (default), "arc_ellipse" and "wave_sine". See Text2Curve.curveType property description for details.

crvParam An object containing properties for the curve. See Text2Curve.curveParam property description for details.

showLine A Boolean value specifying whether to show the curve line.

myclip_mc A reference to a movie clip object on the stage.



All parameters are optional. If you use constructor without parameters, default values are used. You can re-define any parameter later and then use Text2Curve.redraw() method to update the picture.

Returns

A reference to a Text2Curve object.

Description

Constructor; creates a Text2Curve object based on the movie clip specified by myclip_mc parameter. This movie clip then can be used to dynamically scale or rotate text group.
Note 1: An instance of Text2Curve component must be placed on the scene in authoring environment or with attachMovie() before using this constructor.
Note 2: Used without myclip_mc parameter, this constructor creates a Text2Curve object based on a newly created movie clip. See Text2Curve.baseClip property description for details.

Example

The following example creates a new Text2Curve based on newly created movie clip. The text "Hello, World!" will be placed along a regular sine wave:

var mbc:MovieClip = _root.createEmptyMovieClip("new_clip_mc", _root.getNextHighestDepth());
var my_t2c:Text2Curve = new Text2Curve("Hello, World!", "Arial", 24, "cc00cc", "wave_sine", {a:50,b:1,c:0,d:0}, true, mbc);