Hey ppl, I’m editing this template but there is a problem, when the page is online the scroll sometime doesnt work
http://www.s2.com.pt/uniovo/main.html
I don’t understand why, in the swf everything is perfect, but when the page is online if we test the scroll sometimes it simply doesn’t work !
The scroll code is:
max = pagina_txt.maxscroll;
vis = pagina_txt.maxviewable()
visPercent = (vis/max)*100
topOfScroll=scrollbg_mc._y;
dragHeight=scrollbg_mc._height-dragger_mc._height;
amountPerScroll=dragHeight/max;
dragger_mc.onPress=function(){
startDrag(this,false,scrollbg_mc._x,scrollbg_mc._y,scrollbg_mc._x,(scrollbg_mc._y+scrollbg_mc._height)-this._height);
this.onEnterFrame=function(){
amountFromTop=this._y-topOfScroll
newScroll=Math.floor(amountFromTop/amountPerScroll)+1
pagina_txt.scroll=newScroll
}
}
dragger_mc.onRelease = dragger_mc.onReleaseOutside=function(){
this.onEnterFrame=null;
dragger_mc.grip.gotoAndPlay(11);
stopDrag();
}
dragger_mc.onRollOver = function(){
dragger_mc.grip.gotoAndPlay(2);
}
dragger_mc.onRollOut = dragger_mc.onReleaseOutside = function(){
this.onEnterFrame=null;
dragger_mc.grip.gotoAndPlay(11);
stopDrag();
}
}
TextField.prototype.maxviewable = function() {
if (this.maxscroll>1) return this.bottomScroll;
var b = (this.text) ? this.bottomScroll-1 : this.bottomScroll;
if (!this.length) this.text = "»";
var out = Math.floor(this._height/(this.textHeight/b));
if (this.text == "»") this.text = "";
return out;
};
but offline everything is ok !
Can anyone give me any clue ?
Tks