Hi,
I have the following script which works fine in the "Text Area" component of MX2004:
code:
_root.dym_txt.html = true;
_root.trink_array = ["Carp", "Cod", "Bream"];
_root.trinity_array = new Array();
for (var g = 0; g<=2; g++) {
_root.trinity_array[g] = _root.trink_array[g];
some_str += "<br>"+_root.trinity_array[g]+"</br>";
}
_root.dym_txt.text = some_str;
However, if I try & change the “color” property instead of just putting a break <br> in the text Flash throws it’s toys out of the pram & wont let me use the code to obtain this:
_root.dym_txt.html = true;
_root.trink_array = ["Carp", "Cod", "Bream"];
_root.trinity_array = new Array();
for (var g = 0; g<=2; g++) {
_root.trinity_array[g] = _root.trink_array[g];
some_str += "<font color="#92A312">"+_root.trinity_array[g]+"</font>";
}
_root.dym_txt.text = some_str;
The error message:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 7: Unexpected '}' encountered
}
Comes up?
Any help please.




Reply With Quote