Need Help with Custom Scrollbar

hello, can anyone help me with this problem? I’ve tried for days to resolve this… and failed. And now i’d like help… This is regarding the tutorial that kirupa.com has supplied for us. http://www.kirupa.com/developer/flash8/scrollbar.htm to be specific.

Is there any way initially start the scrollbar and content at a specific location? In other words, when the movie begins, instead of the scrollbar starting either at the top or bottom, can it start in the middle (also corresponding to the content as well)?

I’ve modified the scrollbar to be horizontal for use in a timeline. I was able to have the initial start locations for both the content and scrollbar to start at a specific location with the following derivation (based on the length of my content page, which is very long):

var initPosition:Number = scrollFace._x=scrollFaceWidth-scrollTrack._x+642; var initContentPos:Number = contentMain._x=-21920;

Everything looks fine at startup, but when i try to move the scrollbar, the content either moves in reverse and/or back and forth, depending on which direction i move the dragger. The up and down buttons work fine… Can someone help me get the scrollbar and content working correctly?

here is the code for the scrollbar:

scrolling = function () {
var scrollWidth:Number = scrollTrack._width;
var contentWidth:Number = contentMain._width;
var scrollFaceWidth:Number = scrollFace._width;
var maskWidth:Number = maskedView._width;
var initPosition:Number = scrollFace._x=scrollFaceWidth-scrollTrack._x+642;
var initContentPos:Number = contentMain._x=-21920;
var finalContentPos:Number = maskWidth-contentWidth+initContentPos;
var left:Number = scrollFaceWidth-scrollTrack._x;
var top:Number = scrollTrack._y;
var right:Number = scrollTrack._width-scrollTrack._x;
var bottom:Number = scrollTrack._y;
var xFactor:Number =0;
var speed:Number = 10;
//determines amount of overall scroll
var moveVal:Number = (contentWidth-maskWidth)/(scrollWidth-scrollFaceWidth);

//////////////////scrollFace functions

scrollFace.onPress = function() {
var currPos:Number = this._x;
startDrag(this,false, left, top, right, bottom);
this.onMouseMove = function() {
xFactor = Math.abs(initPosition-this._x);
contentMain._x = Math.round(xFactor1moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};

You can use the kirupa tutorial for a reference. I’m assuming that the issue can be resolved in the scrollface section, but I can be wrong.

Please help me…
thanks,