Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/07/2010, 08:27
mptx
 
Fecha de Ingreso: marzo-2008
Ubicación: Valdivia
Mensajes: 85
Antigüedad: 16 años, 1 mes
Puntos: 1
Respuesta: Fullscreen 100% (sin navegador)

adjunto el codigo que encontré:

//Don't scale the movie when the stage size changes
Stage.scaleMode="noScale";
//Align the stage to the top left
Stage.align = "TL";
//Function to toggle between fullscreen and normal size
//the toggle fullscreen button calls this function when pressed
function toggleFullScreen(){
//if normal size, go to fullscreen, else go to normal size
if(Stage["displayState"]=="normal"){
Stage["displayState"]="fullScreen";
}else{
Stage["displayState"]="normal";
}
}
//Create a listener for each time the Stage is resized
var resizeListener:Object = new Object();
//Called each time the stage is resized
resizeListener.onResize = function () {
//Move the button to the center of the screen
toggleFullScreenButton._x=Stage.width/2;
toggleFullScreenButton._y=Stage.height/2;
}
//Add the listener to Stage
Stage.addListener(resizeListener);

Y el codigo del boton:
on(press){
toggleFullScreen();
}


Pero funciona con un boton que lo activa, y necesito que se active solo, sin boton. ¿alguien me ayuda?

Última edición por mptx; 02/07/2010 a las 08:33