6 Replies Latest reply on May 5, 2006 2:08 PM by rkrak

    Gallary Button Code

    rkrak
      Hello, I have a photo album viewer I have created in Flash that is working correctly, I have buttons (first picture, back, forward, last picture) to go through photos that are within a number of categories a user can select from a combo box, but i would like it so the user can have a category show all it's pictures automatically by pushing a button. I have mixed to bits of code hoping they would work. I used the code from the play button plus a “for loop” I made up, but for whatever reason it is not working. Here is the code:

      on(release) {
      for (i-0; i<60; i++) {
      showPhoto(SelectedCategory, PhotoNumber + i ); wait(5000);
      }
      }
      Could some one let me know what is wrong with the code and or suggest a simple solution to this problem? I am new to anything flash so I really don't know how to go about making this button show each category as a slide show. Thanks in advance.
        • 1. Gallary Button Code
          .:}x-=V!P=-x{:. Level 3
          on(release) {
          for (var i = 0; i<60; i++) {
          showPhoto(SelectedCategory, PhotoNumber+i);
          wait(5000);
          }
          }
          • 2. Re: Gallary Button Code
            rkrak Level 1
            i was curious if i would have to declare the variable, thanks for clearing that up, but it still isnt working. What would be another way to make a button start a timed slide show of photos that are being got to through a XML file?
            • 3. Re: Gallary Button Code
              shyaway Level 1
              it helps if you narrow down your question.
              as for XML. check out the XML class if you are not familiar.
              when you know how to access the stuff from XML. the rest are the same as you would normally do.
              • 4. Re: Gallary Button Code
                rkrak Level 1
                k, sorry if i was to vague.

                bassically i thought i would add the bit about the XML to let everyone know that this was how i was getting the pictures onto the screen. It is working for the other buttons, just not for the new one i made and the code that i had above. At any rate if any one can see or knows of a better way to do what i orginally was after which is to create a button that goes through whichever category is selected and shows each picture for a specified amount of time and then moves on to the next picture for the loop specified, it would be greatly appreciated. Thanks for your time.
                • 5. Re: Gallary Button Code
                  rkrak Level 1


                  on(release) {
                  for (var i = 0; i<60; i++) {
                  showPhoto(SelectedCategory, PhotoNumber+i);
                  wait(2000);
                  }
                  }

                  auto_Play_Button

                  in the properties box there is a drop down that says the type of button, and then an instance name, if i put a regular User interface button within my project the top drop down box within the properties inspector is dimmed out, so i can't say that it is a Button, Movie, or graphic like the other buttons i'm using as controls. What is the reason for this, and how do i make a new button so i can give it an instance name and let the properites windo know what type of button it should be?

                  i tried copying one of the other control buttons but giving it a new instance name plus adding the code that a user here helped me get right but this is what the debugger displayed when i clicked on this button:

                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  Error opening URL "file:///D|/slideshow/photos/undefined"
                  • 6. Re: Gallary Button Code
                    rkrak Level 1
                    not sure what happend but this is not the correct answeer to my question just another question. Thanks