Hello, I’m currently making myself a new portfolio, mainly because I want to start learning some more advanced actionscript skills. I’m trying to setup my site so it runs completely off xml data.
Firstly I have an xml menu loading into “menu.swf” and also a xml document with loading into a “project.swf”… Now instead of making a different swf for each project I thought it would be better to have one swf. This would mean loading in a different xml document into the projects window.
Where I’m stuck is i’m unable to load a new xml into projects.swf.
This is a button I’m generating from xml in menu.swf
currItem.onRelease = function() {
proDescription.text = this.description;
xmlProject.load("project.xml");
};
and this is the code I’m using to load the xml in project.swf
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlProject = new XML();
xmlProject.ignoreWhite = true;
xmlProject.onLoad = loadXML;
xmlProject.load("project2.xml");
Currently I’m trying this with 2 xml docs in the same folder but eventually each project will have its own folder.
Also project.swf is being loaded into projectHolder through my main page, does this make a difference?
Thanks
David