Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/11/2007, 17:08
Oahu
 
Fecha de Ingreso: noviembre-2007
Ubicación: Madrid
Mensajes: 41
Antigüedad: 16 años, 5 meses
Puntos: 0
problema conversión flashMX-flash8

Hola!! me estoy volviendo loca! no se que me pasa que no me funciona este código y creo que es xqe esta exo para flash MX y yo uso el flash 8, os dejo e código por si alguien puede solucionarlo xfavor, muxas gracias!
//----------------------------------------------------------------
// declarar variables
//----------------------------------------------------------------
desplazamiento = 260;
mScroll = (imagenes._height/desplazamiento)-1;
mMaxScroll = imagenes._height-desplazamiento;
izquierda = boton1._x;
superior = boton1._y;
derecha = boton1._x;
inferior = desplazamiento;
anchoImagen = imagenes._width+15;
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(anchoImagen, 0);
mascara.lineTo(anchoImagen, desplazamiento);
mascara.lineTo(0, desplazamiento);
mascara.lineTo(0, 0);
imagenes.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 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 (imagenes._y<mMaxScroll+barra._height) {
imagenes._y = (posicion+3*imagenes._y)/4;
}
imagy = imagenes._y;
boton1y = boton1._y;
};