Is there any reason why an if statement will interupt a xml connection?

I am working on a small flash slideshow using xml from a tutorial on this site, and it works great except for the text fields need to be moved and resized each slide. So I created an if statement to do so depending on which slide is showing, but the minute I put the if statement in the actionscript the xml data doesnt seem to come through anymore. Any Suggestions?

This is my code:

// Slide duration (milliseconds) //
delay = 10000;

//-----------------------//
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
slide = [];
heading = [];
body = [];
total = xmlNode.childNodes.length;
for (i = 0; i < total; i++) {
slide* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
heading* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
body* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
}
firstImage();
} else {
content = “XML not loaded!”;
}
}

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“slides.xml”);
p = 0;

this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded == filesize) {
if (picture._alpha < 100) {
picture._alpha += 7;
heading_txt._alpha += 7;
body_txt._alpha += 7;
}
}
};

function nextImage() {
if (p < (total - 1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
heading_txt._alpha = 0;
body_txt._alpha = 0;
picture.loadMovie(slide[p], 1);
heading_txt.text = heading[p];
body_txt.text = body[p];
slideshow();
}
}
}

function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
heading_txt._alpha = 0;
body_txt._alpha = 0;
picture.loadMovie(slide[0], 1);
heading_txt.text = heading[0];
body_txt.text = body[0];
slideshow();
}
}

function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total - 1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}

// Manipulate text fields according to slides //
/if(picture = “slides/slide_01.jpg”){
heading_txt._x = 89;
heading_txt._y = 157;
heading_txt._width = 493;
body_txt._x = 89;
body_txt._y = 203;
body_txt._width = 435;
body_txt._height = 215;
}
/