Andrew Murphy skriver:
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.

Are you sure that you need the positions? The flash.text.engine package has this nifty thing called mirror regions, perhaps they are useful here?

Or perhaps you just need multiple content elements?

It is hard to help when you don't know the purpose.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to