Solved

Actionscript text kerning

Posted on 2008-06-26
2
614 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now