# A classic - html tags won't work

**URL:** <https://forum.kirupa.com/t/a-classic-html-tags-wont-work/158364>\
**Category:** flash\
**Created:** [August 9, 2005, 10:48am UTC](https://forum.kirupa.com/t/a-classic-html-tags-wont-work/158364 "2005-08-09T10:48:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macro\_design](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Macro\_design](https://forum.kirupa.com/u/Macro_design)\
**Post date:** [August 9, 2005, 10:48am UTC](https://forum.kirupa.com/t/a-classic-html-tags-wont-work/158364/1 "2005-08-09T10:48:20Z")

</div>

Hi,

I’m creating a new website, and it has to be fairly dynamic. So, I load everything through one XML document. Now, depending on the content of a certain child in each menu, it loads a new page. There are going to be about 10 pages, to choose between.

So, I start coding, and all the content works fine, but my html tags won’t work. I’ve activated the “render as html” button, in the textField parameter (the instance name is: “nyhedText”). I’ve also written, nyhedText.html = true; and nyhedText.htmlText = theContent - not the exact same names, but it is the same code.

My entire code for the page is:  
[AS]// defines the variable model1\_spacing  
var model1\_spacing = 0;  
// defines the variable model1\_count  
var model1\_count = 0;  
// the function that creates the whole thing, after the XML is loaded  
function createModel1(menu1\_xml) {  
// starts with the first item in the XML  
var model1\_item = menu1\_xml.firstChild.firstChild.childNodes[goldenNumber].childNodes[2].childNodes;  
// selected menu -\> array  
for (var q = 0; q\<model1\_item.length; q++) {  
// finds the header  
var nyhedHeader = model1\_item[q].childNodes[0];  
// finds the text  
var nyhedText = model1\_item[q].childNodes[1];  
// finds the link  
var nyhedLink = model1\_item[q].childNodes[2];  
// creates the elements in the array  
var model1\_mc = _root.container.attachMovie(“model1\_item”, "model1_"+model1\_count, model1\_count);  
// placing the elements  
model1\_mc.\_y = model1\_spacing;  
// model1\_number  
model1\_mc.modelNumber = q;  
// adds to the count  
model1\_count++;  
// textField link  
model1\_mc.nyhedLink.html = true;  
model1\_mc.nyhedLink.htmlText = nyhedLink  
// textField header  
model1\_mc.nyhedHeader.autoSize = true;  
model1\_mc.nyhedHeader.htmlText = nyhedHeader;  
// textField text  
model1\_mc.nyhedText.autoSize = true;  
model1\_mc.nyhedText.\_y = model1\_mc.nyhedHeader.\_y+model1\_mc.nyhedHeader.\_height;  
model1\_mc.nyhedText.html = true;  
model1\_mc.nyhedText.htmlText = nyhedText;  
// model1\_spacing  
model1\_spacing += model1\_mc.\_height+20;  
// number  
model1\_mc.number.text = q+1;  
}  
}  
// manage XML  
// create new XML object instance, remembering to ignore white space  
var content\_xml = new XML();  
content\_xml.ignoreWhite = true;  
// define an onLoad to create our location menu when the XML has successfully loaded.  
content\_xml.onLoad = function(success) {  
if (success) {  
createModel1(this);  
} else {  
trace(“Error loading XML file”);  
}  
// no success? trace error (wont be seen on web)  
};  
// load the xml file!  
content\_xml.load(“indhold.xml”);[/AS]Any hints or help, would be much appreciated.
