I’ve created a vertical accordion based of this one - http://www.visual-blast.com/flash/accordion-style-flash-menu/
But for some reason in my version the scrolling is jerky and sometimes overlaps causing two layers to flash. How can i fix that. All i’ve done is change all the width values to height and all the x values to y. Heres my code.
stop();
speed = 5;
initial_height = 75;
target_height = 300;
sp = rect1._y;
this.createEmptyMovieClip(“emptymc”, 0);
emptymc.onEnterFrame = function() {
for (i=1; i<=4; i++) {
if (_root.hit.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root[“rect”+i].hitTest(_root._xmouse, _root._ymouse, true)) {
new_y = (_root.sp-(75*(i-1)))-rect1._y;
rect1._y += new_y/speed;
n_height = target_height-_root[“rect”+i]._height;
_root[“rect”+i]._height += n_height/speed;
} else {
n_height2 = initial_height-_root[“rect”+i]._height;
_root[“rect”+i]._height += n_height2/speed;
}
} else {
new_y = _root.sp-rect1._y;
rect1._y += new_y/(speed+50);
n_height2 = initial_height-_root[“rect”+i]._height;
_root[“rect”+i]._height += n_height2/(speed-1);
}
_root[“rect”+(i+1)]._y = _root[“rect”+i]._y+_root[“rect”+i]._height;
_root[“movie”+i]._y = _root[“rect”+i]._y-1;
}
};