Skip navigation
Currently Being Moderated

Problem with compiling AIR with Embed (font) tag

Aug 1, 2012 6:01 AM

Tags: #air #compiling #embedding_font

Hi,

I have an application developed for AIR. When I compile it without the fonts that I need to embed it is compiled without problems when I add the Embed tags then it compiles but when it is running it can not be used, the input text fields cannot be accessed.

Has anybody encountered this problem? What could be the possible reasons?

 

Here is an example of how I embed the fonts.

 

[Embed(systemFont="FreeSans", embedAsCFF='false', fontName="FreeSansEmbed", mimeType="application/x-font")]

private var freeSansFont:Class;

 

Thank you,

Ana

 
Replies
  • Currently Being Moderated
    Aug 8, 2012 6:17 AM   in reply to Ana G. Pino

    Hi Ana,

    Can you try tragetting to a latest AIR SDK?

    If that doesn't help you, could you please tell us your target AIR SDK Version?

     

    Thanks!

    Mohan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 14, 2012 7:14 AM   in reply to Ana G. Pino

    Okay, one can download and traget a Latest AIR SDK's from Flash CS6 onwards using Help>Manage AIR SDK option. Ill see if something can be done in Flash CS5.

     

    Thanks!

    Mohan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2012 6:23 AM   in reply to Ana G. Pino

    I tried this a long time ago and had some success (but I did update to 2.7, then to 3.0, not straight to 3.0, not sure if it matters):

     

    http://blog.prevail.co.nz/2011/06/21/overlaying-air2-7-in-flash-cs5/

     

    You can change the Java heap size allocation and increasing the memory available to it often allows compiles to happen. For Flash CS5.0 you'd find that setting in this file:

     

    C:\Users\[YOUR USER]\AppData\Local\Adobe\Flash CS5\en_US\Configuration\ActionScript 3.0\jvm.ini

     

    I bolded en_US as that's obviously US English, change to your langauge as necessary.

     

    Adjust the value -Xmx128m to -Xmx256m (128mb -> 256mb) and try that. You can also try increasing it to 512m but I've had some issues starting the java virtual machine using that much ram (not sure why). This will increase the amount of ram the compile process is allowed to use.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2012 12:27 PM   in reply to Ana G. Pino

    It helps to a limit but I'm glad it solves your problem. The issue comes when too many assets are in a single SWF. Keep things separated so they're compiled separately and I've had no issue like that.

     

    Good luck!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points