Hi guys,
Thanks for checking out my post…
I’ve made a scrollbar dragger for an mc in Flash 8 using a mask.
When I test the site, everything works absolutely fine except the fact that a small section from the bottom of every movie clip gets cut off and I can’t scroll down any more to make it visible.
Check it out at http://spindriftmedia.com/clients/snowy/snowy.php if you go to the CV section and scroll to the bottom.
This is the code I’m using to make everything work:
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;
};
if (contentHeight<maskHeight) {
scrollFace._visible = false;
} else {
scrollFace._visible = true;
}
};
scrolling();
Does anyone have any suggestions as to what might be causing this by any chance?
Thank you very much and I hope to hear from you.
All the best,
Mark