all groups > flash actionscript > may 2006 >
You're in the

flash actionscript

group:

Gallary Button Code



Gallary Button Code rkrak
5/5/2006 7:08:17 PM
flash actionscript: 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.

Re: Gallary Button Code .:}x-=V!P=-x{:.
5/5/2006 7:22:36 PM
on(release) {
for (var i=0; i<60; i++) {
showPhoto(SelectedCategory, PhotoNumber + i ); wait(5000);
}
Re: Gallary Button Code rkrak
5/5/2006 8:06:56 PM
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?
Re: Gallary Button Code shyaway
5/5/2006 8:25:58 PM
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.
Re: Gallary Button Code rkrak
5/5/2006 8:34:13 PM
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.
Re: Gallary Button Code rkrak
5/5/2006 8:55:30 PM

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"
Re: Gallary Button Code rkrak
5/5/2006 9:08:33 PM
AddThis Social Bookmark Button