Slide show/s :)

This is a discussion on "Slide show/s :)" within the Flash & Multimedia Forum section. This forum, and the thread "Slide show/s :) are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 24th, 2007, 17:16
New Member
Join Date: May 2007
Location: New Jersey
Age: 25
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Slide show/s :)

Hello everyone that reads this. I am just a mere beginner in Flash and I'm having an issue. I have used these two tutorials to creat a slide show.

1. http://www.kirupa.com/developer/mx20...otogallery.htm

2. http://www.kirupa.com/developer/mx20..._slideshow.htm

What if I wanted to incorporate both options? To have the slideshow but also the capability of clicking the next or previous button to go through the images however fast you want?

Can anybody please help me on this?

Code: This is the slide show scroll action script. How can I manipulate it so that I can use the previous and next buttons on the slide show and also have it slide through each image?

Code: Select all
 
delay = 3000; 
//----------------------- 
function loadXML(loaded) { 
if (loaded) { 
xmlNode = this.firstChild; 
image = []; 
description = []; 
total = xmlNode.childNodes.length; 
for (i=0; i<total; i++) { 
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; 
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; 
} 
firstImage(); 
} else { 
content = "file not loaded!"; 
} 
} 
xmlData = new XML(); 
xmlData.ignoreWhite = true; 
xmlData.onLoad = loadXML; 
xmlData.load("images.xml"); 
p = 0; 
this.onEnterFrame = function() { 
filesize = picture.getBytesTotal(); 
loaded = picture.getBytesLoaded(); 
preloader._visible = true; 
if (loaded != filesize) { 
preloader.preload_bar._xscale = 100*loaded/filesize; 
} else { 
preloader._visible = false; 
if (picture._alpha<100) { 
picture._alpha += 10; 
} 
} 
}; 
function nextImage() { 
if (p<(total-1)) { 
p++; 
if (loaded == filesize) { 
picture._alpha = 0; 
picture.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
picture_num(); 
slideshow(); 
} 
} 
} 
function prevImage() { 
if (p>0) { 
p--; 
picture._alpha = 0; 
picture.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
picture_num(); 
} 
} 
function firstImage() { 
if (loaded == filesize) { 
picture._alpha = 0; 
picture.loadMovie(image[0], 1); 
desc_txt.text = description[0]; 
picture_num(); 
slideshow(); 
} 
} 
function picture_num() { 
current_pos = p+1; 
pos_txt.text = current_pos+" / "+total; 
} 
function slideshow() { 
myInterval = setInterval(pause_slideshow, delay); 
function pause_slideshow() { 
clearInterval(myInterval); 
if (p == (total-1)) { 
p = 0; 
firstImage(); 
} else { 
nextImage(); 
} 
} 
}
Thanks everyone who read this and if you could help me out I would greatly appreciate it.

Last edited by Sgaspar11; May 24th, 2007 at 18:33. Reason: Code Taglets!
Reply With Quote

  #2 (permalink)  
Old May 24th, 2007, 18:32
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Slide show/s :)

It should be pretty simple using the functions already created:

Create you Next button:

On the buttno use this code:

Code: Select all
 
on (release){
nextImage(); //this calls the function already created to make it advance to the next image.
}
Create your Previous button:

On the button use this code:

Code: Select all
 
on (release){
prevImage(); //this calls the function already created to make it advance to the previous image.
}
That should be what you are looking for.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #3 (permalink)  
Old May 24th, 2007, 20:42
New Member
Join Date: May 2007
Location: New Jersey
Age: 25
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Slide show/s :)

Thanks so much for the reply. I have done it but now whenever I click quickly the previous or next button the order of the slideshow goes crazy and starts going through the images really fast and it's akward. Is there anything that I can do to prevent that from happening? Thanks again.
Reply With Quote
  #4 (permalink)  
Old May 24th, 2007, 22:48
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Slide show/s :)

Hmm ok, I may have been to hasty with the response. I think what it is doing now is restarting the slideshow over everytime you press next or previous but adding the increments of the number of pictures entered.

It might be a while before I can look at this.

But you basically just need to make the buttons advance 1 picture at a time, so find where it does that in the code and use those properties.

Cheers,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #5 (permalink)  
Old May 25th, 2007, 04:55
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: Slide show/s :)

So what the heck did you send to me? Do I still need to open it or not?
Reply With Quote
Reply

Tags
slide show

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Photo slide show jtompkins Flash & Multimedia Forum 1 Oct 6th, 2007 00:05
Image slide show peebman2000 Flash & Multimedia Forum 8 Feb 15th, 2007 18:17
Pictures in slide show on a web page Anne Introduce Yourself 5 Feb 14th, 2007 18:48
Flash Slide Show tutorial ionalia Flash & Multimedia Forum 1 Jun 25th, 2006 17:28
iFrame as Slide Show gribble Web Page Design 6 Nov 17th, 2005 19:07


All times are GMT. The time now is 01:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43