3 Replies Latest reply on Oct 2, 2007 11:26 AM by clbeech

    using text format for variables

    Destryp
      I am designing a vocabulary quiz application in flash, and it's based on figuring out the definition of a word when used in context. I have working code to communicate with php and mySql which returns my question in 3 variables.
      question_start // the text of the sentence before the vocab word
      target_word // the actual word
      question_end // the rest of the sentence

      here's the line of code that assigns this to my text field:
      [code]
      question_txt.text = variables.question_start.concat(" ", variables.target_word, " ", variables.question_end);
      [/code]

      this works fine, but I want to make variables.target_word display differently than the rest, either in italics, bold, different color, or whatever. I've tried changing it in the database to:

      <i>word</i>
      the italic tags aren't interpreted, they just come with it. I can't find how to (using AS3 and php5) get that one word italicized.

      I know I could create a text field for just that word that has italics set to true, or put another text field that says "the definition of <word> is:" above my radio group, but I would really prefer to figure out how to embed italics in the sentence.

      Thanks to anyone whom can assist
      p.s.: I was looking for the right tag to display code, but haven't found it yet