Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 97529

Re: tlfTextField - Highlight a part of text with "Code"

$
0
0

Thank you for your prompt reply.

 

Well, I checked that and noted "TextFormat" does not have any of these properties:background

backgroundColor

 

I may use another method like this:

 

    function setFont(tlfTxt:TLFTextField):void {

    var tlf:TextLayoutFormat = new TextLayoutFormat();

    var textFlow:TextFlow;

 

    tlf.color = 0xffee66;

    tlf.backgroundColor = 0xff66ee;

 

    //set new format to tlfTxt

    textFlow = tlfTxt.textFlow;

    textFlow.hostFormat = tlf;

    textFlow.flowComposer.updateAllControllers();

    }

 

Then "TextLayoutFormat" have the property "backgroundColor". But still, it does not have "background" property so that I set it to true (even for the whole text). So nothing happens when I add/remove that line.

 

I wonder how this is possible inside Flash CS6, but not with actionscript?

 

In Flash:

- You Double click on any part of text inside "TLF Text" to select it.

- Then you click on "Highlight" and select a color.

- You change different regions of the textfield to different colors. 

 

highlight.png

 

 

 


Viewing all articles
Browse latest Browse all 97529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>