Flash Help: Right Align Pixel fonts in Flash
- Started
- Last post
- 5 Responses
- ok_jason
Right Align Pixel fonts in Flash
Anybody ever get this one done right?I know you are supposed to left align, but you can achieve the effect by using the textFormat Obj. I am calculating the width but it seems off by a few pixels..??
- unfittoprint0
Math.round it.
- ok_jason0
It is off by far more than a fraction of a pixel. It is actually sharp..it is just being funky about returning the true textWidth of the string.
um. unfit, have you ever manually right aligned pixel fonts in flash via code..and kept them sharp..
- unfittoprint0
yes. used the autosize method.
textfield.autosize = "right".
the thing is if you're using dynamic text, u should give a little delay (use a 30 ms setinterval and then clear it) until the box is resized with the new content. After that, align it using Math.round to give you an integer number of the textbox width.
- ok_jason0
thanks. I will give that a try..
- ok_jason0
Damn...that totally worked.
thisText_txt.autoSize = 'Right"