Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Slideshow with "next" and "previous" buttons

Slideshow with "next" and "previous" buttons

Slideshow with "next" and "previous" buttons

Hi there, I just need to make a basic slideshow of photos, but instead of scrolling through them automatically, i need to use buttons to go to the next image, and so on.

Can anyone please provide me with an example of the scripting i would need to apply to the buttons. I know its pretty simple but im getting it wrong somewhere and could really use your help!
There are a lot of photos, so im guessing the scripting will have to refer to the current cast member +1 in order to move through the lot, but im just not sure how to apply this...


RE: Slideshow with "next" and "previous" buttons

This will swap the picture in sprite(1) to the next one in the cast.

-- behaviour attached to a button
on mouseUp me
  sprite(1).memberNum = sprite(1).memberNum + 1
end mouseUp

Kenneth Kawamoto

RE: Slideshow with "next" and "previous" buttons

You might want to add a little bit of code to avoid and error when you go to click next on your last photo. Something like:

-- X = your max number

if sprite(1).memberNum > X then
sprite(1).memberNum = 1

--or instead of a number, a preset property with your spritenumber in.

RE: Slideshow with "next" and "previous" buttons

Thanks guys! That was a great help and it worked perfectly!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close