Skip to main content
October 9, 2006
Question

gallery moves forward through images nicely, but not when going backwards

  • October 9, 2006
  • 1 reply
  • 162 views
Hi,

I hope you can understand my question. As you click on each button in this animation (link below), a picture is shown like a gallery according to which button the user clicks on. When I click on a button to go to a picture, it follows through nicely when going forward, but if I want to go back the gallery doesn't reverse through the pictures, it just goes back to the beginning in frame 1 and then finds the picture.

I basically want to get the same effect as: http://www.deftones.com/5_2/site.html

Here is what I have done so far so you can see what i'm talking about: http://www.gamefantasy.co.uk/freeminds

On the first frame of each picture change animation I have put the following code: gotoAndPlay("home");

The last frame of each picture change animation has the following code: stop();

The following code is written for each button to go to the specific picture:

on (release)
{
gotoAndPlay("home");
}

Thanks a lot for your help.
This topic has been closed for replies.

1 reply

Inspiring
October 9, 2006
You are thinking in the wrong terms, this is done easier without using the timeline.
I've written a very simple example, not very good code (in a hurry) - but it works and illustrates an approach.
Open Flash, create a new document and paste in this code: