# Script Tweek help

**URL:** <https://forum.kirupa.com/t/script-tweek-help/270116>\
**Category:** flash\
**Created:** [September 5, 2008, 8:48am UTC](https://forum.kirupa.com/t/script-tweek-help/270116 "2008-09-05T08:48:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spirographer](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@spirographer](https://forum.kirupa.com/u/spirographer)\
**Post date:** [September 5, 2008, 8:48am UTC](https://forum.kirupa.com/t/script-tweek-help/270116/1 "2008-09-05T08:48:11Z")

</div>

Hi Everyone,

I have a slideshow script that I need to tweek slightly. I’ve used it previously to load any chosen image from a bunch of thumbnails but for this one I just need the first image (image1) to load then the user can scroll forward and backwards as required. All works well other than it displays no image until an arrow is clicked. I have tried hardcoding image1 into this part (loadMovie(“image”+mypic+".jpg", “square”)) but it is not working. Any help would be greatly appreciated.

Please be gentle I’m a newbie to this forum 😉

Thanks in advance,  
Spirographer

var chosen;  
var mypic;  
square.\_alpha=0; // set movie clip called square to transparent i.e. alpha=0  
mypic=chosen; // mypic is a variable is used to count the images in the show

\_root.onEnterFrame = function() // \_root main movie timeline, when movie starts call function

{  
if (square.\_alpha \<10) // if square movie contains image with less than 10% transparency  
{  
//loadMovie(“images/image”+mypic+".jpg", “square”) // Local  
loadMovie(“image”+mypic+".jpg", “square”) // load image1.jpg into movie square  
fadeOut=false; // image is not fading out  
fadeIn=true; // image fade In is set to true  
}

```
if (square._alpha &gt; 10 && fadeOut) 
{
square._alpha -= 10; // if fading fade movie = movie – 10% alpha until faded out
}

if (square._alpha &lt; 100 && fadeIn && !fadeOut) // if image is fading and not Out 
{ 
square._alpha += 10; // increment fade in 10% until completely faded in i.e. 100% alpha 
}
else // if image is not fading in or out i.e. has loaded then do not fade in the image 
{
fadeIn=false; 
} 

```

}

next.onPress = function()  
{  
if (mypic \< 12 && !fadeIn && !fadeOut)  
{  
fadeOut=true;  
mypic++;  
}  
if (mypic \>= 12)  
{  
mypic=1;  
}  
}

back.onPress = function()  
{  
if (mypic \> 1 && !fadeIn && !fadeOut)  
{  
fadeOut = true;  
mypic–;  
}  
if (mypic == 1 && !fadeIn && !fadeOut) // if image is on 1 go to the last image in series  
{  
fadeOut=true;  
mypic=12;  
}  
}
