Hi, I'm new to AS3 and trying to get to grips with it all.

When using AS2 a mc when moved via AS would slide to the new position. I have some AS3 code, which when the left or right buttons are pressed moves the mc to a new position, but it just jumps to the new position instead of sliding.

How would I alter the code so that it slides to the new position instead of jumping? I've searched everywhere and tried to add tweenLite but I really am stuck


Here's the code I'm using -


illleftButton.addEventListener(MouseEvent.MOUSE_UP , leftbuttonill);

function leftbuttonill(event:MouseEvent):void{

if (MovieClip(root).mainContainer.illustration.x < -40){
(MovieClip(root).mainContainer.illustration.x += 1250.0);

}

else if (MovieClip(root).mainContainer.illustration.x > 3.8){
(MovieClip(root).mainContainer.illustration.x += 0);

}
}


illrightButton.addEventListener(MouseEvent.MOUSE_U P, rightbuttonill);

function rightbuttonill(event:MouseEvent):void{

if (MovieClip(root).mainContainer.illustration.x > -7000){
(MovieClip(root).mainContainer.illustration.x -= 1250.0);


}

else if (MovieClip(root).mainContainer.illustration.x < -7000){
(MovieClip(root).mainContainer.illustration.x += 0);

}
}


Any help would be greatly appreciated.