I have a text 'hello world' in my ActionScript3 file.
What I am trying to achieve is to make the middle portion of the text bigger in height.
So, it will start off with a small 'h' and then moving towards the middle, each letter's size will increase.
The exact thing is shown in this image -
http://img180.imagevenue.com/img.php?image=96687_helloworld_122_632lo.jpgAny ideas how I can achieve this? Than开发者_C百科ks in advance.
Because this has per-glyph distortion, the only way to do it correctly is with a DisplacementMapFilter (which would actually work well with animation too). Here's a good example on how to do that.
You could use drawTriangles
from Graphics
object.
First, create a BitmapData
and do a copy of your TextField
(enlarged).
Then you just have to map your BitmapData to a bended mesh (made of triangles).
If I had to do this, I would put every character in a separate TextField, every TextField in a Sprite, set a proper font size for every character, place the Sprites on proper positions and distort the Sprites using whatever methods you need (Transformation Matrix, 3D, whatever).
精彩评论