0 Replies Latest reply on Oct 30, 2007 9:45 AM by KBwebpro

    setStyle only works in test

      Does anybody know why the text styles disappear when I publish a movie. The text is in the button label, and the button is in a movie clip. The text movie preview shows the style just fine.

      I load XML data to the buttons which are in a movie clip and move according to the mouse. Flash version 9, actionscript 3.

      Some code:

      import fl.controls.Button;
      import flash.text.TextFormat;

      var myTextFormat:TextFormat = new TextFormat();
      myTextFormat.font = "Georgia";
      myTextFormat.bold = true;
      myTextFormat.color = 0xFFFFFF;
      myTextFormat.size = 17;
      var movie1:mainMc = new mainMc();
      var myButton:Button = new Button();
      myButton.setStyle("textFormat", myTextFormat);

      myButton.label = "some text";