Run-time Font Error - Help Needed!

First of all, the name of this thread is wrong - I meant to say ‘Compile-time’…

I am having trouble with a Font Class from the library, all I am trying to do is recreate this tutorial. The frustrating thing is that my application was working fine just the other day, with the same font class & text format, and now it is not.

I, of course, have checked the linkage name is the correct “AvenirMed” and have turned on “Automatically Declare Stage Instances” and neither of these are the problem. I have seen threads mentioning this problem can arise if you have folder names the same as you document class, which I dont. I am using CS3 also.

This is (part of) the code in my class…

private var textformat:TextFormat;
private var avenirMedFont:Font;
        public function ProjectInfoBox() {}
        public override function initGui():void
            avenirMedFont = new AvenirMed();

            textformat = new TextFormat();
            textformat.size = 12;
            textformat.align = TextFormatAlign.LEFT;
            textformat.font = avenirMedFont.fontName;
            textformat.color = 0xFFFFFF;

The Error I am getting is:

ReferenceError: Error #1065: Variable AvenirMed is not defined.

Can someone explain what it might mean when I am getting this error? AvenirMed is the name of the Class I am trying to instatiate not the name of a Variable… Any help appreciated.