TextArea text highlight color, can you customize it and how?


== environment

i'm using flash cs4, player 10 on pc. code deployed local webserver.

 

 

== situation

i have textarea receptacle text loaded , parsed xml file delivered php.

the text contains html tags. have edited component background of textarea component black , text white. set background black clicking component itself, drilling down graphic element , changing background color black using paint bucket in color select control panel. changed text white using textformat line in actionscript.

 

 

== goal

change color of highlighting occurs when user clicks mouse , drags across several words or lines. because change colors of text , background, 1 cannot see words being highlighted although have confirmed 1 can select words , copy them. argument's sake, let's i'd change highlight blue. 

 

(extra credit: there way set background color of text component in as3? credit: there online docs can teach me, fishing versus menu , that...)

 

 

== code

 

    // line changes contents of text area based on selection box
    info_txt.htmltext                   = reader.episodes[episode_cb.selectedindex].description;

    // these 2 lines set font arial, 12 point, white

    var myformat:textformat     = new textformat("arial", 12, 0xffffff);
    info_txt.setstyle("textformat", myformat);

 

    // line ain't doin' squat!!!!!!!!!!!!!
    info_txt.setstyle("selectioncolor", "0xff0000"); 

 

 

bueller? pointers? names of properties? use style sheet level property or text format , of documented? i've spent perhaps 3 hours researching online. several large "doh!" welts far , tired of answers 2004...

the best solution custom formatting on textarea use textfield , uiscrollbar instead. more user friendly. alternately, can edit textarea component change background color. set new color selection, can use selectionbeginindex , selectionendindex identify substring of text. can apply textformat substring.

 

look through flash textarea, google property, method, event or style looks interesting. you'll find has written it.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO