im trying to convert an actions script for a vertical scroll to a horizontal scroll here is the original code:

box_mc.m = 0;
box_mc.l = track_mc._x;
box_mc.t = track_mc._y;
box_mc.r = track_mc._x;
box_mc.b = track_mc._y + track_mc._height - box_mc._height;
box_mc.yPos = box_mc._y;
box_mc.drag = false;
box_mc.range = track_mc._height - box_mc._height;


box_mc.scroll_b = mask_mc._y;
box_mc.scroll_t = mask_mc._y - ( scroll_mc._height - mask_mc._height );
box_mc.scroll_range = scroll_mc._height - mask_mc._height;

box_mc.onPress = function() {
this.startDrag( false, this.l, this.t, this.r, this.b );
this.drag = true;
this.onMouseMove = function() {
this.by = this.ay;
this.ay = this._y;
this.set_scroll_pos();
this.set_scroll_line();
};
};

box_mc.onRelease = box_mc.onReleaseOutside = function() {
this.stopDrag();
delete this.onMouseMove;
this.drag = false;
this.yPos = this._y;
this.m = this.ay - this.by;
};


box_mc.onEnterFrame = function() {
if ( this.drag == false ) {
this.m = this.m * .8;
this.yPos += this.m;
if ( this.yPos < this.t ) {
this.yPos = this.t; // Stop at top
this.m = -this.m; // Reverse motion
}

if ( this.yPos > this.b ) {
this.yPos = this.b;
this.m = -this.m; // this.m = this.m * -1;
}

this._y = this.yPos;

// Set the position of scroll_mc
this.set_scroll_pos();
this.set_scroll_line();
}
};

box_mc.set_scroll_pos = function() {
var y = ( this._y - this.t ) / this.range;
scroll_mc._y = this.scroll_b - ( this.scroll_range * y );
};

box_mc.set_scroll_line = function() {
var y = ( this._y - this.t ) / this.range;
scroll_txt.scroll = ( ( scroll_txt.maxscroll - 1 ) * y ) + 1;
};




down_mc.onRelease = function() {
box_mc.m += 5;
};

up_mc.onRelease = function() {
box_mc.m -= 5;
};



I tried just simply switching the y coordinates to x but no luck the scroll bar movie breaks. here is what i did to try and covert it:

box_mc.m = 0;
box_mc.l = track_mc._x;
box_mc.t = track_mc._y;
box_mc.r = track_mc._x;
box_mc.b = track_mc._y + track_mc._width - box_mc._width;
box_mc.yPos = box_mc._x;
box_mc.drag = false;
box_mc.range = track_mc._width - box_mc._width;


box_mc.scroll_b = mask_mc._x;
box_mc.scroll_t = mask_mc._x - ( scroll_mc._width - mask_mc._width );
box_mc.scroll_range = scroll_mc._width - mask_mc._width;



box_mc.onPress = function() {
this.startDrag( false, this.l, this.t, this.r, this.b );
this.drag = true;
this.onMouseMove = function() {
this.by = this.ay;
this.ay = this._x;
this.set_scroll_pos();
this.set_scroll_line();
};
};

box_mc.onRelease = box_mc.onReleaseOutside = function() {
this.stopDrag();
delete this.onMouseMove;
this.drag = false;
this.yPos = this._x;
this.m = this.ay - this.by;
};


box_mc.onEnterFrame = function() {
if ( this.drag == false ) {
this.m = this.m * .8;
this.yPos += this.m;
if ( this.yPos < this.t ) {
this.yPos = this.t; // Stop at top
this.m = -this.m; // Reverse motion
}

if ( this.yPos > this.b ) {
this.yPos = this.b;
this.m = -this.m; // this.m = this.m * -1;
}

this._x = this.yPos;

// Set the position of scroll_mc
this.set_scroll_pos();
this.set_scroll_line();
}
};

box_mc.set_scroll_pos = function() {
var x = ( this._x - this.t ) / this.range;
scroll_mc._x = this.scroll_b - ( this.scroll_range * x );
};

box_mc.set_scroll_line = function() {
var x = ( this._x - this.t ) / this.range;
scroll_txt.scroll = ( ( scroll_txt.maxscroll - 1 ) * x ) + 1;
};


down_mc.onRelease = function() {
box_mc.m += 5;
};

up_mc.onRelease = function() {
box_mc.m -= 5;
};


please help . thanks in advance.