Value from multiple array

I have 2 set of array. I wanted when at bug1, one of the value in the code run *1 *from the buttons array, bug2 it runs 2 from the points array…

This is the AS code.
ActionScript Code:
[FONT=Courier New][LEFT]for (var a = 0; a<points.length; a++) {
pnt = points[a];
pnt.id = Number(a)+1;
}

for (var a = 0; a<buttons.length; a++) {
btn = buttons[a];
btn.id = Number(a)+1;

btn.onPress = function() {
    this.startDrag();
    trace("Button "+this.id+" = Press");
};
btn.onRelease = function() {
    this.stopDrag();
    if ((eval(this._droptarget) == area) && (areaX == "on")) {
        _root.totalAmount = _root.totalAmount+point5;
        this._x = target._x;
        this._y = target._y;
        this.count = "yes";
        areaX = "off";
        trace("Button "+this.id+" = Release");
    } else if ((eval(this._droptarget) == area) && (this.count == "yes")) {
        this.count = "no";
        areaX = "on";
    } else if ((eval(this._droptarget) == bg_remove) && (this.count == "yes")) {
        _root.totalAmount = _root.totalAmount-point5;
        this.gotoAndPlay(2);
        dupBug(this);
        this.count = "no";
        areaX = "on";
    } else if ((eval(this._droptarget) == bg_remove) && (this.count == "no")) {
        this.gotoAndPlay(2);
        dupBug(this);
    } else {
        this.gotoAndPlay(2);
        dupBug(this);
    }
};

}
[/LEFT]
[/FONT]

And this is where i wanted to load in the value according to the buttons array.


_root.[COLOR=#000080]totalAmount[/COLOR]+**point5**;
_root.[COLOR=#000080]totalAmount[/COLOR]-**point5**;

How should I write the code? Thanx for any help!