ciao... oggi proprio non va..cmq
duplico dei mc in questo modo:
funziona tutto bene mi vengono caricate le immagini e funzia tutto solo che volevo fare un preload per ogni thum che viene caricata dentro a mc ho un campo testo con istanza "percentuale" ma non mi funge niente ... missa che sbaglio qualcosa ehh...Codice PHP:thumb_mc._visible = false;
import mx.transitions.Tween;
import mx.transitions.easing.*;
suono = new Sound(this);
suono.attachSound("sopra")
//if (this.num_siti > 6) {
//_root.body_mc.portfolio_mc.bottoni_mc.gotoAndPlay(2);
//}
//varibile creata in + che prende le immagine dal file txt
var totalimg:Number = this._parent._parent.num_img;
var i:Number = this.totalimg;// spazio è l'altezza del clip da ripetere ho messo il meno per caricare le img dalla + alta alla n. 0
var spazio:Number = -73;
//il punto x di partenza
var spaziox:Number = 16;
while (i>=1) {
var name:String = "thumb" + i + "_mc";
thumb_mc.duplicateMovieClip(name, i);
mc = eval(this[name])
// passa la varibile i a numimg così posso caricare le immagini
mc.numimg = i
i2=i + "_r"
i1= i + "_a"
mc._y = -i * spazio;
mc._x = 126;
mc.titoletto_txt.text = this._parent._parent["titoletto_" + i];
mc.per_img = "img/gallery_jukebox/" + this._parent._parent["nomeimg_" +i]
mc.thumbimg_mc.loadMovie(mc.per_img);
mc.thumbimg_mc._height = mc.thumbimg_mc._height/6;
mc.thumbimg_mc._width = mc.thumbimg_mc._width/6;
// Caricamento foto //////////////////////////////////////////////
mc.onEnterFrame = function() {
this.totale.text = this.getBytesTotal();
this.caricamento.text = this.getBytesLoaded();
this.percentuale.text = Math.floor((this.getBytesLoaded()/this.getBytesTotal())*100) + " %";
trace(this.caricamento.text);
if (this.percentuale.text == "100 %") {
this.onEnterFrame = null;
this.thumbimg_mc._visible = true;
//this._parent.gotoAndStop(2);
//quando il mouse è sopra il clip ///////////////////////////////
mc.onRollOver = function() {
var i1:Tween = new Tween(this.stellina_mc, "_x", Elastic.easeInOut, -55.4, -55.4 + 17, 1,true);
this._parent.suono.start();
};
//quando il mouse è fuori dal clip ///////////////////////////////
mc.onRollOut = function() {
var i2:Tween = new Tween(this.stellina_mc, "_x", Elastic.easeInOut, -55.4 +17, -55.4, 1,true);
};
//quando il mouse è rilasciato clip ///////////////////////////////
mc.onRelease = function() {
};
}
}
--i
//_parent.gotoAndPlay("imggrande");
}
![]()

cmq
-
Rispondi quotando