Bonjour, comme je suis débutant, j'ai récupéré un script pour faire un preload contenant une animation. Le clip a été crée avec createEmptyMovieClip et duplicateMovieClip mais quand le chargement de l'image qui est en séquence 2 apparait, le clip est toujours présent devant l'image. Je voudrais effacer le clip entièrement et pas seulement faire apparaitre l'image devant ce clip.
Voici le script :
stop();
Preload_mc.onLoad = function() {
this._xscale = 0;
this._yscale = 0;
};
Preload_mc.onEnterFrame = function() {
_global.a = _root.getBytesLoaded()/_root.getBytesTotal()*100;
this._x=280;
this._y=200;
this._xscale = a;
this._yscale = a;
if (a == 100) {
nextScene();
}
};
function setzeTrailer(anz, radius) {
_root.createEmptyMovieClip("ball", 1000);
with (_root.ball) {
beginFill(0x000055, 100);
moveTo(radius*Math.cos(0), radius*Math.sin(0));
for (i=0; i<360; i++) {
lineTo(radius*Math.cos(i*(Math.PI/180)), radius*Math.sin(i*(Math.PI/180)));
}
endFill();
ball._x = 280;
ball._y = 300;
}
ball.onEnterFrame = function() {
i += 0.1;
this._x = 280+(Math.cos(i)*110);
this._y = 200+(Math.sin(i)*110);
};
// Verfolger
for (var i = 0; i<anz; i++) {
_root.ball.duplicateMovieClip("ball"+i, tiefe--);
var wert = 100-i*(10/(anz/10));
_root["ball"+i]._alpha = wert;
_root["ball"+i]._xscale = wert;
_root["ball"+i]._yscale = wert;
_root["ball"+i].prevmc = i>0 ? "ball"+(i-1) : "ball";
_root["ball"+i].onEnterFrame = function() {
this._x += (_root[this.prevmc]._x-this._x)/2;
this._y += (_root[this.prevmc]._y-this._y)/2;
};
}
}
setzeTrailer(20, 20);
De plus, plutôt que de charger l'image en séquence 2 ou en image 2, est-il possible de faire un preload qui charge une animation externe.
Merci pour vos réponses.