Allora, rieccomi:
La tua funzione l'ho inserita, ma non mi fila!
Cioè, mi continua a fare il ridimensionamento in base all'angolo alto-sx.
Questo è lo script completo inserito nel frame 2 (in rosso la tua parte e come io l'ho integrata):
codice:
photo_xml.onLoad = function() {
clip_th.html = true;
clip_th.htmlText = "<p align=\"center\"></p>";
Photos_Clip(0);
};
MovieClip.prototype.loadCenteredImage = function(url) {
this.createEmptyMovieClip("v", 1);
this.v.loadMovie(url);
this.onEnterFrame = function (){
var c = this.v.getBytesLoaded();
var t = this.v.getBytesTotal();
var p = Math.floor((c/t)*100);
if(c>=t && t > p && p == 100){
if(this.v._width > 0 && this.v._height > 0){
delete this.onEnterFrame;
this.v._x = (this.v._width/2)*-1;
this.v._y = (this.v._height/2)*-1;
this._x+= this.v._width/2;
this._y+= this.v._height/2;
}
}
}
}
_global.Photos_Clip = function(carica) {
var photos = photo_xml.firstChild.childNodes;
var p_thumbs = photo_xml.firstChild.attributes.thumbs, p_photos = photo_xml.firstChild.attributes.clips;
var i = carica;
for (var l = 0; l<linee; l++) {
for (var c = 0; c<colonne && i<photos.length; c++, i++) {
var thumb = clip_th.createEmptyMovieClip("thumb_"+i, i);
PhotoAlbum.thumbs.push(t);
thumb._y = l*a_th;
thumb._x = c*l_th;
thumb.createEmptyMovieClip("photos", 1);
thumb.photos.loadCenteredImage (p_thumbs+"/"+photos[i].attributes.thumb);
thumb.dimensio = photos[i].attributes;
MovieClip.prototype.zoom = function(endScale, speed) {
this.onEnterFrame = function() {
var offset = 0.5;
var rscale = Math.abs(endScale-this._xscale);
if (!rscale<=offset) {
(this._xscale<endScale) ? (this._xscale=this._yscale += rscale/speed) : (this._xscale=this._yscale -= rscale/speed);
} else {
delete this.onEnterFrame;
}
};
};
thumb.onRollOver = function() {
this.zoom(120, 3);
this.swapDepths(10);
};
thumb.onRollOut = function() {
this.zoom(100, 7);
};
thumb.onRelease = function() {
.......azioni varie.........
};
}
}
};
photo_xml.load("photos2.xml");
stop();
Mentre nel frame 1 c'è questo:
codice:
_global.a_th = 57;
_global.l_th = 77;
_global.colonne = 4;
_global.linee = 2;
var PhotoAlbum = {thumbs:[]};
photo_xml = new XML();
photo_xml.ignoreWhite = true;
stop();
Si comporta come prima...