# Kirupa tutorial

**URL:** <https://forum.kirupa.com/t/kirupa-tutorial/182265>\
**Category:** flash\
**Created:** [March 16, 2006, 7:17pm UTC](https://forum.kirupa.com/t/kirupa-tutorial/182265 "2006-03-16T19:17:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aphexburn](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@aphexburn](https://forum.kirupa.com/u/aphexburn)\
**Post date:** [March 16, 2006, 7:17pm UTC](https://forum.kirupa.com/t/kirupa-tutorial/182265/1 "2006-03-16T19:17:42Z")

</div>

I’ve been playing with the flash and XML slide show ([http://kirupa.com/developer/mx2004/xml\_slideshow.htm](http://kirupa.com/developer/mx2004/xml_slideshow.htm)) tutorial from this site. I have changed it a bit so it uses the loader component to load swfs instead of jpgs into a movie clip. I have my component set to scale the content of the swfs when they are loaded so they completely fit in the 647X80 I am loading them into the loader but its not rescaling them, Any ideas?

Thanks in advance

```auto

delay = 60000;
//----------------------- 
function loadXML(loaded) {
 if (loaded) {
  xmlNode = this.firstChild;
  image = [];
  total = xmlNode.childNodes.length;
  for (i=0; i<total; i++) {
   image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
  }
  firstImage();
 } else {
  content = "file not loaded!";
 }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
///////////////////////////////////// 
p = 0;
this.onEnterFrame = function() {
 filesize = picture.getBytesTotal();
 loaded = picture.getBytesLoaded();
 if (loaded != filesize) {
  preloader.preload_bar._xscale = 100*loaded/filesize;
 } else {
  preloader._visible = false;
  if (picture._alpha<100) {
   picture._alpha += 10;
  }
 }
};
function nextImage() {
 if (p<(total-1)) {
  p++;
  if (loaded == filesize) {
   picture._alpha = 0;
   picture.loadMovie(image[p], 1);
   picture_num();
   slideshow();
  }
 }
}
function firstImage() {
 if (loaded == filesize) {
  picture._alpha = 0;
  picture.loadMovie(image[2], 1);
  picture_num();
  slideshow();
 }
}
function slideshow() {
 myInterval = setInterval(pause_slideshow, delay);
 function pause_slideshow() {
  clearInterval(myInterval);
  if (p == (total-1)) {
   p = 0;
   firstImage();
  } else {
   nextImage();
  }
 }
}

```
