stage.addEventListener(Event.ENTER_FRAME, loop, false);
function loop(e:Event): void
{
if(scene.x <= -10 && scene.x >= -9200)
scene.x -= (this.mouseX - 490) * speed;
{
if(scene.x > -10) scene.x = -10;
if(scene.x < -9200) scene.x = -9200;
}
}
So this is all the code that starts the Parallax event running. I'm using code from layersmagazine.com by Lee Brimelow.
The parallax effect scrolls along nicely when you move the mouse left or right of the stage, but what I would like it to do is start the Parallax effect automatically on load, scroll along for a bit then stop and switch to being controlled by the mouse.
MouseOver events aren't really effective as the scroll doesn't work well with it.