Hi Guys,
I'm really interested in learning Flash. I have followed a tutorial to try and create my first ever Flash project - an image slide-show using XML.
Here is my XML code:
and here is the action script...<?xml version="1.0" encoding="utf-8"?>
<slideshow>
<photo url="amy1.jpg" caption="This is our office in Barnby Dun."></photo>
<photo url="amy2.jpg" caption="This is the local Barnby Dun church."></photo>
<photo url="amy3.jpg" caption="The draw-bridge over the River Don."></photo>
<photo url="amy4.jpg" caption="The church from a distance."></photo>
<photo url="amy5.jpg" caption="This is not us, but it is what we do."></photo>
<photo url="amy6.jpg" caption="Barnby Dun road."></photo>
<photo url="amy7.jpg" caption="The draw-bridge close-up."></photo>
</slideshow>
Now when I try and preview my movie I get this error:var x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var whoIsOn:Number;
x.onLoad = function() {
var photos:Array = this.firstChild.childNodes;
for(i-0;i<photos.length;i++) {
urls.push(photos[i].attributes.url);
captions.push(photos[i].attributes.caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;
}
x.load("lost.xml");
previous.onRelease = function() {
if(whoIsOn > 0) {
whoIsOn--;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}
next.onRelease = function() {
if(whoIsOn < urls.length-1) {
whoIsOn++;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}
I have had a search on the forums but haven't found any resolutions to my problem.
All my files are in the same folder (C/flashmovies) and the files that are in there are:
amy1.jpg, amy2.jpg, amy3.jpg, amy4.jpg, amy5.jpg, amy6.jpg, amy7.jpg, lost.xml, slideshow.swf and slideshow.fla
I'm sure this is an easy solution but I am an absolute beginner to this so would appreciate a bit of help.
Thanks in advance,
Gaz.