Ciao a tutti,
ho realizzato o meglio cercato di realizzare un effetto di mascheratura, tipo quadrati che si compongono, grazie anche ad un esempio di Rempox che ringrazio.
Il tutto gioca su due frame, la maschera è al secondo frame e inizia l'animazione onClipEvent (load), premendo i bottoni che fanno cambiare immagine torno al primo frame, blocco tutto con un preload e a caricamento completato torno al secondo frame per far ripartire la maschera.
il codice un pò ripulito è questo:
1° frame
stop;
this.onEnterFrame = function() {
car = this.foto.getBytesLoaded();
tot = this.foto.getBytesTotal();
per = Math.floor((car/tot)*100);
if (car == tot) {
delete this.onEnterFrame;
this.foto._alpha = 0;
this.perc.text = "";
play();
} else {
this.perc.text = "caricamento immagine..."+per+"%";
}
};
mentre al secondo frame:
stop();
this.foto.setMask(this.mask);
this.foto._alpha = 100;
su explorer funziona mentre su firefox no....
aiuto...