Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá Pessoal
tenho um Scroll que está nesse endereço http://www.fulltimebrasil.com.br/yemanja/cardapio.swf o mc de texto eh o mesmo pra todo o cardapio dividido em Frames, sendo que se eu deslocar o scroll pra baixo e deixar e mudar pra outra opção ele se mantém nesta outra. Gostaria de saber como solucionar esse problema, agradeço desde já... o código segue a baixo:
function scrollUpdate() {
var contenuto = this._parent.contenuto;
if (contenuto._height<this.bg._height) {
this._visible = false;
} else {
this._visible = true;
}
var pxls_cont = contenuto._height-this.bg._height;
var pxls_scroll = this.bg._height-this.barra._height;
var alfa = pxls_cont/pxls_scroll;
var vel = 2;
var desty = -this.barra._y*alfa+this.hxini;
desty = Math.floor(desty);
contenuto._y = Math.floor((contenuto._y*vel+desty)/(vel+1));
}
function starmenuScroll() {
yfin = this._parent.bg._height-this._height;
this.startDrag("", this._x, 0, this._x, yfin);
}
function stopScroll() {
this.stopDrag();
}
function moveScroll(dir) {
if (dir == "stop") {
delete controlador["onEnterFrame"];
} else {
var barra = this.barra;
var vel = 4;
if (dir == "cima") {
var lim = 0;
vel = vel*-1;
} else {
var lim = this.bg._height-barra._height;
}
}
controlador.onEnterFrame = function() {
if (dir == "baixo") {
if (barra._y+vel<lim) {
barra._y = barra._y+vel;
} else {
barra._y = lim;
}
} else if (barra._y+vel>lim) {
barra._y = barra._y+vel;
} else {
barra._y = lim;
}
};
}
this.hxini = this._parent.contenuto._y;
this.onEnterFrame = scrollUpdate;
this.barra.onPress = starmenuScroll;
this.barra.onRelease = stopScroll;
this.barra.onReleaseOutside = stopScroll;
this.createEmptyMovieClip("controlador", 100);
sup.onPress = function() {
moveScroll("cima");
};
sup.onRelease = inf.onRelease=function () {
moveScroll("stop");
};
inf.onPress = function() {
moveScroll("baixo");
};
inf.onRelease = function() {
moveScroll("stop");
};
barra.useHandCursor = true;
sup.useHandCursor = false;
inf.useHandCursor = false;Carregando comentários...