Problem with a custom scrollbar


i have used tutorial kirupa tutorial create custom scrollbars in flash site working on. in instances have used these scrollbars, work except one. faq... it's 2400 pixels tall, , scrolling under mask 450 pixels tall. seems complete lenght of faq scroll, cannot view approximately bottom third of faq. comes blank.

can fixed?

here action scripting scrollbar (same in tutorial...

--------------------------


scrolling = function () {

var scrollheight:number = scrolltrack._height;
var contentheight:number = contentmain._height;
var scrollfaceheight:number = scrollface._height;
var maskheight:number = maskedview._height;
var initposition:number = scrollface._y=scrolltrack._y;
var initcontentpos:number = contentmain._y;
var finalcontentpos:number = maskheight-contentheight+initcontentpos;
var left:number = scrolltrack._x;
var top:number = scrolltrack._y;
var right:number = scrolltrack._x;
var bottom:number = scrolltrack._height-scrollfaceheight+scrolltrack._y;
var dy:number = 0;
var speed:number = 10;
var moveval:number = (contentheight-maskheight)/(scrollheight-scrollfaceheight);

scrollface.onpress = function() {

var currpos:number = this._y;
startdrag(this, false, left, top, right, bottom);
this.onmousemove = function() {

dy = math.abs(initposition-this._y);
contentmain._y = math.round(dy*-1*moveval+initcontentpos);

};

};
scrollface.onmouseup = function() {

stopdrag();
delete this.onmousemove;

};
btnup.onpress = function() {

this.onenterframe = function() {

if (contentmain._y+speed<maskedview._y) {

if (scrollface._y<=top) {

scrollface._y = top;

} else {

scrollface._y -= speed/moveval;

}
contentmain._y += speed;

} else {

scrollface._y = top;
contentmain._y = maskedview._y;
delete this.onenterframe;

}

};

};
btnup.ondragout = function() {

delete this.onenterframe;

};
btnup.onrollout = function() {

delete this.onenterframe;

};
btndown.onpress = function() {

this.onenterframe = function() {

if (contentmain._y-speed>finalcontentpos) {

if (scrollface._y>=bottom) {

scrollface._y = bottom;

} else {

scrollface._y += speed/moveval;

}
contentmain._y -= speed;

} else {

scrollface._y = bottom;
contentmain._y = finalcontentpos;
delete this.onenterframe;

}

};

};
btndown.onrelease = function() {

delete this.onenterframe;

};
btndown.ondragout = function() {

delete this.onenterframe;

};

if (contentheight<maskheight) {

scrollface._visible = false;
btnup.enabled = false;
btndown.enabled = false;

} else {

scrollface._visible = true;
btnup.enabled = true;
btndown.enabled = true;

}

};
scrolling();

--------------------------

a link actual flash file swf file , see scrollbar problem in action view flash file , hit faq link, faq content displays problem.

here screenshot of flash file worked in flash 8 pro
screenshot



More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support