FORUMS: list search recent posts

Slideshow Not working

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Richard Fosness
Slideshow Not working
on Dec 13, 2009 at 2:48:57 pm

So i am working on a slide show for my class and im stuck. I have 2 buttons(next and previous). The next button adds +1 to my "picture" variable and the previous button subtracts -1 to the variable. I have the code(not in this syntax of coarse) if picture == 1 gotoandstop pic1, if picture==2 gotoandstop pic2 and so forth, but for some reason it isnt working. I am using CS4 on a mac.

If someone could help me out that would be awesome. It's for my midterm due tomorrow :(

My flash file is the only link on this site

Thanks in advance :)

Return to posts index

Marcus Geduld
Re: Slideshow Not working
on Dec 13, 2009 at 10:26:03 pm

All your buttons are doing is incrementing or decrementing a variable called picture.

You then have a frame (73) which is setting picture to 1.

You then have some conditional statements that send the playhead to whatever frame is indicated by the value of picture. But that code, which is on the frame called pic1, is only run once. So since picture is equal to 1, the playhead will always go to pic1. If the user then increments picture to 2, nothing will happen, because that conditional statements (the ifs) have already run.

My analysis may be wrong, because the code is confusing. It's confusing because of all the branching (gotos). SOMEBODY out there is teaching you guys that gotoAndPlay and gotoAndStop are good to use in code. They're not.


I am in the process of making some video tutorials on how to code navigations without gotos. They should be done tonight. When they are, I'll post a link.

Author "After Effects Expressions"
Co-author "After Effects For Flash, Flash For After Effects"
Artistic Director, Folding Chair Classical Theatre, Inc
Senior Flash Developer,

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved