Displaying Text

Hi, I swear I’ve gotten this to work when I just did it on the main timeline
but as part of a package I can’t seem to get my text to appear…

package
{

import flash.text.*;
import flash.display.*;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

public class fontMaker extends MovieClip
{
    var beloDin:Font = new Belo(); 
    
    var myFormat:TextFormat = new TextFormat();
    var countyTextFieldBelo:TextField = new TextField();
    var countyFormat:TextFormat = new TextFormat();
    var test:String = "test";
    
    public function fontMaker()
    {
        
        trace("fontmaker is run");
        
        countyFormat.font = beloDin.fontName;
        countyFormat.size = 600;
        countyFormat.color = 0x000000;
        countyTextFieldBelo.autoSize = TextFieldAutoSize.LEFT;
        countyTextFieldBelo.defaultTextFormat = countyFormat;
        countyTextFieldBelo.embedFonts = true;
        countyTextFieldBelo.alpha = 1;
        countyTextFieldBelo.text = test;
        countyTextFieldBelo.x = 300;
        countyTextFieldBelo.y = 400;
        countyTextFieldBelo.selectable = false;
        countyTextFieldBelo.width = 1920;
        countyTextFieldBelo.height = 1080;
        
        keyFont();
        
    }
    
    public function keyFont()
    {
        
        trace ("keyFont has run");
        
        addChild(countyTextFieldBelo);
                                
    }    
}

}

I added that and now get this error:

1120: Access of undefined property countyTextFieldBelo.

I still get the same error.

[quote=ahmednuaman;2325088]Instead of: countyTextFieldBelo.defaultTextFormat = countyFormat;
Try: countyTextFieldBelo.setTextFormat(countyFormat);

Read up on this: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html

(Because the error is: 1120: Access of undefined property countyTextFieldBelo. It’s saying that it can’t find one of the specified properties as being part of the TextField format)[/quote]

Thanks!

not yet. I changed
public class fontMaker extends MovieClip
to
public class fontmaker extends Sprite
then put
var Floader:Sprite = new fontMaker;
in my main Document class
that got rid of the error but still no font visible on the stage.

I noticed fontMaker was changed to FontMaker at:

var fontMaker = new FontMaker();

is that right?

I get this error:
1180: Call to a possibly undefined method FontMaker.

if I make it var fontMaker = new fontmaker();
I get this error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Document()

plus how do I change keyFont to return TextField?