You’ll have to modify the AS a bit. You will need to switch the _x to _y in the AS and adjust the number cordinates accordingly, but yes it is possible.
Having _x and the var xnew in the AS will make it scroll horizontally. So if you want it to scroll vertically then you’ll need to switch all those x’s to y’s.
You’ll also need to play around with the cordinates as well to fine tune it.