Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/08/2007, 10:44
vale
 
Fecha de Ingreso: mayo-2002
Mensajes: 148
Antigüedad: 21 años, 11 meses
Puntos: 0
centrar imagen en movieclip

Tengo un slideshow en actionscript.

Logré que las imagenes aparecieran en un lugar específico del escenario con el código:
imagen1._x = 50;
imagen1._y = 80;
imagen2._x = 50;
imagen2._y = 80;

Como ahora tengo imagenes verticales e imagenes apaisadas, quiero hacer lo mismo pero que las imagenes se carguen en el centro de la peli.
probé este código pero no funciona:
this._x = (Stage._width-imagen1._width)/2;
this._y = (Stage._height-imagen1._height)/2;
this._x = (Stage._width-imagen2._width)/2;
this._y = (Stage._height-imagen2._height)/2;

y me dice que la propiedad "_width" y "_height" no existen.

Probé así y tampoco funciona:
this._x = (Stage.width-imagen2.width)/2;
this._y = (Stage.height-imagen2.height)/2;
this._x = (Stage.width-imagen1.width)/2;
this._y = (Stage.height-imagen1.height)/2;

lo ignora y alinea en 0,0.

S.O.S.