# Verticle Scrolling HELP

**URL:** <https://forum.kirupa.com/t/verticle-scrolling-help/214039>\
**Category:** flash\
**Created:** [January 25, 2007, 1:45am UTC](https://forum.kirupa.com/t/verticle-scrolling-help/214039 "2007-01-25T01:45:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![osp](https://avatars.discourse-cdn.com/v4/letter/o/4da419/32.png) [@osp](https://forum.kirupa.com/u/osp)\
**Post date:** [January 25, 2007, 1:45am UTC](https://forum.kirupa.com/t/verticle-scrolling-help/214039/1 "2007-01-25T01:45:42Z")

</div>

I found a tutorial to scroll horizontally (on a different website) and it works fine but I am trying to get it to scroll vertically. So i changed the all of the x axis to y but it doesnt change a thing… Can anyone help?  
I appreciate it!

Here is my code:

[FONT=Arial]onClipEvent (load) {[/FONT]  
[FONT=Arial]ycenter = 393;[/FONT]  
[FONT=Arial]speed = 2;[/FONT]  
[FONT=Arial]offset = \_y;[/FONT]  
[FONT=Arial]goal = \_y;[/FONT]  
[FONT=Arial]cushion = 40;[/FONT]  
[FONT=Arial]decay = 0.10000000000000001;[/FONT]  
[FONT=Arial]diff = 20;[/FONT]  
[FONT=Arial]}[/FONT]  
[FONT=Arial]onClipEvent (enterFrame) {[/FONT]  
[FONT=Arial]if ((((\_y-offset)\<cushion && \_root.\_ymouse\<ycenter) || ((786-\_height)-cushion)\<(\_y-offset) && ycenter\<\_root.\_ymouse) && hitTest(\_root.\_ymouse, \_root.\_xmouse)) {[/FONT]  
[FONT=Arial]goal += \_root.\_ymouse\<ycenter ? ((ycenter-\_root.\_ymouse)/diff) : (-(\_root.\_ymouse-ycenter)/diff);[/FONT]  
[FONT=Arial]}[/FONT]  
[FONT=Arial]accel = (goal-\_y)\*decay;[/FONT]  
[FONT=Arial]\_y = (\_y+accel);[/FONT]  
[FONT=Arial]}[/FONT]
