Tema: Scroll...
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/07/2006, 03:37
index000
 
Fecha de Ingreso: febrero-2005
Mensajes: 183
Antigüedad: 19 años, 2 meses
Puntos: 0
Estos zip que me pasas funcionan correctamente, pero solo para flash 5, si los pasas a flash 72.0 o flash 8 2.0 dejan de funcionar, cual seria la solucion?

Code:
Código:
TextBox._height = TextBox_Height;
newscroll = -scroll._y;
function easeOut() {
	scrollpos = -scroll._y;
	ratio = (content._height-TextBox_Height)/(TextBox_Height-scroll._height);
	NewPos = Number((scrollpos*ratio));
	difY = newPos-content._y;
	dif = scrollpos-newscroll;
	content._y = content._y+difY/5;
	scroll._y = scroll._y+dif/5;
}
function easeDrag() {
	scrollpos = -scroll._y;
	ratio = (content._height-TextBox_Height)/(TextBox_Height-scroll._height);
	NewPos = Number((scrollpos*ratio));
	difY = newPos-content._y;
	content._y = content._y+difY/5;
}
function stopper() {
	if (scroll._y>150) {
		scroll._y = 150;
		newscroll = scroll._y;
	} else if (scroll._y<0) {
		scroll._y = 0;
		newscroll = scroll._y;
	} else {
		scroll._y = scroll._y;
	}
}
Código:
if (dragmode == 1) {
	easeDrag();
	stopper();
} else {
	easeOut();
	stopper();
}
Código:
prevFrame();
play();
Código:
on (press) {
	_root.mainclip.dragmode = 1;
	startDrag(this, false, _parent.content._width + 3, 0, _parent.content._width +3, (_parent.TextBox._height)-(this._height));
}
on (release, releaseOutside) {
	barPos = _root.mainclip.scroll._y +25;
	if (barPos > 25, barPos < 50) {
		_root.mainclip.scroll._y = Math.ceil(0);
	} else if (barPos > 50, barPos < 100) {
		_root.mainclip.scroll._y = Math.ceil(50);
	} else if (barPos > 100, barPos < 150) {
		_root.mainclip.scroll._y = Math.ceil(100);
	} else if (barPos > 150) {
		_root.mainclip.scroll._y = Math.ceil(150);
	}
	_root.mainclip.newscroll = -_root.mainclip.scroll._y;
	_root.mainclip.scrollpos = -_root.mainclip.scroll._y;
	_root.mainclip.dragmode = 0;
	stopDrag();
}