ciao a tutti,
devo caricare un file mp3 con il preload
ho fatto cosi, ma sembra non funzionare
codice:
// creo un prototype per il preloading
MovieClip.prototype.preload = function(file) {
this.onEnterFrame = function() {
//_root.createClassObject(mx.controls.ProgressBar, "pBar", 1);
pBar._width = 120
pBar._visible = true
car = clip.getBytesLoaded();
tot = clip.getBytesTotal();
perc = Math.round((car/tot)*100);
pBar.setProgress(car, tot);
pBar.label = "LOAD "+perc+"%";
pBar.indeterminate = true;
pBar._width = 110
if (car>=tot && tot>24) {
pBar._visible = false
delete this.onEnterFrame;
gotoAndPlay(2);
}else{
trace (perc)
stop();
}
};
};
preload("loop_01.mp3");
dove sbaglio?
grazie mille