[AS2/CS3] Error opening URL file undefined

Hi all

I’ve been working with flash on and off for about 4 years now so I’m used to the interface but I’ve never worked with actionscript that much.

I’m working on a flash photo gallery that uses XML to load each images title text, and the filepath to each thumbnail image and full size image.

It all seems to be working fine, however when I test the movie I get the following error message in the output:

[COLOR=Red]Error opening URL ‘file:///Z|/20930AliWebb/FlashGallery/fla/undefined’[/COLOR]

The images are stored in a folder named gallery_images and the thumbnails in a folder called gallery_thumbs, both within the fla folder. The fla folder also contains the xmlphoto.xml file and my flash file.

Here’s my actionscript:

spacing = 60;

//create a new xml object 
galleryXML = new XML();
// ignore any whitespace without this the xml file loading may fail due to  small spacing errors
galleryXML.ignoreWhite = true;
//function performed once the loading is complete.
galleryXML.onLoad = function(success) {

    numImages = this.firstChild.childNodes.length;

    /* create a loop which repeats itself for the total number of images.*/
    for (i = 0; i <= numImages; i++) {
        // assigns a temporary name for each of the childNodes so that they can be referenced later on in the loop.
        this.picHolder = this.firstChild.childNodes*;
        //create a unique movie clip for each thumbnail, assign a temporary reference thumbholder for the movieclips
        this.thumbHolder = thumbnails_mc.createEmptyMovieClip("thumbnail" + i, i);
        //set the x vaues for each newly created movieclip.
        this.thumbHolder._x = i*spacing;
        //create new movie clip and then load the thumbnails into it.
        this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
        this.thumbLoader.loadMovie(this.picHolder.attributes.thumb);
        
        
        this.thumbHolder.title = this.picHolder.attributes.title;
        
        
        this.thumbHolder.main = this.picHolder.attributes.main;
                
        //reduce the thumbnails opacity on mouse hover
        this.thumbHolder.onRollOver = function() {this._alpha = 50;}
        //100% opacity on mouse roll out
        this.thumbHolder.onRollOut = function() {this._alpha = 100;}
        
        
        this.thumbHolder.onRelease = function() {

                    
            var myMCL = new MovieClipLoader();
            
            //center the image at x:282.5, y:212
            myMCL.onLoadInit = function() {
                loader._x = (282.5 - (loader._width / 2));
                loader._y = (212 - (loader._height / 2));
            }
            
            myMCL.loadClip(this.main, "loader");
            
            title_txt.text = this.title;
        }
    }
}

//actually load the file
galleryXML.load("xmlphoto.xml");


//function for when left arrow is pressed
leftarrow.onPress = function() {
    //set thumbstop to false
    thumbstop = false;
    //run this function every frame
    thumbnails_mc.onEnterFrame = function() {
        //if the thumbnails x position is less than 42.5
        //and thumbstop is not true then increase x position by 5
        if ((this._x < 42.5) && (thumbstop != true)) this._x += 5;
        //else delete function
        else this.onEnterFrame = null;
    }
}

//function for when left arrow is pressed, similar to previous function
rightarrow.onPress = function() {
    thumbstop = false;
    thumbnails_mc.onEnterFrame = function() {
        if ((this._x > -677.5) && (thumbstop != true)) this._x -= 5;
        else this.onEnterFrame = null;
    }
}

//set thumbstop to true when the left mouse button is released (stops thumbnails from scrolling)
this.onMouseUp = function() { thumbstop = true; }

And the XML:

<gallery>
<image main="gallery_images/image1.jpg" thumb="gallery_thumbs/thumb1.jpg" title="White rendered walls brighten up a shady spot"/>
<image main="gallery_images/image2.jpg" thumb="gallery_thumbs/thumb2.jpg" title="Architectural Lines and Focal Points are key to this design"/>
<image main="gallery_images/image3.jpg" thumb="gallery_thumbs/thumb3.jpg" title="An urban garden for relaxing and entertaining"/>
<image main="gallery_images/image4.jpg" thumb="gallery_thumbs/thumb4.jpg" title="A family barn-conversion garden, for lots of play and adventure!"/>
<image main="gallery_images/image5.jpg" thumb="gallery_thumbs/thumb5.jpg" title="Finishing touches, with quality materials"/>
<image main="gallery_images/image6.jpg" thumb="gallery_thumbs/thumb6.jpg" title="Sweeping curves complement the old oast-house"/>
<image main="gallery_images/image7.jpg" thumb="gallery_thumbs/thumb7.jpg" title="South-facing ‘Chocolate’ border, with cooling water feature"/>
<image main="gallery_images/image8.jpg" thumb="gallery_thumbs/thumb8.jpg" title="A Circular patio and terraced lawn for a family garden"/>
<image main="gallery_images/image9.jpg" thumb="gallery_thumbs/thumb9.jpg" title="Attractive foliage planting in dappled shade"/>
<image main="gallery_images/image10.jpg" thumb="gallery_thumbs/thumb10.jpg" title="Cottage garden charm for a Victorian school-house building"/>
<image main="gallery_images/image11.jpg" thumb="gallery_thumbs/thumb11.jpg" title="A tranquil place to unwind..."/>
<image main="gallery_images/image12.jpg" thumb="gallery_thumbs/thumb12.jpg" title="Taking full advantage of open countryside views"/>
<image main="gallery_images/image13.jpg" thumb="gallery_thumbs/thumb13.jpg" title="Attention to detail makes all the difference"/>
<image main="gallery_images/image14.jpg" thumb="gallery_thumbs/thumb14.jpg" title="Sun-drenched terrace for sun-bathing and evening dining"/>
<image main="gallery_images/image15.jpg" thumb="gallery_thumbs/thumb15.jpg" title="A sunken area provides much-needed shelter in this windy, hill-top garden!"/>
<image main="gallery_images/image16.jpg" thumb="gallery_thumbs/thumb16.jpg" title="A steep incline is overcome with gently sloping walls"/>
<image main="gallery_images/image17.jpg" thumb="gallery_thumbs/thumb17.jpg" title="A clipped box parterre contains exuberant planting"/>
<image main="gallery_images/image18.jpg" thumb="gallery_thumbs/thumb18.jpg" title="Superb open views incorporated into the design"/>
<image main="gallery_images/image19.jpg" thumb="gallery_thumbs/thumb19.jpg" title="Contemporary styling complemented by soft planting"/>
<image main="gallery_images/image20.jpg" thumb="gallery_thumbs/thumb20.jpg" title="A south-facing front garden has a Mediterranean feel"/>
</gallery>

What’s causing the error message?
Is it easy to fix?
Everything seems to be working ok so should I even waste time trying to sort it out?

TIA
McCoy