0
votes

I've got a flash vertical menu which has auto-scroll but it scrolls too fast and the only way to slow it down is to increase the height of the button.

I would like to replace the code with a scrollpane so I can control the menu:

Code chunk I need to remove then add the additional scrollpane code

menu_mc_Europe.onEnterFrame = function() {
    if (_ymouse>10 && _ymouse<boundry_mc._height && _xmouse>0 && _xmouse<boundry_mc._width) {
        ratio = (menu_mc_Europe._height-boundry_mc._height)/(boundry_mc._height);
        if (_ymouse>boundry_mc._height/2) {
            destScroll = -(_ymouse)*ratio-menu_mc_Europe.bttn_mc._height*ratio;
        } else {
            destScroll = -(_ymouse)*ratio
        }
        menu_mc_Europe._y += Math.round((destScroll-menu_mc_Europe._y)/5);
        if (menu_mc_Europe._y<-(totalBttns*menu_mc_Europe.bttn_mc._height-boundry_mc._height)) {
            menu_mc_Europe._y = -(totalBttns*menu_mc_Europe.bttn_mc._height-boundry_mc._height);
        }
    } else {
        destScroll = 1;
        menu_mc_Europe._y += Math.round((destScroll-menu_mc_Europe._y)/5);
    }
};
1
Please use "Code sample" option. This is not clear - Chathuranga Chandrasekara
This looks like AS2, but its tagged Actionscript3 - Adam Harte

1 Answers

0
votes

hard to read that code w/out line breaks - what does 'ratio' represent above? is it a variable you can set? if not, just a wild guess, but try changing the divisor (the 5) in the '_y)/5' sections above?