Hi, I can't figure out how I can move a masked MC according to the position
of the scroll bar.
I tried this code with a scrollbar a mask and MC (the content)
yp = scrollbar._y;
scrollRatio = MC._height/mask._height;
scrollbar._height = mask._height/scrollRatio; //gets the height of the
scrollbar ;
left = scrollbar._x;
top = scrollbar._y
right = scrollbar._x;
bottom = (mask._x + mask._height) - scrollbar._height;
this.onEnterFrame = function () {
//here is the formula i tried
MC._y = (-scrollbar._y+ yp) / scrollRatio; // for sure this is
incorrect!!!
}
scrollbar.onPress = function () {
startDrag(this, false, left,top,right,bottom);
}
scrollbar.onRelease = function () {
this.stopDrag();
}
scrollbar.onReleaseOutside = function () {
this.stopDrag();
}
// end of code
With this code the intial position of the MC isn't like the one it is
supposed to be, and the scrollbar isnt srcolling the MC entirely...
can any ne help???
Best Regards..
--
O.Fouad
_______________________________________________
[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