# Highlighting a specific text using TextField

**URL:** <https://forum.kirupa.com/t/highlighting-a-specific-text-using-textfield/261396>\
**Category:** flash\
**Created:** [May 27, 2008, 9:50am UTC](https://forum.kirupa.com/t/highlighting-a-specific-text-using-textfield/261396 "2008-05-27T09:50:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tat\_work](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tat\_work](https://forum.kirupa.com/u/tat_work)\
**Post date:** [May 27, 2008, 9:50am UTC](https://forum.kirupa.com/t/highlighting-a-specific-text-using-textfield/261396/1 "2008-05-27T09:50:36Z")

</div>

Hi all, I wonder if there is a way to highlight a specific text in a TextField without highlighting the whole block of text?

The reason I am trying to find a way to do it is that I want to highlight a block of text, but I would like the highlight to end at each line instead of simple highlighting the whole textfield.

Please check attachment, this is what I am tying to do in flash.

Thanks in advance for helping out 🙂

---

<div class="post-metadata">

**Author:** ![dail](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@dail](https://forum.kirupa.com/u/dail)\
**Post date:** [May 27, 2008, 8:56pm UTC](https://forum.kirupa.com/t/highlighting-a-specific-text-using-textfield/261396/2 "2008-05-27T20:56:47Z")

</div>

[http://blog.greensock.com/category/text/](http://blog.greensock.com/category/text/)

---

<div class="post-metadata">

**Author:** ![tat\_work](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tat\_work](https://forum.kirupa.com/u/tat_work)\
**Post date:** [May 28, 2008, 2:51am UTC](https://forum.kirupa.com/t/highlighting-a-specific-text-using-textfield/261396/3 "2008-05-28T02:51:23Z")

</div>

Thanks a lot for your reply!

The server of the link you gave me seems to be either extremely slow or the file is not available for downlod anymore, I can’t download the file. Is it possible if you can send me the class via email?

Also, does it only work with AS3? I wrote my Flash in AS2, I wonder if it’ll be compatible…

> [@dail;2331933](#):
>
> [http://blog.greensock.com/category/text/](http://blog.greensock.com/category/text/)

---

<div class="post-metadata">

**Author:** ![dail](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@dail](https://forum.kirupa.com/u/dail)\
**Post date:** [May 29, 2008, 3:14am UTC](https://forum.kirupa.com/t/highlighting-a-specific-text-using-textfield/261396/4 "2008-05-29T03:14:36Z")

</div>

Its an AS2 class. The servrer downloaded the file fine for me. Here is the link to the example page; [http://blog.greensock.com/textmetrics/](http://blog.greensock.com/textmetrics/)
