1 Reply Latest reply on Feb 24, 2011 1:43 PM by badaboom_55

    ASDoc Error: Can't find Embedded Fonts?

    badaboom_55 Level 1

      Hello,

       

      I am working in Flash CS5 Professional.
      On my stage, I have a dynamic TextField (my_txt) that uses a basic font, we'll say Arial. However, I want to format some of the text within the field with a custom font.

       

      I've embedded the font and exported to ActionScript as per Adobe's documentation, so now there is a Font item in my library named "MyCustomFont".
      The properties of the Font are -
      Class: MyCustomFont
      Base Class: flash.text.Font

       

      So, I've written a custom class file and I want to format the text, so the AS code within the class looks something like this:

       

      var my_font:Font = new MyCustomFont();
      
      var my_fmt:TextFormat = new TextFormat();
      my_fmt.font = my_font.fontName;
      my_txt.setTextFormat(my_fmt, 5, 15);
      

       

      This is pretty much like the examples I've seen in Adobe Docs. And, it works swimmingly when I test the movie; however, when I try to document the class using the ASDoc command line tool, I get the error:

       

      /Path/To/Project/And/The/Classes/SomeClass.as(221): col: 27 Error: Call to a possibly undefined method MyCustomFont.
      
                  var my_font:Font = new MyCustomFont();
                                         ^
      

       

      I THINK I understand why ASDoc isn't finding the "method" MyCustomFont... the "method" is actually a Class contained in the Library within the .fla.

       

      So, is there a special argument I need to write in the ASDoc command line so that it will recognize embedded fonts?

       

      Or, am I supposed to use an "import" statement in SomeClass to import the embedded fonts somehow?

       

      Thanks!