Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/11/2010, 19:33
igonfil
 
Fecha de Ingreso: junio-2008
Mensajes: 250
Antigüedad: 15 años, 10 meses
Puntos: 1
Respuesta: Duda en el documento de Piecemaker

Ya lo he resuelto. Primeramente creamos una máscara que será el espacio que abarcará el texto en nuestro documento que he llamado "mascara_mc".

Introducimos este código en una capa que he llamado acciones

Código PHP:
//FUNCIÓN PARA HACER EL SCROLL

function hacerScroll(e:Event):void{
    var 
velocidad:Number = (mascara_mc.height/2-mouseY)/50;
    
tf.y+=velocidad;
    if(
tf.y>mascara_mc.y){
        
tf.mascara_mc.y;
    }
    if(
tf.y+tf.height<mascara_mc.y+mascara_mc.height){
        
tf.mascara_mc.y+mascara_mc.height-tf.height;
    }
}
stage.addEventListener(Event.ENTER_FRAMEhacerScroll);