0 Replies Latest reply on Oct 6, 2009 1:33 PM by sabbamonte

    TextField.textWidth property not accurate

    sabbamonte

      Hello all,

       

      I wrote a class that substitute certain characters in a string with a movie clip. 

       

      Example:    objectName.FormatText( "Press $A_button" )

       

      The '$A_button' would be replaced by a movie clip named A_Button now I am using TextField.textWidth to determine how many pixels the "Press " part of the string takes up so my movie clip can be placed correctly after the space character.

       

      The issue I am running into is that if I take the pixel width of each character individually and add them up, I am getting a different width when I get the pixel width of the entire string.  And both values seem to be wrong.

       

      Any information would be extremely helpful.

      Thanks.