el tema es el siguiente: hice un scroll de una imagen con máscara que se mueve dependiendo de la posición x e y del mouse siguiendo el tutorial http://www.cristalab.com/tips/hacer-scroll-en-una-imagen-con-el-mouse-en-flash-c39741l/, hasta aquí todo bien. El tema es que a la hora de modificarlo se ve y funciona a la perfección, salvo por el detalle de que cuando hace el scroll hacia la derecha, al llegar al final del escenario sigue scrolleando y deja un espacio en blanco, les dejo la dire de mi web para que vean el ejemplo: http://marioprieto.com.ar.
Al código le agregue operaciones de full screen y liquid layout, pero no creo que sea ése el problema porque lo probé aplicando liquid layout a la mascara y al mc "foto" y sigo con el mismo error.
les dejo los codigos
este codigo va todo en el primer frame de la pelicula, estan los controladores del mouse, del full screen y del liquid layout y la posicion de algunos de los mc
Código :
stop(); Stage.align = "TL"; //este es el codigo que controla la funcion del mouse// function mover(x,y, aceleracion) { _root.show.foto.onEnterFrame = function() { this._x += (x-this._x)/aceleracion; this._y += (y-this._y)/aceleracion; if (Math.abs(x-this._x)<0.5 && Math.abs(y-this._y)<0.5 ) { this._x = x; this._y = y; delete this.onEnterFrame; } }; } //Este codigo esta tambien dentro del listener cielo._width = Stage.width; cielo._height = Stage.height; espacio._width = Stage.width; nubes._y = Stage.height-nubes._height; marca._x = (Stage.width - 320); fs_btn._x = (Stage.width - 120); fs_btn._y = (Stage.height-50); normal_btn._x = (Stage.width - 120); normal_btn._y = (Stage.height-50); loading._x = (Stage.width)/2; Stage.scaleMode = "noScale"; //inicio listener var miListener:Object = new Object(); miListener.onResize = function() { //mismo codigo que afuera cielo._width = Stage.width; cielo._height = Stage.height; espacio._width = Stage.width; nubes._y = Stage.height-nubes._height; marca._x = (Stage.width - 320); fs_btn._x = (Stage.width - 120); fs_btn._y = (Stage.height-50); normal_btn._x = (Stage.width - 120); normal_btn._y = (Stage.height-50); loading._x = (Stage.width)/2; }; Stage.addListener(miListener); miListener.onRelease(); normal_btn._visible = false; // acciones de los botones para poner en fullscreen fs_btn.onRelease = function() { Stage.scaleMode = "noScale"; Stage.displayState = "fullscreen"; }; fs2_btn.onRelease = function() { Stage.scaleMode = "showAll"; Stage.displayState = "fullscreen"; }; // acciones del botón pasar volver a modo normal normal_btn.onRelease = function() { Stage.displayState = "normal"; }; // cuando pase de un modo a otro lo detectamos // con estas rutinas y mostramos y ocultamos los // botones correspondientes // ------------------------------------------------------- // creamos un listener para detectar el cambio de modo var fsListener:Object = new Object(); // definimos las acciones a ejecutar fsListener.onFullScreen = function(pantalla_completa:Boolean) { if (pantalla_completa) { fs_btn._visible = false; fs2_btn._visible = false; normal_btn._visible = true; } else { fs_btn._visible = true; fs2_btn._visible = true; normal_btn._visible = false; } }; // asociamos el listener al Stage Stage.addListener(fsListener); _focusrect=false;
Este es el codigo del mc show
Código :
onClipEvent (mouseMove){ if (this.hitTest(_root._xmouse, _root._ymouse, true)){ _root.mover( -((foto._width-btn._width) /btn._width) * _xmouse,-((foto._height -btn._height) /btn._height) * _ymouse,99); } }
Y este el del mc foto
Código :
onClipEvent (load){ this._x=-(this._width/2)+(_parent.btn._width/2); this._y=-(this._height/2)+(_parent.btn._height/2); }
Para mas datos, les paso las dimensiones:
mc foto: 2010.7 x 575.45
stage: 1280x800
mascaras: 1280x800
si faltara algun dato por favor me avisan y se los paso, y de nuevo, muchisimas gracias a todos!