Scrolling mask

Hello,

Here is my problem.
I have a movie clip to which I load thumbnails form an XML file. This MC is under a mask that is used to scroll those thumbails horizontaly.
The code looks like this:

var center = Stage.width/2;
var speed = .015;
function activateMenu() {
menu.onEnterFrame = function() {
var distance = _root._xmouse-center;
if (maska.hitTest(_root._xmouse, _root._ymouse)) {
this._x += (distance*speed);
if (this._x<-sub_menu._width/2) {
this._x = 0;
}
if (this._x>0) {
this._x = -sub_menu._width/2;
}
}
};
}

It works fine untill I publish the movie in such a way that it uses the entire browser window and is centered. When I do the the center of the stage seems to be more to the right for some reason and the scrolling is much faster if I move the mouse pointer to the left than when I move it to the right (and stops on the right side of the thumbnails instead of stoping in the middle).

I imagine it has something to do with the first line of the code, but I don’t know how to counteract the effect.

Also, is there a way to scroll the thumbs under the mask with a left and right buttons instead of using mouse position?

Thanks in advance for any info you guys can provide.

It turns out that this uneven scrolling is caused by HTML scaling options when the movie is published. When it’s set to “No Scale” the problem is present. When I set it to “Default” it works ok, but the movie is distorted.

I really need it to be a full browser website, so I have to set it to no scale + 100% x 100% browser size.
I don’t know if there is a way to work around the issue. Only thing that I can think of would be using scrolling buttons instead of mouse position, but I don’t know how to do it.
Any ideas? :slight_smile: