473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Action script in a photo slide show using XML

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.)

Here is my script:
Expand|Select|Wrap|Line Numbers
  1. slides_xml = new XML();
  2. slides_xml.onLoad = startSlideShow;
  3. slides_xml.load("conferencephotos.xml");
  4. slides_xml.ignoreWhite = true;
  5.  
  6. function startSlideShow(success) {
  7.     if (success == true) {
  8.             rootNode = slides_xml.firstChild;
  9.             totalSlides = rootNode.childNodes.length;
  10.             firstSlideNode = rootNode.firstChild;
  11.             currentSlideNode = firstSlideNode;
  12.             currentIndex = 1;
  13.             updateSlide(firstSlideNode);
  14.  
  15.     }
  16. }
  17.  
  18. function updateSlide(newSlideNode) {
  19.     imagePath = newSlideNode.attributes.jpegURL;
  20.     slideText = newSlideNode.firstChild.nodeValue;
  21.     loadMovie(imagePath, targetClip);
  22. }
  23.  
  24. next_btn.onRelease = function() {
  25.     nextSlideNode = currentSlideNode.nextSibling;
  26.     if (nextSlideNode == null) {
  27.         break;
  28.     } else {
  29.         currentIndex++;
  30.         updateSlide(nextSlideNode);
  31.         currentSlideNode = nextSlideNode;
  32.     }
  33. };
  34.  
  35. back_btn.onRelease = function() {
  36.     previousSlideNode = currentSlideNode.previousSibling;
  37.     if (previousSlideNode == null) {
  38.         break;
  39.     } else {
  40.         currentIndex--;
  41.         currentSlideNode = previousSlideNode;
  42.         updateSlide(previousSlideNode);
  43.     }
  44. };
  45.  
Mar 9 '07 #1
0 6638

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: nick | last post by:
After spending many hours trying to find a simple looking, fast,dynamic php photo-gallery for my digital pictures, I decided to code a my own. Once installed, all you have to do is drop a new...
2
by: CeNo | last post by:
All, Any help would be appriecated here...I have downloaded a working script, for use with a web site of images. The java is a slide show of images....Anyways, the images dont load in the slide...
22
by: bevoldjling | last post by:
Hi ! I need some help in putting together a website for our family gathering. Although I'm still pretty "green", I don't think what I need requires terribly advanced skills ...except for one...
4
by: Mike Chen | last post by:
Dear all, I made a c# program for my friend's wedding. It slides all photos in specified folder automatically. To roll the pictures smoothly I firstly scan and store all pictures in RAM and push...
0
by: Ed Sproull [MSFT] | last post by:
I have an ASP site (www.elsphoto.com} and I have several pages that have slide shows on them. The home page uses JPGs from a directory and the Family, Wedding and Pets pages retrieve the photos...
1
by: Oelie | last post by:
Hello, I'm trying to make a photo slide show in VB6. I'm trying to get the right size for my pictures, they have to fill up the screen entirely. It works with the first picture. But when a picture...
7
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference....
0
by: suzyq89 | last post by:
Hi there, I'm a newbie with AS2....and i wanted to learn to create a photo gallery that scrolls right or left, and that when you click on the photo it becomes bigger. Well I found a tutorial from...
2
by: vineetbindal | last post by:
Hi all, We have a slide show in a page which shows slids rotating after every 8-10 seconds with some descriptions about them. The problem is if the connection speed is slow then the page loads...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.