Reload slides.xml and images in Slideshow

I am attempting to create a Digital Signage-like presentation. I am using a Cisco DMP 4310G Digital Media Player which is flash-optimized and likes actionscript 2.0 best. The slideshow consists of a slides.xml file and a number of slide#.jpg files. The actionscript, which came from Cisco, reads the slides.xml to get some variables and to know where and which slide#.jpg files are available to display. The slideshow loops those slides forever. This is exactly how the script was intended to function and it works 100%…

However, I would like to modify the script so that I can add a variable to determine how many times the slides will loop before it reloads the xml file and list of slides. The purpose is to make it possible to add and delete slides from the slideshow without having to restart the player. My thought is that, if the swf reloads the slides.xml and slides, it will become a much more dynamic presentation and anyone viewing the slideshow won’t be presented with a blank screen or cisco-related boot messages.

Below are the slides.xml and the actionscript associated with the project.

SLIDES.XML
&slide1=slides/slide1.jpg&
&slide2=slides/slide2.jpg&
&slide3=slides/slide3.jpg&
&slide4=slides/slide4.jpg&
&slide5=slides/slide5.jpg&
&slide6=slides/slide6.jpg&
&slide7=slides/slide7.jpg&
&slide8=slides/slide8.jpg&
&slide9=slides/slide9.jpg&
&maxImagesIndex=9&
&slideDuration=5000&
&FadeRate=25&

ACTIONSCRIPT:
import com.cisco.dms.MediaPlayer; //Imports a cisco-specific API .as file
var image_index:Number = 1;
var mIndex:Number;
var mDuration:Number = 1;
var mFadeRate:Number;
var prefix = “”;

var mp:MediaPlayer = new MediaPlayer();
mp.stopVideo();
var videoStarted:Boolean = false;
mp.setColorKey(0x01, 0x00, 0x01, 0);
myBox.backgroundColor = 0x010001;
var listener:Object = new Object(); //(6)
listener.videoStatus = function(msg:String)
{
if(msg == “START”) {
videoStarted = true;
} else if (msg == “STOP”) {
if(videoStarted)
playNext();
videoStarted = false;
} else
mp.logInfo(“Failure…”);
};
mp.addListener(listener);
var lv:LoadVars = new LoadVars(); //(1)
lv.load(“slides/slides.xml”);

lv.onLoad = function(success:Boolean):Void{ //(2)
if(success == true){
mIndex =parseInt(this.maxImagesIndex);
mDuration =parseInt(this.slideDuration);
mFadeRate =parseInt(this.FadeRate);

initImage();
}
};

function initImage(){ //(3)
_root.imageHolder._xscale = 100;
_root.imageHolder._yscale = 100;
_root.imageHolder._alpha = 100;
_root.imageHolder._x = _root.mask_mc._x;
_root.imageHolder._y = _root.mask_mc._y;
_root.imageHolder.loadMovie(lv[“slide1”]); //(4)
setTimeout(decreaseAlpha, mDuration); //(5)
}

function loadImage():Void{
if(_root.imageHolder._alpha <= 0){
image_index++;
if(image_index > mIndex){
image_index = 1;}

_root.imageHolder.loadMovie(lv[“slide” + image_index]); //(6)
_root.imageHolder._alpha = 100;
setTimeout(decreaseAlpha, mDuration); //(7)
} else {
decreaseAlpha();
}
}
function decreaseAlpha( ):Void{
_root.imageHolder._alpha -= mFadeRate; //(8)
setTimeout(loadImage, 10); //(9)
}