allora andiamo con ordine
Filmato pricipale sul primo frame e un movie clip vuoto che istanziamo per comodità contenitore
codice:
function preload(clip){
car = clip.getBytesLoaded();
tot = clip.getBytesTotal();
perc = Math.round((car/tot)*100);
clip.createTextField("testo", 1, (this._width/2), (this._height/2), 200, 20);
clip.testo.wordWrap = true;
testoformat = new TextFormat();
testoformat.color = "0x123466";
testoformat.font = "Verdana";
clip.testo.setTextFormat(testoformat);
if(!isNaN(perc)) {
clip.testo.text = "Caricamento..."+perc+"%";
clip.testo.setTextFormat(testoformat);
}
if (car == tot && car > 1024) {
clearInterval(a);
clip.testo.text = "";
}
}
in questo modo vedrai il funzionamento del preload che ti andrà a scrivere la percentuale di caricamento
poi richiami la funzione
codice:
istamzapulsante.onRelease = function() {
loadMovie("file.swf", "contenitore");
a = setInterval(preload, 50, contenitore);
};