Link to home
Start Free TrialLog in
Avatar of iceman19330
iceman19330

asked on

Text Transform

I'm having an EXTREEMLY hard time working with Flash and doing text transform.  What I need to do is transform the text in one of 5 ways.

1.  Normal.
2. Arch Up
3. Arch Down
4. Straight Across - Bottom Arch Up
5. Straight Across - Bottom Arch Down
6. Slant R/L
7. Slant Top/Bottom

An example of the Text Lettering can be seen here.  http://www.dartfrogmedia.com/portfolio/uniformbuilder.html


Avatar of Guic
Guic

Hi

Make a clip : "mask" => a mask
Make a clip : "typo" => with text


import flash.display.*;
import flash.geom.*;
import flash.filters.*;
//
bitmap = new flash.display.BitmapData(400, 300, false);
var mc:MovieClip = this.createEmptyMovieClip("mc", 1);
//mc.attachBitmap(bitmap, 1);
bitmap.draw(mask);

mpoint = new Point(0, 0);
displac = new DisplacementMapFilter(bitmap, mpoint, 1, 1, 0, 100, 'clamp');
typo.blendMode = 'multiply';
typo.swapDepths(mc);
mask._visible = false;

typo.filters = [displac];


See this example :
http://www.orb-multimedia.com/rmlab/index.php/2005/10/29/51-flash-8-displacementmapfilter-texte-incurve


Regards
Avatar of Aneesh Chopra
I want to provide more details on Guic's comment.

Above code will not work without following:

"mask" movieClip should be larger than "typo" movieclip and it should have Radial Gradiant to make above code work.

here I have uploaded a working sample.
download link:
http://www.yousendit.com/transfer.php?action=download&ufid=4F2620115D5D2EAB

actually curved text is based on "mask" movieclip gradiant, try modifying the gradiant and see how curved text changes according to the gradiant.

I mean to say, you can give any shape to text using above script, if you can create appropriate gradiant.

Rgds
Aneesh
ASKER CERTIFIED SOLUTION
Avatar of Guic
Guic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial