Topic: Loading image sequentially in chumby
Hi all, i left aside music streaming problem and try to load some of my image into my chumby sequentially (just like photoframe), but i got some problem, here is my example code (just example, in my real application i will use a loop to create loading function and a loop to automatically call setInterval function )
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("myImageContainer",1);
myImageContainer._xscale = 40;
myImageContainer._yscale = 40;
function loading1(){
loader.loadClip("/path/img1",myImageContainer);
clearInterval(myinterval1);
}
function loading2(){
loader.loadClip("/path/img2",myImageContainer);
clearInterval(myinterval2);
}
loader.loadClip("/path/img0",myImageContainer);
myinterval1 = setInterval(loading1,10000);
myinterval2 = setInterval(loading2,15000);
The problem is, everytime i re-load the loader instance, the image did not change to the next one smoothly, the reason is that when loadClip method is called, it immediately remove the old one, but internet delay cause that the next one cound not be loaded right time. I need some advice to solve this problem, thank so much.