Flash Slide show with additional action

rxyl81 used Ask the Experts™
I want to make a slideshow in flash where I can have forward and backward buttons on the right and left sides of the movie that make the slides go to the next but also have buttons along the bottom if the person already knows what photo they want to see. The best example I can think of showing is the taco bell site. Here: http://www.tacobell.com/food/burritos
on the burritos page they have the left and right arrows. I want that and I also like the action. I've done an action like that for a forward movement in the timeline but I don't know how to do it backwards when you press the back button. In addition to these side buttons, (on the taco bell page they have tacos, burritos, gorditas etc. on the bottom that go to other pages but I want these bottom icons to be the same images of the current slide show) I want the bottom icons to be clickable and go to their corresponding image in the slide show fashion. I hope I'm explaining this correctly.

I think the forward motion is your basic straight forward forward motion right? I like how theirs fades out rather quickly as it gets to the next image. But how do I do the backwards motion? And how do I do the action on the buttons to go backwards to say image 1 if they are on image 4? Oh and this is in actionscript 2.0. I haven't learned 3.0 yet and don't even know much of 2.0. Please help! I've been trying to figure this out for weeks. This is my last resort.

Thanks ahead of time.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
There are several good, free, open source flash slideshows that you can just plugin - from how you describe your level of experience, I think that might be your best bet.

Otherwise, what you're describing would be much easier to do with script, rather than a timeline animation.

The basic approach, how I'd do it (my AS2 is a little rusty, but I think that's probably true for everyone in the world at this point - you should really try to upgrade to 3)

First, put all your images in an array, e.g., var images = ["image1.jpg", "image2.jpg", "image3.jpg"];

Then create a variable to indicate which image is actively being show, e.g., var activeImage = 0;

Then create a function to handle changes to this number

function setImage(){
  // load up images[activeImage], place it off the stage, set it's _alpha to 0, tween the existing one out and the new one in

The next and previous arrows would just increment or decrement activeImage
nextArrow.onPress = function(){
prevArrow.onPress = function(){

obviously you'd need some controls to make sure the image didn't go past the total number or go below 0...

Next, for each item in the array, create a small icon underneath, spaced and sized appropriately.  You can use createEmptyMovieClip to create the containers, MovieClipLoader to load in the images, then add listeners for when the image has been loaded to size and position them.  Each of those icons gets a handler to set the active image to it's own position

var icon = iconContianer.createEmptyMovieClip(i, i);
// use a MovieClipLoader to load the image into the icon, and give it an "index" value
icon.index = i;
icon.onPress = function(){
  activeImage = this.i;

You can use the built-in Tween class to move the images in and out, or roll your own

import mx.transitions.Tween;
import mx.transitions.easing.*;
// the next line would move someMC to _x position 500 over 1 second, using strong inertia (fast at start, slow at end)
new Tween(someMC, "_x", Strong.easeOut, 500, 0, 1, true);

That's the basic idea - like I said, if you're not familiar enough with ActionScript to tween something, you might be better off using a pre-fab solution, but the general outline above should get you pointed in the right direction


I'd like to try what you suggest but if I can't get it to work, where would I be able to find these free slideshows you are mentioning?

a quick google of "flash slideshow" gave back several results...


you could try "flash slideshow" or "flash gallery" or "flash photo gallery", etc.


Also, the script you are describing sounds beyond my comprehension level. How would I do this with the timeline? I only have about 10 images. So even though it would take longer, I'm thinking it might be easier for me. Thanks for the actionscript 2.0 info as well, I don't think I will be learning any more of that and go straight to 3.0.


I only know how to add actionscript to frames or buttons. So I don't know where to even start with what you described. :(

i'm not sure you could do it with just frames - i think you'll need to learn actionscript.  start small - figure out how to create a textfield, write some text, and add it to the stage.  then figure out how to load an image.  then figure out how to change properties, then how to animate them.  at some point, you'll want to learn about OOP and class files, but you could do what you're describing in frame script.

some very breif basics (AS3).

create a new FLA.

click on Frame 1.

open the Actions panel.

paste the following:

var textfield:TextField = new TextField();  // create a textfield object
textfield.text = "howdy";  // write some text to it
this.addChild(textfield);  // add it to the display list

run Test Movie

Unfortunately, what you're describing isn't something I could write for you quickly.


The problem is that I already started this in the timeline and I did all the forward work for it. I don't have enough time to learn actionscript and post this by next week on thursday. I really thought if you can do forward tweening that maybe you could do backward tweening with an action in the frame or by clicking on a button. :(

you can use prevFrame, but I'm pretty confident you're not going to be able to achieve everything you want without a decent dose of scripting.

in AS2:

in the frame actions of the first frame of the timeline you're animating, you can use something like this


this.onEnterFrame=function() {

if (this.rewind) {


} else {




then to rewind something, you just set the rewind variable to true...

rewindButtonMC.onPress = function(){
  yourAnimationInstance.rewind = true;

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial