# Help with \[embed\]

**URL:** <https://forum.kirupa.com/t/help-with-embed/320269>\
**Category:** Uncategorized\
**Created:** [March 18, 2011, 5:23pm UTC](https://forum.kirupa.com/t/help-with-embed/320269 "2011-03-18T17:23:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![knome](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@knome](https://forum.kirupa.com/u/knome)\
**Post date:** [March 18, 2011, 5:23pm UTC](https://forum.kirupa.com/t/help-with-embed/320269/1 "2011-03-18T17:23:02Z")

</div>

Basicaly im just trying to dynamicaly embed a font.  
this is in a separate class…

```auto
package Fonts {
    public class FontSelect {        
        [Embed(source = '../Fonts/tahoma.ttf', 
               fontName = 'TAHOMA',
               fontWeight = 'regular', 
               unicodeRange = 'U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E',
               mimeType = 'application/x-font')]
        
        public static const TAHOMA_FONT :Class;
        public static const TAHOMA :String = "TAHOMA";
    }
}

```

and here is where i call it in the main.

```auto
var myFont:FontSelect = new FontSelect;

var myFormat1:TextFormat = new TextFormat();
    myFormat1.align = "center";
    myFormat1.font = myFont.TAHOMA;  
    myFormat1.size = 13;
    myFormat1.color = 0xFFFFFF;

```

i keep getting this error.

Scene 1, Layer ‘actions’, Frame 1, Line 48 1119: Access of possibly undefined property TAHOMA through a reference with static type Fonts:FontSelect.

i assume it has something to do with the static, and when I remove it the program runs, but the font doesn’t appear on top of my button.

**uploaded full file, but i couldnot include the tahoma.ttf file, because of the forum file size limit. You can copy said file from the"WINDOWS/FONTS" folder and put it in my projects Fonts folder.** \*
