Ver Mensaje Individual
  #9 (permalink)  
Antiguo 19/12/2009, 04:59
narocreativo
 
Fecha de Ingreso: diciembre-2009
Mensajes: 8
Antigüedad: 14 años, 5 meses
Puntos: 0
Respuesta: redimensionar jpg con AS3

Lo he solucionado añadiando este código:

contenedor.x = -1.7;
contenedor.scaleX = 0.025;
contenedor.y = -4;
contenedor.scaleY = 0.025;

Lugo voy jugando con los valores hasta hacerlo cuadrar. Mi problema ahora esque me he dado cuente que no funciona, aparece la galeria y su scroll funciona!! pero cada miniatura siempre habre la misma imagen. cuando habro la galeria independiente funciona perfectamente.
La galeria está en action script 2 y la web en action script 3 supongo que el swf será incompatible. Entonces que hago?? Busco otra galeria que este hecha en actionscrip3 o adapto el codigo (Para ello necesitaré la ayuda de alguien, yo no tengo ni idea).

Les pego el cógido de la galeria por si alguien se compadece de mi y me lo actualiza a actionscript 3:

Esto esta en el primer fotograma:

//centro l'immagine
_root.onEnterFrame = function() {
if (_root.box.getBytesLoaded()>10 && _root.box.getBytesLoaded()>=_root.box.getBytesTota l()) {
_root.box._x = Stage.width/2-(_root.box._width/2);
_root.box._y = Stage.height/2-(_root.box._height/2);
}
};
Stage.showMenu = false;
quality = "BEST";

Esto dentro del moviclip:"barra".


// imposta a false se non vuoi la descrizione
descriptions = true;
// box descrizione invisibile
alert._visible = false;
// effetto ease
var ease = 5;
//imposto la scala della foto grande
_root.scala_x = 90;
_root.scala_y = 110;
//imposto la barra visibile
_root.barra_stato = "true";
_root.box.useHandCursor = false;
//leggo i dati XML
thumbs = new XML();
thumbs.ignoreWhite = true;
thumbs.load("dati.xml");
// qui inserire il percorso al file .XML
thumbs.onLoad = function() {
root = this.firstChild;
total = root.childNodes.length;
displayNum = Number(root.childNodes[0].attributes.displayNum);
separation = Number(root.childNodes[0].attributes.separation);
//settings
w = 60;
h = 55;
mask._width = displayNum*(w+separation);
mask._height = h+30;
forward._x = mask._width+20;
forward._y = back._y=h/2;
mcs = [];
for (i=0; i<total; i++) {
mcs.push(i);
newThumb = thumbnailer.container.duplicateMovieClip("containe r"+i, i);
with (newThumb) {
_x = (w+separation)*i;
preloader._x = w/2;
preloader._y = h/2;
shape._width = w;
shape._height = h;
}
var image = root.childNodes[i].childNodes[0].firstChild.nodeValue;
var image1 = root.childNodes[0].childNodes[0].firstChild.nodeValue;
newThumb.image = root.childNodes[i].childNodes[0].firstChild.nodeValue;
newThumb.desc = root.childNodes[i].childNodes[1].firstChild.nodeValue;
newThumb.link = root.childNodes[i].childNodes[2].firstChild.nodeValue;
loadMovie(image1, _root.box.foto_effetto);
_root.box._xscale = _root.scala_x;
// scalo la larghezza
_root.box._yscale = _root.scala_y;
// scalo l'altezza
newThumb.onRelease();
newThumb.cont.loadMovie(image);
//carico le thumbs
newThumb.cont2.loadMovie(image);
//carico le thumbs e le scalo
newThumb.cont._xscale = 8.2;
// scalo la larghezza
newThumb.cont._yscale = 12.2;
// scalo l'altezza delle ombre associate alle immagini
newThumb.cont2._xscale = newThumb.cont._xscale;
newThumb.cont2._yscale = newThumb.cont._yscale;
newThumb.onRelease = function() {
loadMovie(this.image, _root.box.foto_effetto);
// carico l'immagine nel clip effetto
_root.box.play();
// avvio il box
_root.box._xscale = _root.scala_x;
// scalo la larghezza
_root.box._yscale = _root.scala_y;
// scalo l'altezza
};
newThumb.onReleaseOutside = function() {
this._xscale = 100;
this._yscale = 100;
this._y = this._y+10;
this._x = this._x+5;
};
if (descriptions) {
newThumb.onRollOver = function() {
alert.desc = this.desc;
alert._visible = true;
this._xscale = 120;
this._yscale = 120;
this._y = this._y-10;
this._x = this._x-5;
this.swapDepths(9);
};
newThumb.onRollOut = function() {
alert._visible = false;
this._xscale = 100;
this._yscale = 100;
this._y = this._y+10;
this._x = this._x+5;
};
}
}
//
var offset = total-1;
var dest = 0;
var increment = w+separation;
var ending = (total-displayNum)*(w+separation);
var lastmc = total-1;
var firstmc = 0;
back.onRelease = function() {
if (dest<0) {
dest += increment;
} else {
first = mcs[0];
for (k=0; k<total; k++) {
mcs[k] = mcs[k+1];
}
mcs[total-1] = first;
thumbnailer["container"+lastmc]._x = -(w+separation);
firstmc = lastmc;
//check whos new lastmc
for (k=0; k<total; k++) {
if (mcs[k] == (total-1)) {
lastmc = k;
}
}
}
};
forward.onRelease = function() {
if (dest>-ending) {
dest -= increment;
} else {
last = mcs[total-1];
for (k=1; k<total; k++) {
mcs[total-k] = mcs[total-k-1];
}
mcs[0] = last;
thumbnailer["container"+firstmc]._x = (displayNum)*(w+separation);
lastmc = firstmc;
//check whos new firstmc
for (k=0; k<total; k++) {
if (mcs[k] == 0) {
firstmc = k;
}
}
}
};
//movement
onEnterFrame = function () {
for (j=0; j<total; j++) {
thumbnailer["container"+j]._x += (dest+(mcs[j])*(w+separation)-thumbnailer["container"+j]._x)/ease;
}
alert._x = _xmouse;
alert._y = _ymouse;
};
};


Muchas gracias!!