Buttons don't align

Hi,

I have a problem with this code that I found for doing a menu kind of like the MAC OS Dock.

centerx = Stage.width/2;
centery = Stage.height/2;
menuholder = createEmptyMovieClip(“menuholder”, -1);
menuholder._y = centery;
menucount = 10;
menuitems = [];
miwidth = 20;
miborder = 1;
startx = centerx-((menucount-1)(miwidth+miborder))/2;
trace(startx);
for (var i = 0; i<menucount; i++) {
var menuitem = menuholder.attachMovie(“menuitem”, “menu”+i, i);
menuitem._x = startx+i
(miwidth+miborder);
menuitem.id = i;
menuitem.onRollOver = function() {
_root.selected = this;
};
menuitems.push(menuitem);
}
onEnterFrame = function () {
var width = 0;
for (var i = 0; i<menucount; i++) {
var xxm = menuitems*._xmouse;
var yym = menuitems*._ymouse;
var xm = Math.sqrt(xxmxxm+yymyym);
if (xm<50) {
menuitems*._xscale = menuitems*._yscale += ((200-xm)-menuitems*._yscale)/3;
} else {
menuitems*._xscale = menuitems*._yscale += (100-menuitems*._yscale)/3;
}
width += menuitems*._width;
}
width += (menucount-1)miborder;
var xpos = Math.round(centerx-width/2);
for (var i = 0; i<menucount; i++) {
xpos += menuitems[i-1]._width/2+miborder+menuitems
._width/2;
menuitems*._x = xpos;
}
};

The problem is that it works fine if the player is 6, but if I export the .swf to version 8 or higher, it’s not working, and I don’t know why. The _x position of the buttons it’s not changing when I rollover one of the buttons. Any ideas why is this happening?