I have a small script that moves the frame head backwards and forwards depending on where my mouseX coordinate is inside the main flash movie. Here's my code and it's working so far:
function onEnterFrame(event:Event):void
{
var frame:Number = Math.round(mouseX / (stage.stageWidth / animation.totalFrames));
animation.gotoAndStop(frame);
}
However, when the mouseX cursor leaves the Flash window at x=0, the left edge of the movie, and the mouse reenters the Flash window at stage.stageWidth, the right edge of the movie, the entire movie jumps/jerks to the last framehead.
Now this is sort of what is desired, but I want to soften the effect of moving from ex. frame 0 to frame 30.
So instead of popping to 30, there should be a smooth transition. Can anyone suggest how to manipulate the above function to enable that kind of behaviour!
Thanks in advance!