Hi. I'm trying to create a slideshow that would scroll through different ads for my bank's website. I want to have it start to "autoplay" through the ads, changing every 10 seconds or so. I would also like to have forward, pause, and back buttons so the user could scroll through them if they don't want to wait for the autoplay. I see samples of this on lots of websites to display their news headlines, like pcworld.com, and worldofwarcraft.com. Please help! Thanks in advance...
-Cam
Autoplaying Slideshow on website
Started by Ecuaman801, Feb 14 2007 06:48 PM
1 reply to this topic
#1
Posted 14 February 2007 - 06:48 PM
#2
Posted 14 February 2007 - 08:25 PM
All you'd have to do is use the gotoAndStop() and the nextFrame() methods.
For example, on your root actionscript timeline, you could have something like this.
I honestly don't know (or understand) how to make the back button, try Googling it and playing with the results.
As for autoplay, you can use an interval.
I'm just learning Flash myself, but that should atleast get you started more or less.
For example, on your root actionscript timeline, you could have something like this.
nextButton_mc.onRelease = function(){
_root.nextFrame();
}
I honestly don't know (or understand) how to make the back button, try Googling it and playing with the results.
As for autoplay, you can use an interval.
function setAutoplay(){
var autoplay = setInterval(function(){ _root.nextFrame(); }, 10000);
}
function unsetAutoplay(){
clearInterval(autoplay);
}
playButton_mc.onRelease = function(){
setAutoplay();
}
pauseButton_mc.onRelease = function(){
unsetAutoplay();
}
I'm just learning Flash myself, but that should atleast get you started more or less.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
