Updating an AS2 slider bar

I am new to the forums, as well as to Flash, and I had a question.
I am just learning AS3, and have no idea whatsoever about the differences between 2 and 3. There is a bit of code from http://flashexplained.com/menus-interfaces/how-to-make-a-minimalistic-vertical-menu-with-a-slider/ that I wanted to update to use AS3, but it was written in AS2.
Here it is:

var speed:Number = 9;
menuButton1_btn.onPress = menuButton2_btn.onPress = menuButton3_btn.onPress = menuButton4_btn.onPress = menuButton5_btn.onPress = menuButton6_btn.onPress = function () {
var clickedButtonPosition:Number = this._y;
var currentSliderPosition:Number = _root.slider_mc._y;
_root.onEnterFrame = function() {
_root.slider_mc._y += (clickedButtonPosition-currentSliderPosition)/speed;
currentSliderPosition = _root.slider_mc._y;
if (currentSliderPosition>=(clickedButtonPosition-0.8) && currentSliderPosition<=
(clickedButtonPosition+0.8)) {
currentSliderPosition = clickedButtonPosition;
delete _root.onEnterFrame;

I get twelve total errors (there are six buttons with a slider next to them, and there are 2 types of errors). The first is: 1119: Access of possibly undefined property onPress through a reference with static type flash.display:SimpleButton. The other is 1120: Access of undefined property _root. The key parts of the code (I think) are the button names, and slider_mc., a little black square that slides up and down the height of the menu.

All of the buttons are button symbols, each with a unique name. I read that to fix the 1119 error, I can convert them to movie clips, but then they no longer function as buttons (which is sort of the point). Can anyone offer some advice?

Thank you in advance,