Hi guys,

I found a script to make the animation follow the mouse movement and it needed to stay in fixed boundaries. I have 3 different mc 1 behind the other and moving at a different pace to give a illusion of perspective. But here are my issues;

1-It works but when I open a new window in the browser the mc(s) are disappearing.

2-And I would really need to ease or smooth the animation a little. I would like the mc(s) to continue to move and stop slowly after I already stopped moving the mouse.

Any ideas how to script both or even 1 of these ? Here's the code I am using now;

function loopX(e:Event):void
{
var xDist:Number = mouseX - 24000

mc1.x = xDist * -0.02;

}

addEventListener(Event.ENTER_FRAME, loopbX);

function loopbX(e:Event):void

{
var xDist2:Number = mouseX - 10000

mc2.x = xDist2 * -0.05;

}

addEventListener(Event.ENTER_FRAME, loopcX);


function loopcX(e:Event):void
{
var xDist3:Number = mouseX - 10000

mc3.x = xDist3 * -0.1;

}


Maybe I even need to rewrite the whole script, but if you have this in mind, please try my code first to really understand the kind of movement I am looking for.

Thanks guys !!!!