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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with making my scirprt auto play

Status
Not open for further replies.

MikeDiver

Technical User
Apr 22, 2007
7
AU
How do I change my script to automatically play, rather than clicking through individual slides?

What is the action script to skip to a specific slide in the show via a button? (Right now I have a next an previous buttons.)

And can u show me what u did?

Here is my script:
Code:

slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("conferencephotos.xml");
slides_xml.ignoreWhite = true;

function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);

}
}

function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpegURL;
slideText = newSlideNode.firstChild.nodeValue;
loadMovie(imagePath, targetClip);
}

next_btn.onRelease = function() {
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};

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