2 Replies Latest reply on Jul 20, 2006 10:48 AM by leo_basica

    Back Button

      hi everyone, i think this is fairly simple for the experience flash user but i can't seem to get this to work. i've created a flash movie with a bunch of frames that have pictures in it and a next button that users can click and the next picture comes up. the thing is, i can't get the code right for the back button, please help.
      this is the code i used for the next button:
      function nextMenuItem(eventObj:Object) {
      if ((currImage+1)>=totalImages) {
      currImage = 0;
      } else {
      menu_villa.title_txt.text = this._parent["image"+currImage+"title"];

      and the event listener is:
      next_btn.addEventListener("click", nextMenuItem);

      thanks for helping out,
        • 1. Re: Back Button
          I am just guessing but this is how I would write the code. Is it how you wrote the code for the previous button? Let me know and we'll get it working for you.

          function previousMenuItem(evt:Object)
          currImage = totalImages;

          menu_villa.title_txt.text = this._parent["image" + currImage + "title"];

          previous_btn.addEventListener("click", previousMenuItem);
          • 2. Re: Back Button
            leo_basica Level 1
            hey sean, thanks for your help. i posted the code that you sent to me into actionscript and everything works fine EXCPET for that when i do indeed press the back button, the gallery goes forward one picture and then goes back a previous picture the second time i click the back button. also, because i do have a small text that goes with every picture, the text gets all mixed up whenever i click the back button. if you have any suggestions, i would greatly appreciate it. i really want this to run smoothly.
            thanks again,