Posted By

Nek on 10/30/09


Tagged

workaround as2 setSelection setFocus


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

pauloc


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


 / Published in: ActionScript
 

  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  

You need to login to post a comment.