my scroll bar?
http://ctrlzproduction.com/flash/m1r-04/m1r-04.html
it’s a drop in compent and it sticks or something
thanks
this is the code on the scrollbar but not all of it
FScrollBarClass.prototype.setScrollTarget = function(tF)
{
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[ (this.horizontal) ? "hScroller" : "vScroller" ];
if (!(this.textField.hScroller==undefined) && !(this.textField.vScroller==undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) return;
this.textField = tF;
this.textField[ (this.horizontal) ? "hScroller" : "vScroller" ] = this;
this.onTextChanged();
this.onChanged = function()
{
this.onTextChanged();
}
this.onScroller = function()
{
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
}
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
}
FScrollBarClass.prototype.callback = function(prop, oldVal, newVal)
{
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return newVal;
}
FScrollBarClass.prototype.onTextChanged = function()
{
if (!this.enable || this.textField==undefined) return;
clearInterval(this.synchScroll);
if (this.horizontal) {
var pos = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxhscroll));
} else {
var pos = this.textField.scroll;
var pageSize = this.textField.bottomScroll - this.textField.scroll;
this.setScrollProperties(pageSize, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxscroll));
}
}