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

  • SEARCH
  • Home
  • 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 989993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:52:47+00:00 2026-05-16T05:52:47+00:00

I am trying to get the following example to work in Flash Builder 4:

  • 0

I am trying to get the following example to work in Flash Builder 4:

http://developer.yahoo.com/flash/articles/runtime-fonts-as3.html

The Actionscript project compiles but all I get on screen is a tiny rotated square with no text in it.

Does anyone know why this might be happening? My code is identical to the example above – I have compiled the first class into _Arial.swf.

Edit

I’ve also tried this:

package {  
    import flash.display.Sprite;  
    import flash.display.Loader;  
    import flash.events.Event;  
    import flash.net.URLRequest;  
    import flash.text.*;  

    public class _Arial extends Sprite {
        [Embed(source='C:/WINDOWS/Fonts/ARIAL.TTF', fontName='_Arial', fontFamily='myFont', mimeType='application/x-font')]  
        public static var _Arial:Class;  

        public function _Arial():void {  
            drawText();
        }

        public function drawText():void {  
            var tf:TextField = new TextField();  
            tf.defaultTextFormat = new TextFormat("_Arial",60,0);
            tf.embedFonts = true;  
            tf.antiAliasType = AntiAliasType.ADVANCED;  
            tf.autoSize = TextFieldAutoSize.LEFT;  
            tf.border = true;  
            tf.text = "Scott was here\nScott was here too\nblah scott...:;*&^% ";  
            tf.rotation =  15;
            addChild(tf);
            trace(Font.enumerateFonts());
        }  
    }
}


var fontList:Array = Font.enumerateFonts(false);
for (var i:uint=0; i<fontList.length; i++) {
    trace("font: "+fontList[i].fontName);
}

The trace displays: font: _Arial

  • 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-16T05:52:48+00:00Added an answer on May 16, 2026 at 5:52 am

    Ok, I got it to work… I started with this

       public class _Arial extends Sprite
    {
    
        [Embed(source='fonts/Arial.ttf', fontName='_Arial',
        mimeType="application/x-font-truetype",
            unicodeRange='U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E',
        embedAsCFF= "false")]
        public static var _Arial:Class; 
    

    }

    and to test it , I added that

      public function _Arial():void
      {
        var tf:TextField = new TextField();
        tf.defaultTextFormat = new TextFormat ( "_Arial" , 24 , 0 );
        tf.autoSize = TextFieldAutoSize.LEFT;           
                tf.embedFonts = true;
        tf.text = "This is some text to test!";
        tf.rotation = 20;
        addChild(tf);
    
      }
    

    The text did display , so I got rid of the constructor and tried the code example again, and it worked!!!

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

Sidebar

Related Questions

I'm trying to get the following bit of code to work in LINQPad but
I'm trying to get the following SQL statement to work: UPDATE myschema.tableA update_tableA SET
I am new to PHP and trying to get the following code to work:
I'm trying to get my head around why the following doesn't work. I have
I'm trying to get the following code working: string url = String.Format(@SOMEURL); string user
Why do I get following error when trying to start a ruby on rails
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
I get the following error when trying to run the latest Cygwin version of
I'm following several tutorials and references trying to get my kernel set up. I've
I seemed to get the following exception when trying to deploy my application: Caused

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.