onResize!!
Fala pessoal... blzinha?
To com uma duvida... to centralizanu u conteudo da pagina usando a classe tween 2... e de acordo com a resolucao e o tamanho do browser do usuario.. o conteudo se enquadra... porem n to entndndo o pq q quando eu restauro e volto a maximizar - onresize, o conteudo trava, fik estatico, olhem o codigo se possivel galera?
#include "mc_tween2.as" this._lockroot = true;Stage.align = "TL";Stage.scaleMode = "noScale";Stage.showMenu = false;BackGround._x = Stage.width / 2;BackGround._y = Stage.height / 2;BackGround._xscale = Stage.width;BackGround._yscale = Stage.height;alvo = _root.Alvo_MC;//Tamanho do stage e do mc divididos por 2alvo.tween("_x", Stage.width/2 - alvo._width/2, 1, "easeoutelastic", 0);alvo.tween("_y", Stage.height/1.825 - alvo._height/2, 1, "easeoutelastic", 0);//Movimento elastico do conteudo principalmenuTopBar.tween("_x", Stage.width/2, 1, "easeoutelastic", 0);menuTopBar._y = 0;menuBottomBar.tween("_x", Stage.width/2, 1, "easeoutelastic", 0);menuBottomBar.tween("_y", Stage.height, 1, "easeoutelastic", 0);menuRapido.tween("_x", Stage.width/2, 1, "easeoutelastic", 0);menuRapido.tween("_y", Stage.height-92, 1, "easeoutelastic", 0);//Funcao para o evento onResizevar Redimensiona = function(){BackGround._x = Stage.width / 2;BackGround._y = Stage.height / 2;BackGround._xscale = Stage.width;BackGround._yscale = Stage.height; alvo.tween("_x", Stage.width/2 - alvo._width/2, 1, "easeoutelastic", 0);alvo.tween("_y", Stage.height/1.825 - alvo._height/2, 1, "easeoutelastic", 0);menuTopBar.tween("_x", Stage.width/2, 1, "easeoutelastic", 0);menuTopBar._y = 0;menuBottomBar.tween("_x", Stage.width/2, 1, "easeoutelastic", 0);menuBottomBar.tween("_y", Stage.height, 1, "easeoutelastic", 0);menuRapido.tween("_x", Stage.width/2, 1, "easeoutelastic", 0);menuRapido.tween("_y", Stage.height-92, 1, "easeoutelastic", 0);}var organizar: Object = new Object()organizar.onResize = function () { redimensiona();} Stage.addListener(organizar);organizar.onResize();stop();
Vlwzao galera pela atencao...
Abracos!
Discussão (3)
Carregando comentários...