# Slideshow cancels when tabbing

**URL:** <https://forum.kirupa.com/t/slideshow-cancels-when-tabbing/221326>\
**Category:** flash\
**Created:** [April 3, 2007, 12:31pm UTC](https://forum.kirupa.com/t/slideshow-cancels-when-tabbing/221326 "2007-04-03T12:31:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![filten](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@filten](https://forum.kirupa.com/u/filten)\
**Post date:** [April 3, 2007, 12:31pm UTC](https://forum.kirupa.com/t/slideshow-cancels-when-tabbing/221326/1 "2007-04-03T12:31:30Z")

</div>

I used the slideshow tutorial here on [kirupa.com](http://kirupa.com). However when I’m using Firefox and switching between tabs it stops showing the pictures. The script goes on and the commentary text is shown but the pictures just isn’t there. What am I doing wrong?

```auto

delay = 5000;
//-----------------------
function loadXML(loaded) {

if (loaded) {

xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {

image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].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 = bild.getBytesTotal();
loaded = bild.getBytesLoaded();
preloader._visible = true;

if (loaded != filesize) {

preloader.preload_bar._xscale = 100*loaded/filesize;

} else {

bild._width = 437;
bild._height = 283;

preloader._visible = false;
if (bild._alpha<100) {

bild._alpha += 10;

}
}

}

function nextImage() {
    
if (p<(total-1)) {

p++;
if (loaded == filesize) {

bild._alpha = 0;
bild.loadMovie(image[p], 1); 
comment.text = description[p];
picture_num();
slideshow();
}

}

}

function firstImage() {

if (loaded == filesize) {

bild._alpha = 0;
bild.loadMovie(image[0], 1);
comment.text = description[0];
picture_num();
slideshow();

}

}

function picture_num() {

current_pos = p+1;
nummer.text = current_pos+" / "+total;

}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {

clearInterval(myInterval);

if (p == (total-1)) {

p = 0;
firstImage();

} else {

    
nextImage();

}

}

}

```

online ex:  
[http://www.rikardandersson.se/bildspel/index.html](http://www.rikardandersson.se/bildspel/index.html)
