Home › Forums › Other › AnythingSlider – Restart flash movie on show › Re: AnythingSlider – Restart flash movie on show
Sorry for not posting here before. I was still playing with the code .
Thanks, Mottie, for the code suggestion. It worked perfectly after some adjustments. Here is the final code that worked for me:
J(‘#slider1’).anythingSlider({
onSlideBegin: function (event, slider) {
var flashMovie = ”;
if (navigator.appName.indexOf(“Microsoft Internet”) != -1)
flashMovie = slider.$currentPage.find(‘object’)[1];
else
flashMovie = slider.$currentPage.find(‘object,embed’)[1];
// stop flash movie on previous slide
flashMovie.StopPlay();
}, onSlideComplete: function (slider) {
var flashMovie = ”;
if (navigator.appName.indexOf(“Microsoft Internet”) != -1)
flashMovie = slider.$currentPage.find(‘object’)[1];
else
flashMovie = slider.$currentPage.find(‘object,embed’)[1];
// restart flash movie on current slide
flashMovie.Rewind();
flashMovie.Play();
},
width: 600,
height: 350,
resizeContents: false,
autoPlay: true,
autoPlayLocked: true,
delay: 25000,
animationTime: 600,
pauseOnHover: true
})
});
If I can bother you with another question, the previous version of AnythingSlider I was using allowed to set the timeout individually for each slide by setting the ID property of the LI tag containing the slide to the desired timeout value. So if the first LI had ID=”10000″ it would have a timeout of 10sec, and if the second slide had ID=”25000″ it would have its timeout set to 25sec. That version didn’t allow me to use the event handlers (onSlideBegin and onSlideComplete) to interact with the flash movies, so I upgraded to the latest version which on its turn fixes a global timeout for all slides at one. The question is: is there a way I can set the timeout individually to each slide as I could before?
Thanks again.