Hi there!
Here is my problem:
My .swf is supposed to read in a XML file an attribute which is a relative URL path. It doesn't. Instead it returns and populates the text field with the path!
For your information, in the following scripts, the word Slide covers, in reality, a panel of information (a la PowerPoint) with no picture content for the moment.
Many thanks in advance for your remarks and advices!
Have a very nice time.
Regards.
______________________________________
Here is the URL where you can see the test file:
<
______________________________________
Here is the content of the XML File:
<Slides>
<slideNode bodyURL="texts/boisbriand.txt">Opening</slideNode>
<slideNode bodyURL="texts/haley.txt">Robots</slideNode>
<slideNode bodyURL="texts/sdm.txt">Group</slideNode>
<slideNode bodyURL="texts/coco.txt">Fun</slideNode>
<slideNode bodyURL="texts/gerry.txt">Me</slideNode>
</Slides>
_______________________________________________
Here is the complete ActionScript contained in my .swf:
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.onLoad = convertXML;
slides_xml.load("slides.xml"
;
slides_xml.ignoreWhite = true;
//
// Show the first slide and intialize variables
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
}
}
//
// Updates the current slide with new body and text
function updateSlide(newSlideNode) {
textBody = newSlideNode.attributes.bodyURL;
slideText = newSlideNode.firstChild.nodeValue;
targetClip.LoadVars.textBody;
}
//
// Event handler for 'Next slide' button
next_btn.onRelease = function() {
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};
//
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
previousSlideNode = currentSlideNode.previousSibling;
if (previousSlideNode == null) {
break;
} else {
currentIndex--;
currentSlideNode = previousSlideNode;
updateSlide(previousSlideNode);
}
};
Here is my problem:
My .swf is supposed to read in a XML file an attribute which is a relative URL path. It doesn't. Instead it returns and populates the text field with the path!
For your information, in the following scripts, the word Slide covers, in reality, a panel of information (a la PowerPoint) with no picture content for the moment.
Many thanks in advance for your remarks and advices!
Have a very nice time.
Regards.
______________________________________
Here is the URL where you can see the test file:
<
______________________________________
Here is the content of the XML File:
<Slides>
<slideNode bodyURL="texts/boisbriand.txt">Opening</slideNode>
<slideNode bodyURL="texts/haley.txt">Robots</slideNode>
<slideNode bodyURL="texts/sdm.txt">Group</slideNode>
<slideNode bodyURL="texts/coco.txt">Fun</slideNode>
<slideNode bodyURL="texts/gerry.txt">Me</slideNode>
</Slides>
_______________________________________________
Here is the complete ActionScript contained in my .swf:
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.onLoad = convertXML;
slides_xml.load("slides.xml"
slides_xml.ignoreWhite = true;
//
// Show the first slide and intialize variables
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
}
}
//
// Updates the current slide with new body and text
function updateSlide(newSlideNode) {
textBody = newSlideNode.attributes.bodyURL;
slideText = newSlideNode.firstChild.nodeValue;
targetClip.LoadVars.textBody;
}
//
// Event handler for 'Next slide' button
next_btn.onRelease = function() {
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};
//
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
previousSlideNode = currentSlideNode.previousSibling;
if (previousSlideNode == null) {
break;
} else {
currentIndex--;
currentSlideNode = previousSlideNode;
updateSlide(previousSlideNode);
}
};