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]