?
Solved

Flash htmlText Font Color??

Posted on 2004-10-05
2
Medium Priority
?
573 Views
Last Modified: 2013-12-03
Trying to figure out how to make some text a different color?  Can I override broadcastSubtitleFormat.color = 0xffffff; by setting <font color='#FFBE3C'> in broadcastSubtitle_txt.htmlText  for one word?  Any other suggestions are appreciated.  TIA.

if (_global.broadcastSubtitle_array[titleNo] != undefined) {
            createTextField("broadcastSubtitle_txt", 790, 15, 180, 175, 60);
            broadcastSubtitle_txt.multiline = true;
            broadcastSubtitle_txt.wordWrap = true;
            broadcastSubtitle_txt.border = false;
            broadcastSubtitle_txt.selectable = false;
            broadcastSubtitle_txt.html = true;
            //broadcastSubtitle_txt.embedFonts = true;
            broadcastSubtitle_txt.htmlText = _global.broadcastSubtitle_array[titleNo]+" <font color='#FFBE3C'><a href = 'http://www.yahoo.com'>More</a></font>";
            broadcastSubtitleFormat = new TextFormat();
            broadcastSubtitleFormat.font = "Arial";
            //broadcastSubtitleFormat.bold = true;
            broadcastSubtitleFormat.color = 0xffffff;
            broadcastSubtitleFormat.size = 10;
            broadcastSubtitle_txt.setTextFormat(broadcastSubtitleFormat);
      }
0
Comment
Question by:splendorx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
negatyve earned 500 total points
ID: 12235582
Actually I would do it in two ways (of choice):

1.

createTextField("broadcastSubtitle_txt", 790, 15, 180, 175, 60);
broadcastSubtitle_txt.multiline = true;
broadcastSubtitle_txt.wordWrap = true;
broadcastSubtitle_txt.border = false;
broadcastSubtitle_txt.selectable = false;
broadcastSubtitle_txt.html = true;
//broadcastSubtitle_txt.embedFonts = true;
broadcastSubtitle_txt.htmlText = "<font face='Arial' size='10' color='#FFFFFF'>" + _global.broadcastSubtitle_array[titleNo] + " <font color='#FFBE3C'><a href = 'http://www.yahoo.com'>More</a></font></font>";


2.

createTextField("broadcastSubtitle_txt", 790, 15, 180, 175, 60);
broadcastSubtitle_txt.multiline = true;
broadcastSubtitle_txt.wordWrap = true;
broadcastSubtitle_txt.border = false;
broadcastSubtitle_txt.selectable = false;
broadcastSubtitle_txt.html = true;
//broadcastSubtitle_txt.embedFonts = true;
broadcastSubtitle_txt.text = _global.broadcastSubtitle_array[titleNo] + " More";
broadcastSubtitleFormat = new TextFormat();
broadcastSubtitleFormat.font = "Arial";
//broadcastSubtitleFormat.bold = true;
broadcastSubtitleFormat.color = 0xffffff;
broadcastSubtitleFormat.size = 10;
broadcastSubtitle_txt.setTextFormat(broadcastSubtitleFormat);
overrided = new TextFormat();
overrided.color = 0xfFFBE3C;
overrided.url = "http://www.yahoo.com/";
overrided.target = "_blank";
var ini = broadcastSubtitle_txt.text.indexOf("More");
var end = ini + "More".length;
broadcastSubtitle_txt.setTextFormat(ini, end, overrided)
0
 
LVL 1

Author Comment

by:splendorx
ID: 12238041
Thank you.  It works great!!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question