1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
//Déclarations
var mclListenerNext:Object = new Object();
var NextMovieLoader:MovieClipLoader = new MovieClipLoader();
NextMovieLoader.addListener(mclListenerNext);
var IndexNext:Number;
var NextImageLoaded:Boolean = false;
//Création du listener
mclListenerNext.onLoadComplete = function(target_mc:MovieClip,httpStatus:Number) {
NextImageLoaded = true;
};
//Chargement dynamique de l'image dans le clip
NextMovieLoader.loadClip(baseFolder + oDiaporama[IndexNext],NextContainer);
//Extention du proto Clip (Anciene convention syntaxique)
NextMovieLoader.index = IndexNext;
NextMovieLoader.diaporamaLength = oDiaporama.length;
NextMovieLoader.getNext = function():Number{
if ((this.index+2) >= this.diaporamaLength) {
return (this.index+2) - this.diaporamaLength;
} else {
return this.index+2;
}
} |
Partager