My latest issue is: how do I reference a dynamically created movie clip?
I've attached the code below. The code creates movie clips on the stage starting in the upper left corner and each subsequent movieclip is placed 50 pixels lower. Each movieclip contains an image and text and the number of movieclips is determined by the length of the xml file.
So now I'm to the point of actually creating the animation for my movieclips. I'm wanting to have them scroll up. To do this I need to reference the dynamically created movieclips. I thought I would do this by using the name of the movieclip: myMC.name = "mc" + t; - so that "mc0", "mc1" and so on would refer to the movieclips. This is not so!
When i try to do a trace to find out if "mc0" has any information it it, i get an error.
I hope this explains my issue. Any ideas? Am I thinking about this the wrong way?
Thanks for your help!
var myMC:MovieClip = new MovieClip();
myMC.name = "mc" + t;
myMC.x = 5;
myMC.y = initY;
theLabel = new TextField();
//theLabel.text = String(eventList[t]);
theLabel.text = myMC.name;
theLabel.x = myMC.x + 30;
theLabel.autoSize = TextFieldAutoSize.LEFT;
var format:TextFormat = new TextFormat();
format.font = "Verdana";
format.color = 0xFF0000;
format.size = 12;
format.underline = true;
var i = new Loader();
initY = initY + space;