We need a few simple flash effects added to our website. These are text shaping effects.
To see an example Go to http://www.customink.com/lab/#loc-singles. We are not asking you to clone the entire site. We just need a few of the text shaping features. Once you click the link above, then:
…
add a text
Select it and look for Shape Text features, we require some of the text effects namely:
Curve Up Text
Curve Down Text
Arch Up Text
Arch Down Text
Bridge Text
Valley Text
You will be providing us with the source code in AS2.0 and my developer will take over the codes and embed it in our application, so you need to guide him as well if he needs assistance.
Here are some technical details on how you will have to code the features.
You have dynamic movieclips on stage (Array of movieclip),
inside each dynamic movieclip you have one dynamic text field
Now you will place a dropdown(or 7 buttons for the effects),
when a user clicks/selects the effect, the dynamic textfield(inside that same dynamic movieclip) will change its shape according to the selected effect.
Note: Once the user selects any effect, you can replace the dynamic textfield(remove) and make many dynamic textfields according to effect but all those newly created dynamic textfields must reside inside the parent movieclip.
Here is any example of the code
function filterType1(Type)
{
var TargetText:MovieClip=SelectedObj.maincont_mc.maincont_mc2.txtfield; //The current textfield
var Direction = 1;
var Count:Number = 0;
var XYInc = 10;
var YInc = 0;
var OldFormat:TextFormat=SelectedObj.maincont_mc.maincont_mc2.txtfield.getTextFormat(); //Get the current format of the textfield like font, color etc
var Newformat:TextFormat = new TextFormat();
var TargetColor:Color = new Color(TargetText);
SetColor=TargetColor.getRGB();
var tmpText=TargetText.text;
var half:Number = Math.round((tmpText.length)/Type);
var Mc1:MovieClip=SelectedObj.maincont_mc; //This is the main Movieclip
Mc1.createEmptyMovieClip(“Mc2″, _root.getNextHighestDepth());// This is inside movieclip array that will hold multiple new generated dynamic textfields
var SetWidth:Number=_root.ItemSelected._width;
var SetHeight:Number=_root.ItemSelected._height;
for (i=0; i<tmpText.length; i++) {
Mc1.Mc2.createTextField(“MyText”+i, i+1,i*XYInc, 0, 15, 20);
Newformat.font =OldFormat.font;
Newformat.align =OldFormat.align;
Mc1.Mc2["MyText"+i].type = “dynamic”;
Mc1.Mc2["MyText"+i].embedFonts = true;
Mc1.Mc2["MyText"+i].text = tmpText.charAt(i);
Mc1.Mc2["MyText"+i].setTextFormat(Newformat);
Mc1.Mc2["MyText"+i].textColor=SetColor;
var mc12:MovieClip = Mc1.Mc2["MyText"+i];
var IntWidth:Number = mc12._width;
var IntHeight:Number = mc12._height;
var trans:Transform = new Transform(mc12);
var scaleMatrix:Matrix = new Matrix();
Mc1.Mc2["MyText"+i]._y = YInc*5;
Count = Count+1;
YInc = YInc+Direction;
SkewType = Direction*(.5);
if (YInc == half) {
Direction = -1;
}
if (YInc == 0) {
Direction = 1;
}
scaleMatrix.b = SkewType;
scaleMatrix.c = 0;
scaleMatrix.translate(mc12._x, mc12._y);
trans.matrix = scaleMatrix;
//trace(“TextField["+i+"]=”+Mc1.Mc2["MyText"+i].text);
}
Mc1._width=SetWidth;
Mc1._height=SetHeight*2;
Mc1.Mc2._x=-(Mc1.Mc2._width/2);
Mc1.Mc2._y=-(Mc1.Mc2._height/2);
//Mc1._visible=true;
TargetText._visible=false;
}
//Sample calling of the function
filterType1(2);
You don’t need to follow the above mentioned codes but I suggest this will do most of the job for you.
You can either use a single function or you can create multiple for the effects.