ti serve una funzione di preload e a caricamento effettuato
ridimenzioni l'immagine
Sul primo frame crei la funzione per il caricamento e ridimensionamento
devi crearti un movieclip cuoto che istanzierai mcvuotocodice:preload = function (clip, width, height) { puls.enabled = false; 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 = ""; clip._width = width; clip._height = height; } };
Al pulsante dai il loadMovie e richiami il preload
gli ultimi 2 valori sono le dimensioni 150 rappresenta width 100 heightcodice:on(release){ mcvuoto.loadMovie(file.jpg); //Attribuisco dimensioni all'immagine a = setInterval(preload, 50, mcvuoto, 150, 100,); }
![]()

Rispondi quotando