I’m trying create a simple image slide show using the MovieClipLoader and setInterval, and I can’t get a reference back to my dynamic MC logo containers.
In my class I have :
private function createSlides(logoData:Object){
trace('//Creating Slides');
var ref = this;
totalLogos = logoData.length;
for(var i = 0; i < totalLogos; i++){
var tempLogo = target.createEmptyMovieClip('logo'+i, target.getNextHighestDepth());
tempLogo.website = logoData*.attributes.website;
imageLoader.loadClip(logoData*.attributes.image,tempLogo);
}
logoInterval = setInterval(this,'slideshow',3000);
}
‘target’ is a reference back to the main MC instance(container). Images load just fine.
private function slideshow():Void {
trace(target);
trace(currLogoIdx);
trace('grrr = '+ target.logo[currLogoIdx]);
//var logoFadeIn:Tween = new Tween(target.logo[currLogoIdx], "_alpha", Strong.easeIn, 0, 100, 1, true);
if(currLogoIdx == (totalLogos - 1)){
currLogoIdx = 0;
} else {
currLogoIdx++;
}
}
My trace on ‘target’ and ‘currLogoIdx’ return proper values, but the one on target.logo[currLogoIdx] returns undefined.
If I trace('grrr = '+ target.logo1); or logo2, logo3 and so on, it returns the proper MC path. Any ideas?