Solved

Actionscript text kerning

Posted on 2008-06-26
2
623 Views
Last Modified: 2012-05-05
Is there a way to set the space between character, the kerning, for text loaded into a dynamic textbox, with actionscript?  I tried doing it for the textbox on the frame itself, but that only seemed to for static textboxes.
0
Comment
Question by:walker6o9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
SamuelRostol earned 400 total points
ID: 21872463
Hi there,

You can, using the TextFormat-class, set kerning to true or false, but unfortunately you cannot specify the actual space between the letters using ActionScript.

Kindly,
Samuel
/// To set kerning to true
// I assume that the textfield is named "txt_box"
 
var fmt2:TextFormat = new TextFormat();
fmt2.kerning = true;
 
txt_box.embedFonts = true;
txt_box.text = "Test text";
txt_box.setTextFormat(fmt2); 

Open in new window

0
 
LVL 1

Author Comment

by:walker6o9
ID: 21888610
I tried this, and I set the kerning value in the textbox all the way up to 6, but I still didn't see any change; the kerning looks the same.
test6.fla.txt
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question