Sliding menu in Fluid layout

Hi, Ive made a fluid layout
using this tutorial

I have now recently put a section into it where there are 5 images that slide horizontally when u click on their thumbnails.
Using this tutorial

I have managed to get everything fluid except for the amount the sliding images move horizontally. The original actionscript for each individual thumbnail is like this:

//sets the destination
on (press) {
_root.xnew = _root.mask2._x+(4-1)*100/2;

That will work fine for a normal layout, but because mine is a fluid layout it, it wont work properly on different screen resolutions. I was trying to replace the 100 value into the overall width of all of the sliding images divided by 5 but couldnt get it to work.

Any help would be appreciated,