mods, this is a cross post: delete if necessary, just trying to get in the habit of using this forum without sacrificing the traffic of the as board.

hi. i cant get the a style sheet to load when using an array. the following loads the text fine, and applies the style sheet fine if i dont use an array. can anyone see what i'm missing? thanks.

var xs = new TextField.StyleSheet();
xs.setStyle("textlabel", {color:'#335050', fontFamily:'verdana,sans-serif', fontSize:'10'});
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
m = x.childNodes.length;
if (success) {
for (i=0; i<=m; i++) {
s = x.childNodes[i].childNodes[0].childNodes;
r = _root.createEmptyMovieClip("page"+i, i);
r.createTextField("n", 0, 0, i*20, 200, 300);
r.n.styleSheet = xs;
r.n.text = s;

edit: i tried this too, no good


xs.setStyle("<textlabel>", {color:'#335050', fontFamily:'verdana,sans-serif', fontSize:'10'});