# Slideshow help needed

**URL:** https://forum.kirupa.com/t/slideshow-help-needed/247100
**Category:** flash
**Created:** [December 18, 2007, 4:20pm UTC](https://forum.kirupa.com/t/slideshow-help-needed/247100 "2007-12-18T16:20:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![andyd](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@andyd](https://forum.kirupa.com/u/andyd)
#### Post date: [December 18, 2007, 4:20pm UTC](https://forum.kirupa.com/t/slideshow-help-needed/247100/1 "2007-12-18T16:20:22Z")

</div>

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
