# Dynamic Slide show problems

**URL:** https://forum.kirupa.com/t/dynamic-slide-show-problems/272213
**Category:** flash
**Created:** [October 2, 2008, 11:54pm UTC](https://forum.kirupa.com/t/dynamic-slide-show-problems/272213 "2008-10-02T23:54:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![andy106](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@andy106](https://forum.kirupa.com/u/andy106)
#### Post date: [October 2, 2008, 11:54pm UTC](https://forum.kirupa.com/t/dynamic-slide-show-problems/272213/1 "2008-10-02T23:54:03Z")

</div>

Hi I am trying to create a slideshow with no buttons, I just want it start loading the images fading trhough them. The images should all be loaded from a external folder.

here is the code I have so far, but I can figure out how to make it load without hitting the next button.

square.\_alpha=0;  
i.e. alpha=0  
mypic=1;

\_root.onEnterFrame = function() { // \_root main movie timeline, when movie starts call function  
next.onPress = function()  
{  
if (mypic \< 10 && !fadeIn && !fadeOut)  
{  
fadeOut=true;  
mypic++;  
}  
if (mypic \>= 10)  
{  
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=10;  
}  
}  
{  
if (square.\_alpha \<10)  
{  
loadMovie(“images/img”+mypic+".jpg", “square”)  
fadeOut=false;  
fadeIn=true;  
}

if (square.\_alpha \> 10 && fadeOut)  
{  
square.\_alpha -= 10;  
}

if (square.\_alpha \< 100 && fadeIn && !fadeOut)  
{  
square.\_alpha += 10;  
}  
else  
{  
fadeIn=false;  
}  
}  
}

Thank you for your help.  
Andy
