Hello,
My btns don’t scroll continuously when I use onPress -
How would I get the scrolling function to repeat itself while the btn is being pressed?
_global.mainTL = this;
//load an image into the pic clip inside the window clip
//create scrollable clip
mc_win.scrollRect = new flash.geom.Rectangle(0, 0, 300, 200);
//--------------------------------- end initialization -----------------------\\
//--------------------------------- code for scrollers -----------------------\\
btn_up.onPress = function() {
target = mainTL.mc_win;
var scrollUp = target.scrollRect;
var scrollmax = target._y;
if (scrollUp.y>scrollmax) {
scrollUp.y -= 10;
target.scrollRect = scrollUp;
}
};
btn_down.onPress = function() {
target = mainTL.mc_win;
var scrollDown = target.scrollRect;
var scrollmax = scrollDown.height;
if (scrollDown.y<scrollmax) {
scrollDown.y += 10;
target.scrollRect = scrollDown;
}
};
//--------------------------------- end scroller code -----------------------\\
stop();