Tema: scroll
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/04/2005, 07:13
eduvivi
 
Fecha de Ingreso: enero-2002
Mensajes: 349
Antigüedad: 22 años, 4 meses
Puntos: 1
scroll

Hola a todos tengo hecho un scroll muy sencillo, que funciona perfecto, pero cuando lo quiero meter dentro de un MovieClip para llamarlo en un frame x, no funciona, ahi va el codigo AS.

// Define the Scroll Area
top = _root.movMask._y;
bottom = _root.movMask._y+_root.movMask._height-_root.movScroller._height;
left = _root.movMask._x;
right = _root.movMask._x+_root.movMask._width;
// Bring all objects to the Scroll Area
_root.movIn._y = top;
_root.movIn._x = left;
_root.movScroller._y = top;
_root.movScroller._x = right;
// When the Scroller is Dragged
_root.movScroller.onMouseDown = function() {
if (hitTest(_root._xmouse, _root._ymouse)) {
startDrag("_root.movScroller", false, right, top, right, bottom);
}
};
// when the Scroller is Released
_root.movScroller.onMouseUp = function() {
stopDrag();
};
// Update Position every 10 milliseconds
setInterval(Update, 10);
function Update() {
var ratio = (_root.movIn._height-_root.movMask._height)/(_root.movMask._height-_root.movScroller._height);
_root.movIn._y = ((_root.movMask._y-_root.movScroller._y)*ratio)+_root.movMask._y;
}
// Cambio de flecha a mano en el scroll
movScroller.useHandCursor = true;
movScroller.onPress = function() {
movScroller.useHandCursor = true;
};



Gracias de antemano