Make text field content selected and drop selection from the text field selected before. For AS2


/ Published in: ActionScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. input.onSetFocus = function(old:TextField):Void {
  2. Selection.setSelection(0, 0);
  3. var lo:Object = new Object();
  4. lo.tf = this;
  5. lo.onMouseUp = function() {
  6. trace(this.tf);
  7. Selection.setSelection(0, this.tf.text.length);
  8. Mouse.removeListener(this);
  9. };
  10. Mouse.addListener(lo);
  11. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.