flash tutorial gone wrong..
Hello![]()
I am trying to create a custom scrollbar for a website... I watched the tutorial>http://www.entheosweb.com/Flash/video_tutorials/custom_scroller.asp
on how to create one. I have the scrollbar working but it won't attach to the text!
Here is the actionscript:
var scrollUpper:Number = 338.2;
var scrollLower:Number = 498.2;
var textLower:Number = 337.0;
var textUpper:Number = 514;
var scrollRange:Number = scrollLower - scrollUpper;
var textRange:Number = textLower - textUpper;
function scroll () {
var moved:Number = scroller_mc._y - scrollUpper;
var pctMover:Number = moved/scrollRange;
var textMove:Number = pctMoved*textRange;
text_mc_y = textLower - textMove;
}
scroller_mc.onPress = function () {
this.startDrag (false,this._x,scrollUpper,this._x,scrollLower);
this.onMouseMove = scroll;
}
scroller_mc.onRelease = scroller_mc.onReleaseOutside = function() {
this.stopDrag ();
this.onMouseMove = null;
}
I have the text in a mc called text_mc and the scrollbar in scroll_mc. There is a mask over the text.
Thank you for your time!
Virginia
