I can’t figure this out. I have a list of thumbnails and titles that populate from an XML file via the MovieClipLoader() class. Everything works beautifully but after a few seconds, all the thumb images dissapear. Then a few seconds later, they appear again. This happens over and over. The title text doesn’t change.
Here is the code that loads the thumbnail images. The XML data is held in _global arrays created in my container SWF file.
Any thoughts or suggestions on this would be great. I’m really stumped here, and it’s probably something obviouse.
thumbSpace = 45;
titleSpace = 45;
for (i=0; i < _global.total; i++) {
//create thumbnail movie clips via loop
newThumb = thumb_container_mc.createEmptyMovieClip("thumb_"+i+"_mc", i);
newThumb._y = i*thumbSpace;
loadThumb(i);
//display title text
newTitle = thumb_container_mc.title_container_mc.createTextField("title_"+i+"_txt", i, 50, 50, 85, 40);
newTitle.text = _global.description*;
newTitle.multiline = true;
newTitle.wordWrap = true;
newTitle._y = i*thumbSpace;
// format title text
titleFormat = new TextFormat();
titleFormat.color = 0x000000;
titleFormat.font = "Arial";
titleFormat.size = 9;
newTitle.setTextFormat(titleFormat);
}
//function for loading images into newly created thumbnail movie clips
function loadThumb(t){
myMCL = new MovieClipLoader();
myMCL.loadClip(_global.thumb[t], newThumb);
//add listener
myListener = new Object();
myMCL.addListener(myListener);
//listen for load complete
myListener.onLoadComplete = function(targetMC) {
//movie clips fade in
targetMC._alpha = 0;
targetMC.onEnterFrame = function(){
targetMC._alpha += 10;
}
//onPress event handler
targetMC.onPress = function() {
this.onRelease = function() {
_global.portfolioItem = t;
_root.swapHeader(_root.portfolio_header_mc);
_root.swapMovie("portfolio");
};
};
};
}