Slideshow help needed

Hi

I’ve got the below script for a horizontally sliding slideshow, i need help with 2 things though;

  1. I want the slides to appear in the movie stationary and not sliding from right to left when the movie loads

  2. I want the slides to stop sliding right/left when they reach the end of the array?? At the moment they just keep sliding

[COLOR=red]this.createEmptyMovieClip(“theScene”, 1);
theScene._x = 80;
theScene._y = 45;[/COLOR]
[COLOR=red]objectsInScene = new Array();[/COLOR]
[COLOR=red]for( var i:Number = 0; i < 8; i++ )
{
attachedObj:MovieClip = theScene.attachMovie( “pane” + i, “pane” + i, i );
var attachedObj:MovieClip = theScene.attachMovie( “pane” + i, “pane” + i, i, {_x: ( i * 150) } );
}[/COLOR]
[COLOR=red]theScene.onEnterFrame = function()
{
this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*15;
}
if (this._x>0)
{
this._x = 0;
}
if (-this._x>(this._width-Stage.width))
{
this._x = -(this._width-Stage.width);
}[/COLOR]

Any help would be great

Thanks
Andy