Actionscript 2.0 (CS4) - XML/FLASH

Hi,

I have an xml based “slideshow” file that I am trying to edit. I want to add two attributes to the xml/flash doc. Right now the XML file allows me to enter a URL (so when you click an image it will load the specified URL). It does not open in a new window though - I would like to add this option (to be able to edit in the XML file).

Second, there is a global variable set to allow me to control the speed of the slideshow (how long each slide will stay before it moves on to the next one). I would like to change this, so that each slide can be set for it’s own length.

I have attached the .fla file (CS4) for those that can help and will also copy & paste the relevant code below. (please note I commented out some of the code that I did not need ie, stop, pause and caption functionality)

I have attempted to add new attributes following the same pattern that is currently set in the document, unfortunately I do not understand XML very well beyond the basics, and therefore I was unsuccessful).

Your help would sincerely be appreciated.

Thanks.


FRAME 1 actions:

var myXML = new XML();
// set xml
myXML.load(strFilepath); // variable will populate file name
myXML.ignoreWhite = true;
myXML.onLoad = function (success:Boolean){
if(success){
// get data
_global.numOfImage = this.firstChild.childNodes.length;
_global.stage_width = int(this.firstChild.attributes.stage_width);
_global.stage_height = int(this.firstChild.attributes.stage_height);
_global.caption_left = int(this.firstChild.attributes.caption_left);
_global.caption_top = int(this.firstChild.attributes.caption_top);
_global.image_left = int(this.firstChild.attributes.image_left);
_global.image_top = int(this.firstChild.attributes.image_top);
_global.control_left = int(this.firstChild.attributes.control_left);
_global.control_top = int(this.firstChild.attributes.control_top);
_global.cols = int(this.firstChild.attributes.cols);
_global.space = int(this.firstChild.attributes.space);
_global.speed = int(this.firstChild.attributes.speed)1000;
for (var i = 0; i < numOfImage; i++){
var logos = this.firstChild.childNodes
.attributes.logos;
var httpURL = this.firstChild.childNodes*.attributes.httpURL;
var caption = this.firstChild.childNodes*.childNodes[0].childNodes[0].nodeValue;
images* = new Array(thumbnail,logos,httpURL,caption);//big
}
play();
}
}
stop ();

/* END ACTIONS FRAME 1 */


FRAME 3 ACTIONS (relevant to speed and httpURL variables/attributes)

function fadeInBigImage(){
// fade out the old image
if (bottomcontainer._alpha > 0){
bottomcontainer._alpha -= 10;
}
if (this._alpha < 100){
this._alpha += 10;
}else{
delete this.onEnterFrame;
topcontainer.enabled = false;
topcontainer.useHandCursor = false;
if(images[link-1][2]!=""){
topcontainer.enabled = true;
topcontainer.useHandCursor = true;
topcontainer.onRelease = function (){
getURL(images[link-1][2]);
}
}
// unlock image button
ani = 0;
// save current image number
preLink = link;
// get next image
beginInterval();
}
}
function beginInterval(){
intervalID = setInterval(getNext, speed);
}
function getNext(){
if(autoplay ==1){
play();
}
else{
clearInterval(intervalID);
}
}