Question
XML wont load
hello,
im using this great tutorial from gotoandlean.com
but have run into some problems
im trying to load jpg's into a flash with xml, using the following code
------------------------------------------------------------------------------------
var x:XML = new XML ();
x.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var w:Array = new Array();
var h: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 .attributes,url);
captions.push(photos.attributes,caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;
}
x.load(" http://www.antonnazarko.com/DAVE/photoLIST.xml");
previous.onRelease = function (){
if (whoIsOn > 0){
whoIsOn--;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}
-------------------------------------------------------------------------------
but i always get this prompt
Error opening URL 'file:///C|/Documents%20and%20Settings/anton/Desktop/DAVEG/[type Object]'
-- could someone double check thie code for me ?
not sure why it doesnt work.
thanks,
anton
im using this great tutorial from gotoandlean.com
but have run into some problems
im trying to load jpg's into a flash with xml, using the following code
------------------------------------------------------------------------------------
var x:XML = new XML ();
x.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var w:Array = new Array();
var h: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 .attributes,url);
captions.push(photos.attributes,caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;
}
x.load(" http://www.antonnazarko.com/DAVE/photoLIST.xml");
previous.onRelease = function (){
if (whoIsOn > 0){
whoIsOn--;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}
-------------------------------------------------------------------------------
but i always get this prompt
Error opening URL 'file:///C|/Documents%20and%20Settings/anton/Desktop/DAVEG/[type Object]'
-- could someone double check thie code for me ?
not sure why it doesnt work.
thanks,
anton