allora t'ho fatto na barra di preload talmente semplice che se la sbagli MI DO UNA RAVANATA NEI DENTI DA SOLO
nel tuo filmato crea una nuova scena, spostala prima della vecchia e chimala loading
poi nel primo fotogramma della scena LOADING
metti questo script che fa tutto da solo
codice:
stop()
function traccia() {
metax = Stage.width/2;
metay = Stage.height/2;
this.createTextField("percentuale", 1, 0, 0, 100, 20);
//this.percentuale.border = true;
this.percentuale.autoSize = "left";
this.percentuale.text = "ciao";
this.createEmptyMovieClip("linea", 3);
this.createEmptyMovieClip("barra", 2);
with (this.linea) {
beginFill(0x000000, 1);
lineStyle(1, 0x000000, 100);
lineTo(0, 0);
lineTo(100, 0);
lineTo(100, 20);
lineTo(0, 20);
endFill();
}
with (this.barra) {
beginFill(0xFF0000, 100);
lineStyle(0, 0x000000, 0);
lineTo(0, 0);
lineTo(100, 0);
lineTo(100, 20);
lineTo(0, 20);
endFill();
}
this.linea._x = metax-(this.linea._width/2);
this.linea._y = metay-(this.linea._height/2);
this.barra._x = metax-(this.barra._width/2);
this.barra._y = metay-(this.barra._height/2);
this.percentuale._x = metax-(this.percentuale._width/2);
this.percentuale._y = metay-(this.percentuale._height/2+this.linea._height);
carica();
}
function carica() {
this.onEnterFrame = function() {
tot = this.getBytesTotal();
car = this.getBytesLoaded();
dif = int(car/tot*100);
this.percentuale.text=dif +"%"
this.barra._xscale=dif
if (tot != undefined) {
if (car == tot) {
delete this.onEnterFrame
removeMovieClip(this.percentuale)
removeMovieClip(this.linea)
removeMovieClip(this.barra)
nextFrame();
}
}
};
}
traccia();