5 Replies Latest reply on Aug 17, 2007 7:31 AM by kglad

    Set text width in order to display the whole message

    lokat
      I have put a dynamic text (multiline) on the stage with width 91.3 and height 21.9 .
      The instance name of the text is "txtdirection".

      On the other hand, I have a variable called "mymessage".

      And my code is like this:

      mymessage = "Turning right....";
      _root.txtdirection.textWidth=mymessage.length;
      _root.txtdirection.text=mymessage;

      But, it didn't display the whole message....
      And I have tried to replace the second line with the following statements, but it still not work....

      _root.txtdirection.length=mymessage.length;
      _root.txtdirection.textWidth=mymessage.textWidth;
      _root.txtdirection._width=mymessage._width;
      _root.txtdirection.textWidth=mymessage._width;

      Is there anything wrong?