embedFont = true causes the text to disappear in flash

Posted on 2009-04-30
Last Modified: 2013-11-11
Hi guys,

I am currently building a dynamic carousel type project in flash. It's run via an XML file. So I am dynamically creating everything including a text field which sits underneath the image. The problem is this. As the text field is dynamic, i need to dynamically set/embed the font (Helvetica). I have create a new font in my library and given it the linkage name fHelvetica.

Below is the code with which I am attempting to set the textfields formatting.

On runtime, the text within the text area does not display if i have embedFont=true. If i set it to false, it does not recognise fHelvetica and just displays in Times New Roman (default).

Any help would be amazing, really in a rush to get this fixed now.
// Style vars

var oFontStyle:Font = new fHelvetica();

var oBoothTitleFormat:TextFormat=new TextFormat();




var oText:TextField=oMovie.createTextField("oBoothTitle"+nId,_root.oBoothHolder.getNextHighestDepth(),0,0,0,0);




oText.text=_oBoothCache[0][1]//"Test text";


Open in new window

Question by:jhaley-telecomtv
    LVL 34

    Accepted Solution

    Flash is sometime really unpredictable :)

    when creating font symbol does not work for any reason.
    Just try following method..

    1. Create a dynamic textField in FLA before the frame where you need to use the font in script first time.
    2. place the dynamic textField out of the stage area so that it should not be visible when application runs.
    3. Select the textField and set the font you want to embed, (in your case it is Helvetica)
    4. Now embed all required font glyphs into the textField using "embed fonts" button in properties panel.

    5. Just compile your application and now all should be working fine

    Aneesh Chopra


    Author Comment

    Thanks Aneesh.

    No luck there though.

    If I remove embedFonts, the font's show, but not as helvetica, so it's like it is not seeing dHelvetica as a valid font. Yet it is in the flash font list. So when i created the textarea, i could choose "fHelvetica*". I have tried the following aswell to no avail!


    Open in new window


    Author Comment

    Sorry, I meant fHelvetica!
    LVL 34

    Expert Comment

    by:Aneesh Chopra
    sorry, you should remove the your font symbol from library before implementing my earlier suggestion.
    and must choose Helvatica from the font list.

    I know that by using this approach you might have to change all references to your font symbol.
    but this is required and then my suggested solution will work.


    Author Comment

    Ah yes that works! Thankyou. Very frustrating issue. Is there anyway around it? Is it addressed in AS3?

    Author Closing Comment


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    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 live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

    755 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

    16 Experts available now in Live!

    Get 1:1 Help Now