Solved

Actionscript text kerning

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.
Suggested Courses

734 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