I have a situation where a user types .5 into an input textfield. What I'm trying to do is change that to 0.5 after they type the .5
In my textfield onChange event I have
What I'm trying to do up here is when the user types "." it changes to 0. then I need to move the cursor 1 place passed the the decimal so the user can type in there after the decimal numbers.Code:var firstCharacter:String = text.charAt(0); if( firstCharacter=='.' ){ trace("text = "+text); text = '0' + '.'; Selection.setSelection( 1, 1 ) }


Reply With Quote