Pero ahora estoy realizando otra en la que utilizo una imagen de fondo obligatoriamente en la que todo el peso esta abajo a la derecha, asea que quiero que la pelicula se alineee asi; Stage.align = "BR"; .... el fondo funciona pero los elementos que voy situando con el listener como en las otras webs no, no se van donde deberian.
si cambio BR x LT si funciona todo pero al redimensionar se come trozos de la parte inferior derecha de la imagen que es la que tiene que salir a la fuerza siempre.....
No se si me explico, pero mi pregunta es, funciona la diagramacion liquida con el listener y tal ci la alineacion no es "LT"....????
con este codigo funciona el fondo pero no coloca bien los objetos...:
Código ActionScript :
//Sin escalar y alineadito a la derecha y abajo Stage.scaleMode = "noScale"; Stage.align = "BR"; //objeto listener para el onResize var listener:Object = new Object(); //definicion de acciones para el onResize listener.onResize = function():Void { resizebackGround(); //aca la gracia de poner afuera la funcion es poder hacer muuchas acciones en el evento }; //funcion de resize resizebackGround=function():Void{ var imageAspectRatio = bg_mov_mc._width / bg_mov_mc._height; var stageAspectRatio = Stage.width / Stage.height; if (stageAspectRatio >= imageAspectRatio) { bg_mov_mc._width = Stage.width; bg_mov_mc._height = Stage.width / imageAspectRatio; } else { bg_mov_mc._height = Stage.height; bg_mov_mc._width = Stage.height * imageAspectRatio; } } //Listener de redimensionado de stage Stage.addListener(listener); //llamado inicial a la funcion resizebackGround() var miListener:Object = new Object(); miListener.onResize = function(){ logo._y = Stage.height/2; logo._x = Stage.width/2; mp32._y = Stage.height/2; mp32._x = Stage.width/2; //a._width = Stage.width * 2; //a._height = (Stage.width * 2) / 3; miElemento._width = Stage.width - 25; miElemento2._x = Stage.width- Stage.width+25; menu._x = Stage.width - Stage.width+145; menu._y = Stage.height - 60; chicofondo._x = Stage.width - 20; chicofondo._y = Stage.height - 20; agua._x = Stage.width - 10; agua._y = Stage.height - Stage.height + 70; mp3._x = Stage.width - 132; mp3._y = Stage.height - 27; contacto._x = Stage.width - 167; contacto._y = Stage.height - 15; } Stage.addListener(miListener); /* al final agregamos los mismos calculos que en la funcion del listener para que los elementos se acomoden la primera vez, sin que se dispare el evento onResize. si no agregamos estas lineas lo que pasará es que los elementos no se acomodarán hasta que no cambiemos el tamaño de la pantalla. */ logo._y = Stage.height/2; logo._x = Stage.width/2; mp32._y = Stage.height/2; mp32._x = Stage.width/2; miElemento._width = Stage.width - 25; miElemento2._x = Stage.width- Stage.width+25; menu._x = Stage.width - Stage.width+145; menu._y = Stage.height - 60; chicofondo._x = Stage.width - 20; chicofondo._y = Stage.height - 20; agua._x = Stage.width - 10; agua._y = Stage.height - Stage.height + 70; mp3._x = Stage.width - 132; mp3._y = Stage.height -27; contacto._x = Stage.width - 167; contacto._y = Stage.height - 15; stop();