DarthNeo1970
02-28-2007, 09:19 PM
Hi Guyz,
I need some help. My stage is (676X526).
I have a movieclip ("menu") containing mutiple buttons on layer 3.
Above that I have layer 2 with a mask that is (w:325, h:138, x:15, y:382). Above that layer is a actionlayer with 3 keyframes , and in the third keyframe:
mouseX = _xmouse;
menuX = menu._x;
if (mouseX > 145) {
diff = (mouseX-145)/15;
}
if (mouseX < 125) {
diff = (125-mouseX)/15;
}
if (mouseX <= 165 && menuX <= 0) {
setProperty("menu", _x, menuX+diff);
}
if (mouseX >= 165 && menuX >= -655) {
setProperty("menu", _x, menuX-diff);
}
if (menu._x >= 0) {
menu._x = 0;
} else if (menu._x <= -655) {
menu._x = -655;
}
gotoAndPlay(2);
My problem is this. The scrolling works fine, but I need the clip to scoll only when the mouse is above the Mask on layer 2. I have tried several things like placing the code within the movieclip with rollover functions but nothing seems to work like it should.
Any help is very much appriciated.
I need some help. My stage is (676X526).
I have a movieclip ("menu") containing mutiple buttons on layer 3.
Above that I have layer 2 with a mask that is (w:325, h:138, x:15, y:382). Above that layer is a actionlayer with 3 keyframes , and in the third keyframe:
mouseX = _xmouse;
menuX = menu._x;
if (mouseX > 145) {
diff = (mouseX-145)/15;
}
if (mouseX < 125) {
diff = (125-mouseX)/15;
}
if (mouseX <= 165 && menuX <= 0) {
setProperty("menu", _x, menuX+diff);
}
if (mouseX >= 165 && menuX >= -655) {
setProperty("menu", _x, menuX-diff);
}
if (menu._x >= 0) {
menu._x = 0;
} else if (menu._x <= -655) {
menu._x = -655;
}
gotoAndPlay(2);
My problem is this. The scrolling works fine, but I need the clip to scoll only when the mouse is above the Mask on layer 2. I have tried several things like placing the code within the movieclip with rollover functions but nothing seems to work like it should.
Any help is very much appriciated.