look into getBeginIndex/getEndIndex
create a textField on the stage: (output_txt);
and try this code:
PHP Code:
output_txt.text = "wer j34o85 94o57 oiu 5yp988uvoiun p9875t 987t98 7n09v87n0987 n9870987 987t";
var selectionString:String;
function copySelected():Void {
var startIndex:Number = Selection.getBeginIndex();
var endIndex:Number = Selection.getEndIndex();
selectionString = output_txt.text.substring(startIndex, endIndex);
trace("SELECTED TEXT: " + selectionString);
}
///*
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function () {
};
mouseListener.onMouseUp = function () {
copySelected();
};
Mouse.addListener(mouseListener);
should capture the selected text from the dynamic textField and store it in a variable.. you can just 'paste' the data form that var into another textfield..