Yo creo q deberias centrarlo con respecto al swf y luego este centrarlo en
el Html.Para centrarlo en el movie hazlo a partir de Stage:
sysX = Stage.width/2;
sysY = Stage.height/2;
Luego para centrar el swf en el html puedes utilizar la pantalla disponible:
window.screen.availWidth
window.screen.availHeight


----- Mensaje original ----- 
De: "isaac" <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviado: viernes, 20 de junio de 2003 12:18
Asunto: [ASNativos] Ande m ekivokao? HELP!


Hola, estoy embarcado en un proyecto personal y me puesto el liston bastante
alto... :D



      Llegu� hasta aqui y sigue si funcionar...


      sysX = System.capabilities.screenResolutionX;
      sysY = System.capabilities.screenResolutionY;
      _root.createEmptyMovieClip("centro", 10);
      _root.centro.loadMovie("shared.swf", _root.centro);
      shx = Math.round((_root.sysX/2) - (_root.centro._width/2));
      shy = Math.round((_root.sysY/2) - (_root.centro._height/2));
      //
      _root.centro._x = shx;
      _root.centro._y = shy;

      ARG!!!

      Entonces al cambiar de resolucion vi que no se me quedaba centrado y
empeze a hacer pruebas sumando y restando manualmente y vi que naturalmete
con estas corraciones siq lo centraba pero al cambiar a otra resolucion
necesitaba otra correccion diferente

      Entonces he echo esto:

      sysX = System.capabilities.screenResolutionX;
      sysY = System.capabilities.screenResolutionY;
      shx = Math.round((_root.sysX/2)-(_root.centro._width/2));
      shy = Math.round((_root.sysY/2)-(_root.centro._height/2));
      resoX = new Array("800", "1024", "1152", "1280", "1280", "1280");
      resoY = new Array("600", "768", "864", "720", "768", "960");
      function centrado(sysX, sysY) {
      if (sysX == resoX[0] && sysY == resoY[0]) {
      _root.centro._x = shx;
      _root.centro._y = shy;
      } else if (sysX == resoX[1] && sysY == resoY[1]) {
      _root.centro._x = shx-150;
      _root.centro._y = shy-100;
      } else if (sysX == resoX[2] && sysY == reso[2]) {
      _root.centro._x = shx-225;
      _root.centro._y = shy-150;
      } else if (sysX == resoX[3] && sysY == reso[3]) {
      _root.centro._x = shx-275;
      _root.centro._y = shy-75;
      } else if (sysX == resoX[4] && sysY == reso[4]) {
      _root.centro._x = shx-275;
      _root.centro._y = shy-50;
      } else if (sysX == resoX[5] && sysY == reso[5]) {
      _root.centro._x = shx-275;
      _root.centro._y = shy-200;
      }
      centrado(sysX, sysY);
      }
      _root.createEmptyMovieClip("centro", 10);
      _root.centro.loadMovie("shared.swf", _root.centro);

      Naturalmente no me funciona....

      HELP!

      Isaac


<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a