Hello. :)

Thank you, but this script doesn't appear to return the beginning and ending
indexes of the link.



 ------------------------------
Andrew Murphy
Interactive Media Developer
amur...@delvinia.com

Delvinia
370 King Street West, 5th Floor, Box 4 
Toronto Canada M5V 1J9
P (416) 364-1455 ext. 232
F (416) 364-9830  
W www.delvinia.com


-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis,
Erik (MIN-WSW)
Sent: August 30, 2010 14:23 pm
To: Flash Coders List
Subject: RE: [Flashcoders] Link text indexes in a TextField

This might give you some ideas on accomplishing what you needs to do -use
split().join():

http://troyworks.com/blog/2008/03/14/flash-textfield-actionscript-hyperlink-
in-as30/



_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year

-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Andrew
Murphy
Sent: Monday, August 30, 2010 12:47 PM
To: 'Flash Coders List'
Subject: [Flashcoders] Link text indexes in a TextField

Hi. :)

Does anyone know of a way to get the beginning and ending index of a link
within a TextField?

I want the indexes of the beginning and ending of the text that makes up the
link.  For example if I pass the following HTML text into the TextField:


    [p]Lorem ipsum [a href="event:block1"]dolor sit[/a] amet.[/p]


What I want is the beginning and ending indexes of the "dolor sit" text when
the user clicks on it.  The TextEvent.LINK event passes out the value of the
"href" within the link text (ie: "block1"), which isn't terribly useful in
this case.



( ps:  I used square brackets in the example HTML text rather than angle
brackets to try avoiding issues with the list's mailer, which doesn't like
HTML code in emails. )


 ------------------------------
Andrew Murphy
Interactive Media Developer
amur...@delvinia.com

Delvinia
370 King Street West, 5th Floor, Box 4 
Toronto Canada M5V 1J9
P (416) 364-1455 ext. 232
F (416) 364-9830  
W www.delvinia.com


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to