Solved

Actionscript text kerning

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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.

867 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

21 Experts available now in Live!

Get 1:1 Help Now