Ok so basicaly I have 2 images moving back and forth to a certain point. However when they get to that point they just stop. I would like them to come to a slow stop insted of just stoping on a dime. Can this be done? here is what Im doing.
stageWidth = Stage.width;
speed1 = 250;
speed2 = 200;
mc1Width = front_mc._width;
mc2Width = back_mc._width;
mc1Height = front_mc._width;
mc2Height = back_mc._width;
mc1X = front_mc._x;
mc2X = back_mc._x;
mc1Y = front_mc._y;
mc2Y = back_mc._y;
lock_scroll = false;
_root.onEnterFrame = function() {
if (!lock_scroll) {
scroll_mcx();
}
scroll_mcy();
};
function scroll_mcx() {
var xdist = _xmouse-(stageWidth/2);
mc1X += -xdist/speed1;
mc2X += -xdist/speed2;
if (mc1X>=0) {
mc1X = 0;
}
if (mc1X<=stageWidth-mc1Width) {
mc1X = stageWidth-mc1Width;
}
if (mc2X>=0) {
mc2X = 0;
}
if (mc2X<=stageWidth-mc2Width) {
mc2X = stageWidth-mc2Width;
}
setProperty("front_mc", _x, mc1X);
setProperty("back_mc", _x, mc2X);
}
function scroll_mcy() {
var xdist = _xmouse-(stageWidth/2);
mc1X += -xdist/speed1;
mc2X += -xdist/speed2;
if (mc1X>=0) {
mc1X = 0;
}
if (mc1X<=stageWidth-mc1Width) {
mc1X = stageWidth-mc1Width;
}
if (mc2X>=0) {
mc2X = 0;
}
if (mc2X<=stageWidth-mc2Width) {
mc2X = stageWidth-mc2Width;
}
setProperty("front_mc", _x, mc1X);
setProperty("back_mc", _x, mc2X);
}
//create an empty mc container for content to display
createEmptyMovieClip("content_box",200);
content_box._x = 195;
content_box._y = 92;
Thanks for any help