Basandome en el tutorial "Fondo bitmap que se ajusta al tamaño del navegador en Flash" he intentado hacer un ejercicio similar pero usando dos movieclips que sean botones que se redimensionan y posicionan según el tamaño del navegador.
Ahora sólo puedo hacer que se redimensione uno o otro no ambos.
Aquí les dejo el código de lo que he realizado:
Código ActionScript :
Stage.scaleMode = "noscale"; //----------------------- var StageWidth:Number = 995; var StageHeight:Number = 600; function escalaimg1() { if (Stage.width > Stage.height) { img1._width = Stage.width/3.7; img1._yscale = img1._xscale; } else { img1._height = Stage.height/4; img1._xscale = img1._yscale; } img1._x = (StageHeight/66)*8.3; img1._y = (StageHeight/66)*2.5; } //----------------------- Stage.addListener(this); this.onResize = escalaimg1; escalaimg1(); this.onResize = escalaimg2; escalaimg2(); //----------------------- function escalaimg2() { if (Stage.width > Stage.height) { img2._width = Stage.width/3.7; img2._yscale = img2._xscale; } else { img2._height = Stage.height/4; img2._xscale = img2._yscale; } img2._x = (StageHeight/66)*40; img2._y = (StageHeight/66)*2.5; }
Por lo que entiendo el problema está en
Código ActionScript :
Stage.addListener(this); this.onResize = escalaimg1;pero no sé cómo solucionar ésto.
Gracias por adelantado a quienes puedan ayudarme.