Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6074413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:22:45+00:00 2026-05-23T10:22:45+00:00

I create an AS3 TextField set to Input mode dynamically through code, but when

  • 0

I create an AS3 TextField set to Input mode dynamically through code, but when the user tries to input some special characters (eg. á à é è í ì ó ò ú ù ç) they simply do not appear on the TextInput.

Copying and pasting them to the textfield works, but I’d prefer if the user could directly type them.

Here’s a quick test demonstrating this:

package
{
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFieldType;

    public class TextInput extends Sprite
    {
        public function TextInput()
        {
            super();

            var t:TextField = new TextField;
            t.type = TextFieldType.INPUT;
            addChild(t);
        }
    }
}

This creates a textfield where the user can type, but I can’t type special characters like à.

Many thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:22:46+00:00Added an answer on May 23, 2026 at 10:22 am

    If you can paste it into the Input field, you should be able to type it.

    If you start a new Flash document, using the same font as you are above create an Input textfield on the stage with the following settings:

    Embed the normal glyphs
    enter image description here

    Embed the extended latin glyphs
    enter image description here

    And this should work, as:
    enter image description here

    Now if all this works, it might have something to do with the way the class is written.

    Writing classes that embeds fonts is frankly a pain. Make sure you embed the font in the library and export it for action script:

    enter image description here

    Following that, you need to use the following code:

    // The name of the font class
    var _font:Calibri = new Calibri();
    
    var _textFormat:TextFormat = new TextFormat();
    _textFormat.font = _font.fontName;
    _textFormat.size = 16;
    
    // For some weird reason the ordering here is important. I remember mucking around with this for ages for an old project. EmbedFonts must come last
    var _textField:TextField = new TextField();
    _textField.defaultTextFormat = _textFormat;
    _textField.type = TextFieldType.INPUT;
    _textField.embedFonts = true;
    
    addChild(_textField);
    

    And that should have it all working:

    enter image description here

    ** EDIT **
    To those using FlashDevelop, etc you can use the following method:

    public class Main extends MovieClip {
    
        [Embed(source='assets/HOBOSTD.OTF', fontName='_hobo', embedAsCFF="false")] public static const HOBO:Class;
    
        public function Main() {
            var _font:Font = new HOBO() as Font;
    
            var _textFormat:TextFormat = new TextFormat();
            _textFormat.font = _font.fontName;
            _textFormat.size = 22;
    
               var _textField:TextField = new TextField();
    
            _textField.embedFonts = true;
            _textField.defaultTextFormat = _textFormat;
            _textField.autoSize = TextFieldAutoSize.LEFT;
            _textField.antiAliasType = AntiAliasType.ADVANCED;
            _textField.type = TextFieldType.INPUT;
    
            addChild(_textField);
        }
    }
    

    And you will get the following:

    enter image description here

    Now note, the font file must be either relative to your project, or the source can point to the C:\windows\font folder if you choose. In the above example, I copied the font to my assets folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I create a TextField in AS3 with multiline set to true and equate
I create a document class Main and use Adobe Sample code from http://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f9f.html and
I have an input text TextField in my movieclip instance but the text field
I need to create a timer using as3 timer class or some other class.
So I have a function to create images dynamically in as2, telling some parameters,
I am using AS3 to create a tween affect between multiple images that have
Many library classes in AS3 have read only properties. Is it possible to create
Create a file called Valid[File].txt and stick some text in it. Start powershell and
I am planning to create a Flash AS3 game that is like SimCity. Or
I am trying to create a custom object in AS3 to pass information to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.