3 Replies Latest reply on Sep 17, 2007 1:23 PM by kglad

    TextFormat() bold and italic problem

    cfortin14 Level 1

      I’m trying to format a Dynamic Text field using the code below:

      var oFormat:TextFormat = new TextFormat();
      oFormat.color = QuestionColor;
      oFormat.bold = QuestionBold;
      oFormat.italic = QuestionItalic;
      oFormat.size = QuestionSize;

      The value for each variable is coming from an XML file. The code works except for .bold and .italic, regardless of what I pass to them (either “true” or “false”) the text is bold and italic.

      What am I doing wrong?

      Thank you for your help,