hi everyone. try keep simple can.
i'm trying use setfocus method highlighting default text in text input field.
so bascially when user clicks on text field - text highlighted , can type on it. have 16 text fields akin 'insert text here' prompt our lower ict demographic of users , it's bit tedious expect user highlight text in each field , type on it.
can performed awesomly if tab through text fields not expect many users use method.
i've looked around on net solutions using as3 haven't found has worked me. i'd grateful suggestion or point in right direction....
thanks
if want have clicking textfield end text inside selected, try following...
tf1.addeventlistener(mouseevent.mouse_up, selecttext);
tf2.addeventlistener(mouseevent.mouse_up, selecttext);
tf3.addeventlistener(mouseevent.mouse_up, selecttext);
etc...
function selecttext(evt:mouseevent):void {
evt.currenttarget.setselection(0,evt.currenttarget.length-1);
}
More discussions in ActionScript 3
adobe
Comments
Post a Comment