Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / September 2008



Tip: Looking for answers? Try searching our database.

change TextArea text color selectively

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rritchey - 29 Sep 2008 15:54 GMT
I am trying to change a small portion of the text inside of a TextArea.  My
attached code references the textField of the TextArea component, and attempts
to apply the setTextFormat command on that textField.  For some reason this
does nothing.  Any ideas?

acpmtf = new TextFormat();
acpmtf.font = i.Font_Family;
acpmtf.size = i.Font_Size;
acpmtf.color =i.Already_Completed_Page_Message_Color;

points.htmlText =
_msm.getCStyle("DefaultAlertText_Already_Completed_Page").toString()+"<br><br>";
// points is a TextArea  The getCStyle function calls up the text to enter
into the area from my custom style manager.
       
acptl = points.text.length;
       
points.textField.setTextFormat(acpmtf,0,acptl);
rritchey - 29 Sep 2008 18:50 GMT
I was able to resolve this by placing the color I want to change the text to in
as HTML.

points.htmlText = "<font
color='#"+_msm.getCStyle("Default_Already_Completed_Page_Message_Color").toStrin
g().split("0x")[1]+"'>"+_msm.getCStyle("DefaultAlertText_Already_Completed_Page"
).toString()+"</font><br><br>";
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.