Tengo una duda algo inquietante y quisiera saber si me puefen ayudar:
Descarge un ejemplo de TextScroll en AS 1 y Flash 6, pero lo paso a AS 2 y todo funciona, pero al momento de pasarlo a Flash 8 o 7 no funciona, sin importar la version de AS, es codigo es el siguiente:
Código :
//variables
desplazamiento = 260;
mScroll = (texto._height/desplazamiento)-1;
mMaxScroll = texto._height-desplazamiento;
izquierda = boton1._x;
superior = boton1._y;
derecha = boton1._x;
inferior = desplazamiento;
anchoTexto = texto._width;
boton1._y = superior;
boton2._y = inferior;
moverboton2 = true;
// creación de mascara
this.createEmptyMovieClip("mascara", 1);
mascara.lineStyle(1, 0x000000);
mascara.beginFill(0x000000);
mascara.moveTo(0, 0);
mascara.lineTo(anchoTexto, 0);
mascara.lineTo(anchoTexto, desplazamiento);
mascara.lineTo(0, desplazamiento);
mascara.lineTo(0, 0);
texto.setMask(this.mascara);
this.onEnterFrame = function() {
// intercambia las posición de los botones en el eje _Y
if (moverboton2 == false) {
boton1._y = (superior+(inferior-boton2._y)+3*boton1._y)/4;
}
if (moverboton2 == true) {
boton2._y = ((inferior+(superior-boton1._y))+3*boton2._y)/4;
}
// manejo del boton 1
boton1.onPress = function() {
moverboton2 = true;
startDrag(this, false, izquierda, superior, derecha, inferior);
};
boton1.onRelease = boton1.onReleaseOutside=function () {
stopDrag();
};
// manejo del boton 2
boton2.onPress = function() {
moverboton2 = false;
startDrag(this, false, izquierda, superior, derecha, inferior);
};
boton2.onRelease = boton2.onReleaseOutside=function () {
stopDrag();
};
// cambia dirección de la flecha botón según posición q ocupan
if ((boton1._y-superior)<=2) {
boton1.gotoAndStop("abajo");
} else if ((inferior-boton1._y)<=2) {
boton1.gotoAndStop("arriba");
}
if ((boton2._y-superior)<=2) {
boton2.gotoAndStop("abajo");
} else if ((inferior-boton2._y)<=2) {
boton2.gotoAndStop("arriba");
}
// scroll
posicion = Math.round((superior-boton1._y)*mScroll);
if (texto._y<mMaxScroll+barra._height) {
texto._y = (posicion+0.99*texto._y)/2;
}
imagy = texto._y;
boton1y = boton1._y;
};
No se si hay algo mal pero si me pueden ayudar, se los agradecere
