# Colored text in as

**URL:** <https://forum.kirupa.com/t/colored-text-in-as/61202>\
**Category:** flash\
**Created:** [August 16, 2004, 11:11pm UTC](https://forum.kirupa.com/t/colored-text-in-as/61202 "2004-08-16T23:11:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatnslow](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@fatnslow](https://forum.kirupa.com/u/fatnslow)\
**Post date:** [August 16, 2004, 11:11pm UTC](https://forum.kirupa.com/t/colored-text-in-as/61202/1 "2004-08-16T23:11:45Z")

</div>

Hey, I have this actionscript:

```auto
 
// ****Load XML****************************
myXML = new XML();
myXML.ignoreWhite = true;
receiverXML = new XML();
myXML.onLoad = function(success) {
 myXML.contentType = "text/xml";
 if (success) {
  this.showXML();
 } else {
  trace("Error loading XML file");
 }
};
myIdentifier = Math.round(Math.random()*10000);
myXML.load("sponsor.xml?uniq="+myIdentifier);
receiverXML.onLoad = function() {
 this.contentType = "text/xml";
 _root.currPage = 0;
 this.showXML();
};
// DinKost:
XML.prototype.showXML = function() {
 dinkost.scroll = 1;
 dinkost.htmlText = "";
 var numItems = this.firstChild.childNodes.length;
 var firstItem = numItems-(currPage*showAmount);
 if (currPage == 0) {
  previous._visible = false;
 }
 var lastItem = firstItem-showAmount;
 if (lastItem<=0) {
  lastItem = 0;
  next._visible = false;
 }
 dinkost.htmlText = "DinKost" + "
";
 dinkost.htmlText += this.firstChild.childNodes[0].firstChild.nodeValue+"
";
 dinkost.htmlText += "- [http://www.dinkost.no](http://www.dinkost.no/)";
};

```

from the guestbook tutorial.  
But how can I get these two lines to appear in red and have an url ? :

```auto
 dinkost.htmlText = "DinKost" + "
"; 
 dinkost.htmlText += "- [http://www.dinkost.no](http://www.dinkost.no/)";

```

Thanks for any help,  
fatnslow

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 17, 2004, 12:38am UTC](https://forum.kirupa.com/t/colored-text-in-as/61202/2 "2004-08-17T00:38:26Z")

</div>

[AS]dinkost.htmlText = “\<font color=”#ff0000"\>DinKost\<br\>";  
dinkost.htmlText += “- \<u\>\<a href=“[http://www.dinkost.no](http://www.dinkost.no)”\>[http://www.dinkost.no](http://www.dinkost.no)\</a\>\</u\>\</font\>”;[/AS]
