Extending the textfield

I am extending the Textfield and and formatting with a font I have in the library (swissHeavy). This is fine when I do it in the main timeline but not in my package. I have tried to import it but all that appears is the border and no text. Can someone help?

package{

import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.AntiAliasType;
import swissHeavy;

public class MyTextField extends TextField
    {
        //private var final:uint = 100;
        var style1:TextFormat = new TextFormat(new swissHeavy().fontName, 20,  0xffffff  );
        var style2:TextFormat = new TextFormat(new swissHeavy().fontName, 12,  0xffffff  );
    
    
    
    public function MyTextField(myName, myMessage){
        
        trace(myName);
    
    super();
    this.embedFonts = true;
    this.text = "hello";
    this.border = true;
    this.defaultTextFormat = style1;
    this.x = 200;
    this.y = 200;
    }

}}