Right now I'm working on a border that will expand as the text width gets larger. and to have the border have a maxium size yet still be able to enter text.
What i'm having trouble with: Once I reach a certain width, backspace dosent reduce the border anymore.
// border code
if (inputTxt.width <= 160)
{
inputTxt.border = true;
inputTxt.autoSize = TextFieldAutoSize.LEFT
} else{
inputTxt.border = true;
trace("working");
inputTxt.autoSize = TextFieldAutoSize.NONE
}
// backspace code
key_bksp.addEventListener(MouseEvent.CLICK, bkspClickListener);
function bkspClickListener(e:MouseEvent):void{
inputTxt.replaceText(inputTxt.text.length-1, inputTxt.text.length,'');
inputTxt.border =true;
}
any help would be appericated
North America
Europe, Middle East and Africa
Asia Pacific