I can’t get the .css to work inside flash can anyone help?
car1.xml
<?xml version=“1.0”?>
<compare>
<vehicle>
<name>Mazda 6 Sedan</name>
<comment>The Mazda 6 Sedan;is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file. </comment>
<image>images\mazda6_sedan.jpg</image>
</vehicle>
<compare>
Mazda.css
name {
color: #000000;
font-family: Tahoma;
font-size: 18px;
font-weight: bold;
display: block;
}
comment {
color: #ff0000;
font-family: Tahoma;
font-size: 14px;
font-weight: normal;
display: block;
}
Action script
//init TextArea component
comment_txt.html = true;
comment_txt.wordWrap = true;
comment_txt.multiline = true;
comment_txt.label.condenseWhite=true;
//load css
compareStyle = new TextField.StyleSheet();
compareStyle.load(“mazda.css”);
name_txt.styleSheet = compareStyle;
comment_txt.styleSheet = compareStyle;
//load xml
function loadXML(loaded) {
if (loaded) {
_root.vehicle = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.image = this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
name_txt.text = _root.vehicle;
comment_txt.text = _root.comments;
empty_MC.loadMovie(_root.image);
} else {
trace(“file not loaded!”);
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“car1.xml”);
I have 2 dynamic boxes one called comment_txt and the other name_txt but the css does not apply to anything?
what am i doinf wrong?