Beginner question about flickering
Ok, I'm new to ActionScript, but I can adapt quite easily, so I have started a project, it loads a XML file with some data, after it is loaded it adds a bar for every node it can find in the xml file. The bar is converted to a symbol and acts as a button. Now I want to add a label as a child to the bar. And there comes the problem, when I add the label to the bar, and compile the .fla the label is flickering all the time. I also pull some data from each node to add a text to the label, but its not beeing displayed either. Could someone please explain me, why the label is flickering and the bar is not?
Here is the code so far for adding the bars and the labels
var btn:Standing; // Symbol
var lbl:XmlLabel;
for (var i:int = 0; i < len; i++) {
btn = new Standing();
btn.x = 287;
btn.y = 190 + i * 46;
addChild(btn);
btn.name = "btn" + i;
btn.buttonMode = true;
btn.addEventListener(MouseEvent.CLICK, onButtonClick);
var teamElement:XML = teamElements;
var nameString:String = teamElement.@name;
var winString:String = teamElement.@wins;
var lossesString:String = teamElement.@losses;
var id:int = parseInt(nameString);
for (var o:int = 0; o < 4; o++) {
lbl = new XmlLabel();
lbl.x = 20 + o * 70;
lbl.y = 10;
lbl.text = nameString.toString();
btn.addChild(lbl);
lbl.name = "lbl" + i + o;
}
Thanks for the help