I'm using Flashbuilder 4. I have a Spark TextInput control, and I'm implementing a "Copy" button that will copy the selected text only from within this control to the clipboard (pretty much like the RMB Copy does). How do I do this?
Thanks,
Paddy
I'm using Flashbuilder 4. I have a Spark TextInput control, and I'm implementing a "Copy" button that will copy the selected text only from within this control to the clipboard (pretty much like the RMB Copy does). How do I do this?
Thanks,
Paddy
Try this:
var beginIndex:int = Math.min(myTextInput.textDisplay.selectionActivePosition, myTextInput.textDisplay. selectionAnchorPosition);
var endIndex:int = Math.max(myTextInput.textDisplay.selectionActivePosition, myTextInput.textDisplay. selectionAnchorPosition);