
May 8th, 2007, 20:56
|
|
New Member
|
|
Join Date: May 2007
Location: Philadelphia, PA
Age: 27
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
Scroll Limit
I have a issue with my scroll arrows. When dragging the scroll bar is stops at the initial X and Y. When using the up/down arrows, it ignores that boundary. How would you set that limit?
Thank you in advance.
- Code: Select all
...previous code
scroller_mc.onEnterFrame = function() {
current=((this._y - initialY)/scrollLength*maxScroll);
news_txt.scroll = current+1;
}
scroller_mc.onPress = function() { this.startDrag(false, initialX ,initialY, initialX, endY); }
scroller_mc.onRelease = function() { stopDrag(); }
scroller_mc.onReleaseOutside = function() { stopDrag(); }
up_mc.scroll = function() {
this._parent.scroller_mc._y--;
}
up_mc.onPress = function(){
this.int_down = setInterval(this, "scroll", 0);
}
up_mc.onRelease = up_mc.onReleaseOutside = function(){
clearInterval(this.int_down);
}
down_mc.scroll = function(){
this._parent.scroller_mc._y++;
}
down_mc.onPress=function(){
this.int_down = setInterval(this, "scroll", 0);
}
down_mc.onRelease = down_mc.onReleaseOutside = function(){
clearInterval(this.int_down);
}
|