TextField - behave like PowerPoint
Posted
by user310113
on Stack Overflow
See other posts from Stack Overflow
or by user310113
Published on 2010-04-06T15:25:22Z
Indexed on
2010/04/06
23:03 UTC
Read the original article
Hit count: 381
textfield
|actionscript-3
I have a Dynamic TextField created with ActionScript (multiline, wordwrap & autosize=true).
While running the SWF, if you click into the TextField you get an arrow "move" cursor, then you can double-click to put it into Edit mode to select text. I want it to work like PowerPoint - if you click into the box you'll always get a flashing cursor with the ability to select/insert text, and you can click on the borders to drag, or the corners to resize.
I tried adding the focusIn event textField.stage.focus = this.textField
but this didn't seem to do anything. When you click into the textField, I basically want it to act as though you followed with a double-click (Edit mode) without actually having to do the double-click.
Bonus: and instead of a 2nd double-click returning you to the Move mode (or whatever it's called) I want to select all text.
TL;DR: Is there some property of a Dynamic TextField that I can get/set to see if I'm in Edit or Move mode?
© Stack Overflow or respective owner