3 Replies Latest reply on Jan 28, 2013 12:22 PM by kglad

    Why set setTextFormat everytime text changes?

    rokosz Level 1

      Originally this request was going to be re: setTextFormat having no effect on font size etc.


      In preparing this question I found that those attribs are working fine, just not sticking


      the following snippet function is called everytime a user changes pictures in a slide show

      I had to add the 4th stmt re setTextFormat in order to keep the text from reverting/becoming Times Roman size 12.


      I tried using defaultTextFormat  but had no effect (perhaps becuase its only avail in AS3?)


      Is this something I've got to shoulder everytime I change the text of a textfield?  Is there now way to define the style of the textfield and make they style "permanent"?


      thanks folks, Bryan



      function picture_num() {
      current_pos = p+1;
      txtPicEnumeration.text =  current_pos+" of "+total;





      var myformat:TextFormat = new TextFormat();



      txtPicEnumeration.textColor= 0xFF0000;  //works
      txtPicEnumeration.border = true;     // works
      txtPicEnumeration.borderColor=0xFF0000;  // works
      txtPicEnumeration.setTextFormat(new TextFormat())
      txtPicEnumeration.text = "XXXXX"
      // above stmt works -- but doesnt stick when picture_num() is called