# Time to repay my debt to this wonderfull site

**URL:** <https://forum.kirupa.com/t/time-to-repay-my-debt-to-this-wonderfull-site/23749>\
**Category:** flash\
**Created:** [June 21, 2003, 9:28pm UTC](https://forum.kirupa.com/t/time-to-repay-my-debt-to-this-wonderfull-site/23749 "2003-06-21T21:28:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adham\_a](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@adham\_a](https://forum.kirupa.com/u/adham_a)\
**Post date:** [June 21, 2003, 9:28pm UTC](https://forum.kirupa.com/t/time-to-repay-my-debt-to-this-wonderfull-site/23749/1 "2003-06-21T21:28:57Z")

</div>

Hello i don’t know if the hardcore flashers on this site will enjoy this code as i did when i created it but his is a little repay to the stuff i’ve learned from all of you here so thanks a lot.

This is a code for an empty movieClip action i did to do a slide show for a number of pictures based on an XML file containing the names of the images to show. Please provide any feedback.

[AS]  
onClipEvent (load) {  
len = \_root.env.count; // Number of images available loaded previously from XML  
frameNo = 1; // initialize frame Number  
pictureNo = 0; // initialize image number  
\_root.env.imageHolder.loadMovie(“filepath” + \_root.env.imageName[pictureNo]); // load initial image the image names is also loaded previously from XML  
}

onClipEvent (enterFrame) {  
// each 80 from (2 sec for me) change the image  
if (frameNo % 80 == 0) {  
pictureNo++; // increase image number  
if (pictureNo \>= len) {  
pictureNo = 0; // if reached last image goto to first one  
}  
\_root.env.imageHolder.loadMovie(“filepath” + \_root.env.imageName[pictureNo]); // load current image into movie  
}

```
frameNo++; // increase frame count

```

}  
[/AS]
