Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2344
  • Last Modified:

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


0
iceman19330
Asked:
iceman19330
  • 2
1 Solution
 
GuicCommented:
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
0
 
Aneesh ChopraCommented:
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
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now