Flash - adaptarse a la pantalla

 
Vista:

adaptarse a la pantalla

Publicado por elkinsan (1 intervención) el 31/01/2011 18:19:24
Tengo una swf principal con este codigo
Stage.scaleMode = "noScale";
_global.imgConstantWidth = bgImage._width;
_global.imgConstantHeight = bgImage._height;
setImage = function (mc)
{
var _loc2 = 1417;
var _loc3 = 833;
var _loc5 = (Stage.width - _loc2) / 2;
var _loc4 = (Stage.height - _loc3) / 2;
mc._x = -_loc5;
mc._y = -_loc4;
if (mc._width > Stage.width)
{
mc._x = mc._x - (mc._width - Stage.width) / 2;
} // end if
if (mc._height > Stage.height)
{
mc._y = mc._y - (mc._height - Stage.height) / 2;
} // end if
};
resizeImage = function (mc)
{
var _loc3;
if (Stage.width / Stage.height > _global.imgConstantWidth / _global.imgConstantHeight)
{
_loc3 = true;
}
else
{
_loc3 = false;
} // end else if
if (_loc3)
{
mc._height = Stage.width * _global.imgConstantHeight / _global.imgConstantWidth;
mc._width = Stage.width;
}
else
{
mc._width = Stage.height * _global.imgConstantWidth / _global.imgConstantHeight;
mc._height = Stage.height;
} // end else if
};
resizeImage(bgImage);
setImage(bgImage);
sizeListener = new Object();
sizeListener.onResize = function ()
{
resizeImage(bgImage);
setImage(bgImage);
};
Stage.addListener(sizeListener);
stop ();

para q adapte la pelicula al tamño de la pantalla, hasta hay tobien; Pero tengo el menu q carga peliculas externas "quienes somos cotacto etc" las llamo asi
on(release){
loadMovieNum("par1.swf",4)
}
pero estas peliculas no se acomodan a la resolucion d ela pantalla qdan del mismo tamaño.
Como puedo solucionar esto?
gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:adaptarse a la pantalla

Publicado por Andres (17 intervenciones) el 31/01/2011 21:19:15
Hola, primero creo que deberias cargar los swf con MovieClipLoader.
Luego, en el clip que contenga el swf que se cargo, le das las nuevas dimensiones.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar