ciao!!
ho questo codice che mi carica correttamente e mi fa il resize dell'immagine caricata.
Però vorrei che l'immagine diventasse delle dimensioni definite ingrandendosi un poco alla volta. Come posso fare?![]()
i=perc;
big1._alpha=0;
big2._alpha=0;
function preload1(clip1, width1, height1){
car = clip1.getBytesLoaded();
tot = clip1.getBytesTotal();
perc = Math.round((car/tot)*100);
clip1.createTextField("testo", 1, (this._width/2), (this._height/2), 200, 20);
clip1.testo.wordWrap = true;
testoformat = new TextFormat();
testoformat.color = "0x123466";
testoformat.font = "Verdana";
clip1.testo.setTextFormat(testoformat);
if(!isNaN(perc)) {
clip1.testo.text = "";
clip1.testo.setTextFormat(testoformat);
}
if(car == tot && tot>1024){
clearInterval(c);
altezza = (clip1._height*width1)/clip1._width;
larghezza = (clip1._width*height1)/clip1._height;
if (clip1._width > width1 || clip1._height > height1){
if (clip1._height < clip1._width){
clip1._width = width1;
clip1._height = altezza;
} else if (clip1._height > clip1._width){
clip1._width = larghezza;
clip1._height = height1;
} else {
clip1._width = clip1._height = height1;
}
if(clip1._height > height1){
clip1._height=height1;
clip1._width=larghezza;
}
}
clip1.testo.text = "";
}
};
big1.loadMovie( "c:/zero/images/"+i+".jpg", "big1" );
//big1.loadMovie( "3.jpg" );
c = setInterval(preload1, 100,big1, 80, 80 );