Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/01/2010, 10:24
nejai
 
Fecha de Ingreso: enero-2010
Mensajes: 1
Antigüedad: 14 años, 3 meses
Puntos: 0
cargar imagenes tamaño original

Hola que tal, soy nuevo en este foro y quisiera ver si me podrian ayudar con este problema que tengo.
estoy cargando imagenes desde un archivo xml hacia flash y tengo un scroll horizontal para ir viendo cada imagen, lo que quiero esque al momento que me muestra las imagenes estean con su ancho original porque el alto es el mismo para todas las imagenes, por ejemplo tengo imagenes de ancho de 500px de 600px, haber si me podrian ayudar con este problema que tengo
Este es mi archivo xml
<?xml version="1.0" encoding="utf-8"?>
<gallery y="5" width="950" height="400" image_width="400" vertical_spacing="10" bar_thickness="7">
<image url="images/03.jpg" />
<image url="images/04.jpg" />
<image url="images/07.jpg" />
<image url="images/08.jpg" />
<image url="images/13.jpg" />
<image url="images/19.jpg" />
<image url="images/26.jpg" />
<image url="images/41.jpg" />
<image url="images/97.jpg" />
</gallery>
cuando quito image_width="400" la imagen que es mas ancha se pone ensima de las demas, y este es mi archivo fla

import mx.transitions.easing.*;

var myGalleryXML = new XML();
myGalleryXML.ignoreWhite = true;
myGalleryXML.load("gallery.xml");

myGalleryXML.onLoad = function() {

_root.gallery_width = myGalleryXML.firstChild.attributes.width;
_root.gallery_height = myGalleryXML.firstChild.attributes.height;
_root.gallery_y = myGalleryXML.firstChild.attributes.y;

_root.spacing = myGalleryXML.firstChild.attributes.vertical_spacin g;
_root.bar_y = Number(_root.gallery_height)+Number(_root.spacing) ;
_root.bar_thickness = myGalleryXML.firstChild.attributes.bar_thickness;
_root.scroller_width = _root.bar_thickness*2;

_root.image_width = myGalleryXML.firstChild.attributes.image_width;

_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = _root.myImages.length;

createContainer();
callImages();
masking();
scrollbar();
scroller();

};

function createContainer() {
_root.myGallery_mc = _root.createEmptyMovieClip("myGallery_mc", _root.getNextHighestDepth());
_root.myGallery_mc._y = _root.gallery_y;
_root.myGallery_mc._x = (Stage.width-_root.gallery_width)/2;

}

function callImages() {

_root.myImages_mc = _root.myGallery_mc.createEmptyMovieClip("myImages_ mc", _root.myGallery_mc.getNextHighestDepth());

var myMCL:MovieClipLoader = new MovieClipLoader();

for (i=0; i<_root.myImagesTotal; i++) {
imageURL = _root.myImages[i].attributes.url;
image_mc = _root.myImages_mc.createEmptyMovieClip(i, _root.myImages_mc.getNextHighestDepth());
image_mc._x = _root.image_width*i;

myMCL.loadClip(imageURL,image_mc);
}

}