Crea un nuovo filmato, e metti nel primo frame un pulsante con nome di istanza "botton". Poi incolla nello stesso frame questo script:
codice:
this.select = new Object();
this.createTextField("testo_txt", 1, 10, 10, 150, 20);
this.testo_txt.background = true;
this.testo_txt.text = "Ciao a tutti raga!";
this.onMouseDown = function()
{
this.select.begin = Selection.getBeginIndex();
this.select.end = Selection.getEndIndex();
this.select.cursor = Selection.getCaretIndex();
};
this.bottone.onRelease = function()
{
var p = this._parent;
trace(p.testo_txt.text.substring(p.select.begin, p.select.end));
}