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;
};
--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
_______________________________________________
[email protected]
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