Explore the community Forums Lectora Lectora Questions & Answers Making a button that can do 2 of the same actions but one after another.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #297675 Score: 0
    Profile photo of Tom Lacey-Johnson
    Tom Lacey-Johnson
    Member
    beginner
    intermediate
    picture perfect
    curious george
    2 pts
    @tomljagogo

    Hi,

     

    What I need to be able to do is have back and forward buttons that can show and hide different images without having to have multiple instances of them to put the actions on.

    The attached image shows the page I am working on and the buttons in question. The confusing looking image above is a series of images showing different views of the right eye with their nerves (left, front and right) that I want to be able to cycle through with the buttons but only one button for forward and backwards.

    #297678 Score: 2
    Profile photo of Sergey Snegirev
    Sergey Snegirev
    Member
    contributor
    intermediate
    advanced
    friend finder
    lab member
    junior moderator
    advocate
    LUC16
    LUC16 Attendee
    wise owl
    339 pts
    @ssneg

    Frankly, I’d opt for multiple copies of the button. You click “next”, the old image hides, the old two buttons hide, the new image and the new two navigation buttons appear. Pretty simple and effective but probably not very elegant.

    Okay, let’s solve your problem using conditional actions. The method is simple. Use a variable to track which image is shown, then fire appropriate action on a button based on the variable contents.

    See attached sample (I used text blocks instead of images for simplicity).

    Live demo: http://bit.ly/1KhNuFs

    This post has received 2 votes up.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.