Return to Snippet

Revision: 48389
at June 30, 2011 06:24 by codism


Initial Code
Code:
_HomeMenuButtons[i].btn_txt.autoSize = TextFieldAutoSize.LEFT;
_HomeMenuButtons[i].btn_txt.text = _menuElements[i];
var wid:Number = _HomeMenuButtons[i].btn_txt.width;
_HomeMenuButtons[i].btn_txt.autoSize = TextFieldAutoSize.NONE;
_HomeMenuButtons[i].btn_txt.width = wid + 20;
_HomeMenuButtons[i].btn_txt.defaultTextFormat = MenuFormat;
_HomeMenuButtons[i].btn_txt.setTextFormat(MenuFormat);

Initial URL
http://www.actionscript.org/forums/showthread.php3?t=184888

Initial Description
OK sorted it with some mates from TwentySixLeeds.com
What you need to do is grab the length of the text, then knock off the autosize and then pad it!
Code would look something like this:

Initial Title
Cropped Last Character on static text field

Initial Tags

                                

Initial Language
ActionScript 3