# Slideshow Having Problems in Browser

**URL:** https://forum.kirupa.com/t/slideshow-having-problems-in-browser/202615
**Category:** flash
**Created:** [October 3, 2006, 3:05am UTC](https://forum.kirupa.com/t/slideshow-having-problems-in-browser/202615 "2006-10-03T03:05:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![trowley](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@trowley](https://forum.kirupa.com/u/trowley)
#### Post date: [October 3, 2006, 3:05am UTC](https://forum.kirupa.com/t/slideshow-having-problems-in-browser/202615/1 "2006-10-03T03:05:40Z")

</div>

Hi:

I am using the code off this site for the xml based slideshow (built off the xml based photo gallery). It seems to be working fine in Flash as well as testing in the browser, although when I upload it doesn’t seem to find the content. Here is the AS:

ActionScript Code:  
[FONT=Courier New][LEFT]\</p\>  
\<p\>&nbsp;\</p\>  
\<p\>delay = [COLOR=#000080]3000[/COLOR]; \</p\>  
\<p\>[COLOR=#808080]_//----------------------- \</p\>_[/COLOR]  
\<p\>function loadXMLCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>xmlNode = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]firstChild[/COLOR]; \</p\>  
\<p\>image = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR]; \</p\>  
\<p\>description = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR]; \</p\>  
\<p\>total = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR].[COLOR=#0000ff]length[/COLOR]; \</p\>  
\<p\>for [COLOR=#000000]([/COLOR]i=[COLOR=#000080]0[/COLOR]; i\<total; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>image[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR]; \</p\>  
\<p\>description[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>firstImageCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>content = [COLOR=#ff0000]“file not loaded!”[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>xmlData = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]XML[/COLOR]COLOR=#000000[/COLOR]; \</p\>  
\<p\>xmlData.[COLOR=#0000ff]ignoreWhite[/COLOR] = [COLOR=#000000] **true** [/COLOR]; \</p\>  
\<p\>xmlData.[COLOR=#0000ff]onLoad[/COLOR] = loadXML; \</p\>  
\<p\>xmlData.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#808080]_///////////////////////////////////// \</p\>_[/COLOR]  
\<p\>listen = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]Object[/COLOR]COLOR=#000000[/COLOR]; \</p\>  
\<p\>listen.[COLOR=#0000ff]onKeyDown[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>if [COLOR=#000000]([/COLOR][COLOR=#0000ff]Key[/COLOR].[COLOR=#0000ff]getCode[/COLOR]COLOR=#000000[/COLOR] == [COLOR=#0000ff]Key[/COLOR].[COLOR=#0000ff]LEFT[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>prevImageCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] [COLOR=#0000ff]else[/COLOR] [COLOR=#0000ff]if[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#0000ff]Key[/COLOR].[COLOR=#0000ff]getCode[/COLOR]COLOR=#000000[/COLOR] == [COLOR=#0000ff]Key[/COLOR].[COLOR=#0000ff]RIGHT[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>nextImageCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR]; \</p\>  
\<p\>p = [COLOR=#000080]0[/COLOR]; \</p\>  
\<p\>this.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>filesize = picture.[COLOR=#0000ff]getBytesTotal[/COLOR]COLOR=#000000[/COLOR]; \</p\>  
\<p\>loaded = picture.[COLOR=#0000ff]getBytesLoaded[/COLOR]COLOR=#000000[/COLOR]; \</p\>  
\<p\>preloader.[COLOR=#0000ff]\_visible[/COLOR] = [COLOR=#000000] **true** [/COLOR]; \</p\>  
\<p\>if [COLOR=#000000]([/COLOR][COLOR=#0000ff]loaded[/COLOR] != filesize[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>preloader.[COLOR=#000080]preload\_bar[/COLOR].[COLOR=#0000ff]\_xscale[/COLOR] = [COLOR=#000080]100[/COLOR]\*[COLOR=#0000ff]loaded[/COLOR]/filesize; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>preloader.[COLOR=#0000ff]\_visible[/COLOR] = [COLOR=#000000] **false** [/COLOR]; \</p\>  
\<p\>if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>picture.[COLOR=#0000ff]\_alpha[/COLOR] += [COLOR=#000080]10[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR]; \</p\>  
\<p\>function nextImageCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>p++; \</p\>  
\<p\>if [COLOR=#000000]([/COLOR][COLOR=#0000ff]loaded[/COLOR] == filesize[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>picture.[COLOR=#0000ff]\_alpha[/COLOR] = [COLOR=#000080]0[/COLOR]; \</p\>  
\<p\>picture.[COLOR=#0000ff]loadMovie[/COLOR][COLOR=#000000]([/COLOR]image[COLOR=#000000][[/COLOR]p[COLOR=#000000]][/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR]; \</p\>  
\<p\>desc\_txt.[COLOR=#0000ff]text[/COLOR] = description[COLOR=#000000][[/COLOR]p[COLOR=#000000]][/COLOR];\</p\>  
\<p\>picture\_numCOLOR=#000000[/COLOR]; \</p\>  
\<p\>slideshowCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>function prevImageCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>p–; \</p\>  
\<p\>picture.[COLOR=#0000ff]\_alpha[/COLOR] = [COLOR=#000080]0[/COLOR]; \</p\>  
\<p\>picture.[COLOR=#0000ff]loadMovie[/COLOR][COLOR=#000000]([/COLOR]image[COLOR=#000000][[/COLOR]p[COLOR=#000000]][/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR]; \</p\>  
\<p\>desc\_txt.[COLOR=#0000ff]text[/COLOR] = description[COLOR=#000000][[/COLOR]p[COLOR=#000000]][/COLOR]; \</p\>  
\<p\>picture\_numCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>function firstImageCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>if [COLOR=#000000]([/COLOR][COLOR=#0000ff]loaded[/COLOR] == filesize[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>picture.[COLOR=#0000ff]\_alpha[/COLOR] = [COLOR=#000080]0[/COLOR]; \</p\>  
\<p\>picture.[COLOR=#0000ff]loadMovie[/COLOR][COLOR=#000000]([/COLOR]image[COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR]; \</p\>  
\<p\>desc\_txt.[COLOR=#0000ff]text[/COLOR] = description[COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR];\</p\>  
\<p\>picture\_numCOLOR=#000000[/COLOR]; \</p\>  
\<p\>slideshowCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>function picture\_numCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>current\_pos = p+[COLOR=#000080]1[/COLOR]; \</p\>  
\<p\>pos\_txt.[COLOR=#0000ff]text[/COLOR] = current\_pos+[COLOR=#ff0000]" / "[/COLOR]+total; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>function slideshowCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>myInterval = [COLOR=#0000ff]setInterval[/COLOR][COLOR=#000000]([/COLOR]pause\_slideshow, delay[COLOR=#000000])[/COLOR]; \</p\>  
\<p\>function pause\_slideshowCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>clearIntervalCOLOR=#000000[/COLOR]; \</p\>  
\<p\>if [COLOR=#000000]([/COLOR]p == COLOR=#000000[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>p = [COLOR=#000080]0[/COLOR]; \</p\>  
\<p\>firstImageCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR] \</p\>  
\<p\>nextImageCOLOR=#000000[/COLOR]; \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>[COLOR=#000000]}[/COLOR] \</p\>  
\<p\>  
[/LEFT]  
[/FONT]

I have the swf in the root dir as well as a folder (\_xml) with all the content and images.xml. I’ve gotten similar galleries to work with xml in this way, am I missing something?

Any help would be appreciated.

Thanks
