Wednesday, April 8, 2009

Text2Curve AS3 released

This is AS3 version of Text2Curve Flash AS2 component .
All the functionality and methods are the same.

Note:
Can be used as a component in Flash CS3 or later.
Resulting movie requires Flash Player 9 or later.

What is different from AS2 version:
  • Constructor now accepts an object (was list of parameters in AS2).
    Example:
    var p_t2c:Object = { };
    p_t2c.ut = "Hello, World!";
    p_t2c.tFont = "Arial";
    p_t2c.tSize = 18;
    p_t2c.hexColor = 0xcc00cc;
    p_t2c.ct = "arc_ellipse";
    p_t2c.cp = { a:120, b: -1.5, c:0, d:0 };
    p_t2c.showLine = true;
    p_t2c.bc = null;
    var my_t2c:Text2Curve = new Text2Curve(p_t2c);
    addChild(my_t2c);

    Alternatively, you can pass nothing to constructor, then use properties to set desired parameters and call redraw() method after all.
    Please see help files for more info.


Using Text2Curve AS3 in Flex

The ZIP archive (that you purchase) contains MXP package to use with Flash IDE and also a SWC file. It's the same as included within MXP, just doesn't require you to unpack MXP.
Then do as recommended in this article (by C. Moock):
How to Use Flash CS3's V3 Components in Flex Builder