La pregunta es como hago para que el easing del movimiento sea más suave.
El codigo en AS2 que hace funcionar el sitio es el siguiente:
Código actionscript:
Ver original
var currentPosition:Number = contentHold.content1._x; var startFlag:Boolean = false; menuSlide = function (input:MovieClip) { if (startFlag == false) { startFlag = true; var finalDestination:Number = input._x; var distanceMoved:Number = 0; var distanceToMove:Number = Math.abs(finalDestination-currentPosition); var finalSpeed:Number = .3; var currentSpeed:Number = 0; var dir:Number = 1; if (currentPosition<=finalDestination) { dir = -1; } else if (currentPosition>finalDestination) { dir = 1; } this.onEnterFrame = function() { currentSpeed = Math.round((distanceToMove-distanceMoved+1)*finalSpeed); distanceMoved += currentSpeed; contentHold._x += dir*currentSpeed; if (Math.abs(distanceMoved-distanceToMove)<=1) { contentHold._x = maskMovie._x-currentPosition+dir*distanceToMove; currentPosition = input._x; startFlag = false; delete this.onEnterFrame; } }; } }; b1.onRelease = function() { menuSlide(contentHold.content1); }; b2.onRelease = function() { menuSlide(contentHold.content2); }; b3.onRelease = function() { menuSlide(contentHold.content3); }; b4.onRelease = function() { menuSlide(contentHold.content4); }; b5.onRelease = function() { menuSlide(contentHold.content5); };