Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML = I got the file URL path instead of the file content!

Status
Not open for further replies.

1lytlo04

Programmer
Nov 3, 2002
1
CA
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=&quot;texts/boisbriand.txt&quot;>Opening</slideNode>
<slideNode bodyURL=&quot;texts/haley.txt&quot;>Robots</slideNode>
<slideNode bodyURL=&quot;texts/sdm.txt&quot;>Group</slideNode>
<slideNode bodyURL=&quot;texts/coco.txt&quot;>Fun</slideNode>
<slideNode bodyURL=&quot;texts/gerry.txt&quot;>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(&quot;slides.xml&quot;);
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);
}
};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top