Can I assume that you are offsetting your scroll "dragger" by 30 because you have arrow buttons at the top and bottom of the scrollbar? If so you need to change the +30 to -30. Otherwise you are just shifting the scroll area down rather than removing 30 from both ends. That might account for your scrolling to high.
Charles P. On 11/27/06, Carl Welch <[EMAIL PROTECTED]> wrote:
Hello All, I have a movieclip that I attach a varying number of other movieclip that are stacked vertically. I am trying to figure out some math that accounts for the varying height of the scrolled movieclip. I am having a problem with the math though. I am using something that looks like: buttonMask._y = 60+(-(this._y)/ratio); the "ratio" variable comes from the movieclip with the stacked (attached) movieclips DIVIDED by the height of my scroll bar. But it doesn't seem to work well. The scroller moves my movieclip too high. I don't even know how to make this sound with out sounding like an idiot.... Here's my code: //buttonMask is the movieclip that gets the other movieclips loaded into. //line is part of my scrollbar & dragger is my little scroll knob that gets dragged dragger.onPress = function() { startDrag("dragger", true, line._x, 30, line._x, line._height+30); ratio = (buttonMask._height/line._height); this.onEnterFrame = function() { buttonMask._y = 60+(-(this._y)/ratio); /////////<this is where I need help. }; }; dragger.onRelease = function() { dragger.stopDrag(); delete this.onEnterFrame; };
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com