all groups > flash actionscript > february 2004 >
You're in the

flash actionscript

group:

Text selections in new TextArea component


Text selections in new TextArea component dforer
2/25/2004 10:44:54 PM
flash actionscript:
I have spent hours trying to do something with the new MX 2004 Flash TextArea
component that is trivial in the native Flash Text Field: namely,
programatically 'select' text using the Selection-object-methods:
Selection.setFocus("TextAreaInstance") and Selection.setSelection(beginIndex,
endIndex). It just doesn't work. Can someone please help? Thanks in advance.
Re: Text selections in new TextArea component schigh NO[at]SPAM comcast.net
2/28/2004 8:25:33 AM
[quoted text, click to view]

hey i'm having the same problem too.
I postred to the Actionscript.org forums, and nobody as of yet has replied.
Re: Text selections in new TextArea component cwinston
3/22/2004 8:46:28 PM
Re: Text selections in new TextArea component DazFaz
7/12/2004 8:17:11 AM
For some reason flash 2004 will only let you do these commands right at the end
of everything else. God knows why. Anyhow this works:

on (release) {
Selection.setFocus("text");
Selection.setSelection(0, 5);
}

As I have found out this selects every character from 0-5 in the text field
called "text".
AddThis Social Bookmark Button