I created a simple flash file to use on my website. It's just 2 frames and has arrows to go to the next picture. It works perfectly fine for like 2 times then the buttons just stop working. I have no idea why it's doing that. Any help would be appreciated. I'm running Adobe Professional CS5 and Actionscript 3.0
Here's the file: http://www.mediafire.com/?aiowqvap6waic75
You'll better your chances of getting help if you don't ask people to download files and instead explain your design and show the code that is relevant to the problem.
What is the code your file is using for the buttons and how is it set up in the file?
1) Change the code you have in frame 1 to:
var nextF = 2;
var prevF = 2;
2) Change your code in frame 2 to:
nextF = 1;
prevF = 1;
3) Change your layer with the arrow control so that it only has the one keyframe in frame 1 so that the same button instances are used along the entire timeline. The easiest way to do this is to right click frame two of that layer and choose Clear Keyframe.
If you need to add more frames, just use the code in frame 2 and adjust the values of prevF and nextF to suit where you want things to go.
The problem with what you had before is that you end up assigning both listeners for the two frames to the buttons, so when you click one after both have been assigned, both functions get executed. With the changes above you only ever have one function for each button.
Europe, Middle East and Africa