Comunidad de diseño web y desarrollo en internet online

AYUDENME POR FAVOR, NECESITO CONVERTIR ESTO DE AS2 A AS3

Citar            
MensajeEscrito el 20 May 2010 02:27 pm
AYUDENME, NO SE COMO HACERLO, APENAS ME INICIO EN EL LENGUAJE Y NECESITO PASAR ESTO DE
AS2 A AS3


//Sin escalar y alineado a la izquierda y arriba
Stage.scaleMode = "noScale";
Stage.align = "TL";

//full screen

function cambiar(){
if(Stage.displayState=="normal"){
Stage.displayState="fullScreen";
_root.boton.gotoAndStop(2);
}else{Stage.displayState="normal";
_root.boton.gotoAndStop(1);}}


//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()

//Esto ubica el menu al pie de la pantalla y el fondo del menu al ancho de la pantalla

mc_bottom._width = Stage.width;
mc_bottom._y = Stage.height - mc_bottom._height;
boton._y = Stage.height - (boton._height+20);
boton._x = Stage.width - (boton._width+20);

sizeListener = new Object();
sizeListener.onResize = function() {
mc_bottom._width = Stage.width;
mc_bottom._y = Stage.height - mc_bottom._height;
boton._y = Stage.height - (boton._height+20);
boton._x = Stage.width - (boton._width+20);
};

Stage.addListener(sizeListener);

Por alexmatam

2 de clabLevel



 

chrome
Citar            
MensajeEscrito el 20 May 2010 11:36 pm

Por The Fricky!

Presidente

6168 de clabLevel

3 tutoriales
8 articulos

Genero:Masculino   Bastard Operators From Hell Héroes

Piccola Venezia...

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.