Have you tried using the AS2 TextSnapshot class? You might be able to
use this because the TextArea component itself is a movie and the
TextSnapshot class has methods providing the info you're looking for.

Check it out here...hope that gives you some help:

http://livedocs.macromedia.com/flash/mx2004/main_7_2/00001851.html

rob

-----Original Message-----
From: Dimitrios Gianninas
[mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 29, 2005 12:23 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]


Thanks.

Tried it on the focusOut event of both TextArea and TextInput and both
work the same... it returns entire text entered, not just what I
highlighted.

Close, but no cigar.


-----Original Message-----
From:   JesterXL [mailto:[EMAIL PROTECTED]
Sent:   Sat 1/29/2005 10:27 AM
To:     flexcoders@yahoogroups.com
Cc:     
Subject:        Re: [flexcoders]

Selection is a Singleton class controls the selection and focus in the
Flash 
player. The example below probably does not work alone for a few
reasons:
- you must have the code run when you've actually have something
selected.
- sometimes triggering the code will have it run after whatever
textfield 
your typing in has lost focus

I know this works on textfields, but not too sure about the TextArea.
My 
suggestion is to have this code run in a focusOut event.


----- Original Message ----- 
From: "Dimitrios Gianninas" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Saturday, January 29, 2005 8:54 AM
Subject: RE: [flexcoders]



Ok, but what is "Selection" ? The code below does not work as is.

-----Original Message-----
From: JesterXL [mailto:[EMAIL PROTECTED]
Sent: Fri 1/28/2005 11:23 PM
To: flexcoders@yahoogroups.com
Cc:
Subject: Re: [flexcoders]

var beginIndex:Number = Selection.getBeginIndex();
var endIndex:Number = Selection.getEndIndex();
var str:String = yourTextArea.text.substr(beginIndex, endIndex);
trace("you've selected: " + str);

----- Original Message ----- 
From: "Dimitrios Gianninas" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Friday, January 28, 2005 11:04 PM
Subject: [flexcoders]




Does anyone know...

Say I have a TextArea and I type some text in it. Then I highlight a
word,
is there a way to get the currently highlighted text via AS2?

Thanks!

Jimmy G.


<table width=800 cellpadding=4 cellspacing=10 border=0><tr
bgcolor=BDBDBD><td valign=top width=400><font face=verdana size=2
color=FFFFFF><b>AVIS IMPORTANT</b></font></td><td valign=top
width=400><font
face=verdana size=2 color=FFFFFF><b>WARNING</b></font></td></tr><tr><td
valign=top width=400><p align=justify><font face=verdana size=1
color=808080> Les informations contenues dans le present document et ses
pieces jointes sont strictement confidentielles et reservees a l'usage
de la
(des) personne(s) a qui il est adresse. Si vous n'etes pas le
destinataire,
soyez avise que toute divulgation, distribution, copie, ou autre
utilisation
de ces informations est strictement prohibee. Si vous avez recu ce
document
par erreur, veuillez s'il vous plait communiquer immediatement avec
l'expediteur et detruire ce document sans en faire de copie sous quelque
forme.</td><td valign=top width=400><p align=justify><font face=verdana
size=1 color=808080> The information contained in this docu!
ment and attachments is confidential and intended only for the person(s)
named above. If you are not the intended recipient you are hereby
notified
that any disclosure, copying, distribution, or any other use of the
information is strictly prohibited. If you have received this document
by
mistake, please notify the sender immediately and destroy this document
and
attachments without making any copy of any kind.</td></tr></table>




Yahoo! Groups Links









Yahoo! Groups Links













Yahoo! Groups Links







 
Yahoo! Groups Links



 







<table width=800 cellpadding=4 cellspacing=10 border=0><tr
bgcolor=BDBDBD><td valign=top width=400><font face=verdana size=2
color=FFFFFF><b>AVIS IMPORTANT</b></font></td><td valign=top
width=400><font face=verdana size=2
color=FFFFFF><b>WARNING</b></font></td></tr><tr><td valign=top
width=400><p align=justify><font face=verdana size=1 color=808080> Les
informations contenues dans le present document et ses pieces jointes
sont strictement confidentielles et reservees a l'usage de la (des)
personne(s) a qui il est adresse. Si vous n'etes pas le destinataire,
soyez avise que toute divulgation, distribution, copie, ou autre
utilisation de ces informations est strictement prohibee. Si vous avez
recu ce document par erreur, veuillez s'il vous plait communiquer
immediatement avec l'expediteur et detruire ce document sans en faire de
copie sous quelque forme.</td><td valign=top width=400><p
align=justify><font face=verdana size=1 color=808080> The information
contained in this document and attachments is confidential and intended
only for the person(s) named above. If you are not the intended
recipient you are hereby notified that any disclosure, copying,
distribution, or any other use of the information is strictly
prohibited. If you have received this document by mistake, please notify
the sender immediately and destroy this document and attachments without
making any copy of any kind.</td></tr></table>
 
--------------------------------------------------------

This message contains information from Merlin Securities, LLC, or from one of 
its affiliates, that may be confidential and privileged. If you are not an 
intended recipient, please refrain from any disclosure, copying, distribution 
or use of this information and note that such actions are prohibited.If you 
have received this transmission in error, please notify the sender immediately 
by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered through 
Merlin Securities, LLC are not insured by the FDIC or any other 
FederalGovernment Agency, are not deposits of or guaranteed by Merlin 
Securities,LLC and may lose value. Nothing in this communication shall 
constitute a solicitation or recommendation to buy or sell a particular 
security.


Reply via email to