Hey guys. I have a stack of images that I need to move down when the mouse is above y = 250 and up when the mouse is below y = 250. I have this code, but the problem is I don’t know how to add easing. Can anyone pose a solution? Thanks :beam:
onEnterFrame = function() {
someConstant = 2342;
lastIndex = picThumbArray.length - 1;
lastImage = imageStack_mc["picContainer"+lastIndex];
firstImage = imageStack_mc.picContainer0;
if (_xmouse > 750 && _xmouse < 950) {
if (_ymouse < 250) {
if (imageStack_mc._y < 45) {
imageStack_mc._y += 2;
//imageStack_mc._y = (45 - imageStack_mc._y) / someConstant;
}
} else {
if (imageStack_mc._y > (540 - (83 * picThumbArray.length + 75))) {
imageStack_mc._y -= 2;
}
}
}
}
p.s. that one line thats commented out, this one: //imageStack_mc._y = (45 - imageStack_mc._y) / someConstant; is my attempt at easing , but that code just makes it zoom instantly to 45. wierd.