Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   Flash y Actionscript (http://www.forosdelweb.com/f16/)
-   -   resize en imagen de fondo sin alterar escala (http://www.forosdelweb.com/f16/resize-imagen-fondo-sin-alterar-escala-484919/)

dolphiny 25/04/2007 19:02

resize en imagen de fondo sin alterar escala
 
Hola que tal..

tengo un sitio, al cual le apliqué este código:

Código:

Stage.scaleMode = 'noScale';
Stage.align = 'TL';
// -- modificar tamaño
stageResize = function ():Void {
        holder._width = Stage.width;
        holder._height = Stage.height;
};
stageListener = new Object();
stageListener.onResize = stageResize;
Stage.addListener(stageListener);
// -- porcentaje de carga
this.createTextField("my_txt", 1, 0, 0, 300, 100);
my_txt.autoSize = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0x000000;
my_fmt.font = 'Arial';
my_fmt.size = 10;
my_txt.setNewTextFormat(my_fmt);
// -- cargar imagen de fondo
var my_listener:Object = new Object();
my_listener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void  {
        my_txt.text = 'Cargando ...  ' + Math.round(bytesLoaded / bytesTotal * 100) + ' %';
};
// --
my_listener.onLoadInit = function(target_mc:MovieClip) {
        my_txt.removeTextField();
        mcLoader.removeListener(my_listener);
        stageResize();
};
var holder:MovieClip = this.createEmptyMovieClip('holder_mc', this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(my_listener);
mcLoader.loadClip('img/fondo1.jpg', holder);

loadMovie("img/menu.swf",5);

funciona perfecto, pero deforma la imagen...

me gustaría que fuera como en este sitio:

zara.com

muchas gracias!!!!


La zona horaria es GMT -6. Ahora son las 19:59.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.