betamax
01-13-2005, 11:38 AM
Quick question (hopefully) I'm building an xml driven gallery and I've got a bit of a problem targetting images.
This works fine:
jpeg = mySection.childNodes[i].attributes.jpegURL;
trace(jpeg);
But I need to add tnIcon so I can target this from a function using 'this':
tnIcon.jpeg = mySection.childNodes[i].attributes.jpegURL;
trace(tnIcon.jpeg);
This nearly works except the first result is 'undefined' the rest of the results are fine.
Any ideas why this is happening and how to solve it?
Many thanks
This works fine:
jpeg = mySection.childNodes[i].attributes.jpegURL;
trace(jpeg);
But I need to add tnIcon so I can target this from a function using 'this':
tnIcon.jpeg = mySection.childNodes[i].attributes.jpegURL;
trace(tnIcon.jpeg);
This nearly works except the first result is 'undefined' the rest of the results are fine.
Any ideas why this is happening and how to solve it?
Many thanks