Explore the community Forums Lectora Lectora Questions & Answers Game with adding, hiding and showing buttons

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #427909 Score: 0
    Profile photo of Erin Lawson
    Erin Lawson
    Member
    beginner
    intermediate
    curious george
    wise owl
    @elawson8819

    To anyone who understands JavaScript and Lectora Publisher.  I haven’t JavaScripted in years, so what I have created isn’t working at all.

    I have a game I am creating where someone clicks on a button and then it reveals a new button on the other side of the screen.  Each time that first button is clicked a new button appears over the previous button on the other side of the screen.  The buttons that show are not to disappear until after specific actions are finished on the screen.  Because of how this game works, I wanted to allow the user to loop through each button shown after it is revealed and has not disappeared.

    I have tried several none JavaScript methods to no success.  If someone can help me with developing the code that would work, that would be great.

     

     

     

     

    • This topic was modified 4 months ago by Profile photo of Joe Wieloch Joe Wieloch.
    #427936 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    53 pts
    @wheels

    Hi Erin,

    Thanks for the challenge, I guess I can’t help myself!

    I think I was able to do what you are trying to do with pure Lectora Objects, Actions and Variables.

    It will only add up to a static number of buttons, but I would imagine more than 20 or so would be too much.

    Please download the attached title and give it a try! You import it as a Lectora Online PKG file.

    – Joe

    Attachments:
    1. 123.pkg
    #428186 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    53 pts
    @wheels

    Hi Erin @elawson8819 I was hoping to know if my example helped you. I would like to know more about how this game would work and see if we could make something cool to share in the Shared Content section.

    #428260 Score: 0
    Profile photo of Erin Lawson
    Erin Lawson
    Member
    beginner
    intermediate
    curious george
    wise owl
    @elawson8819

    Hi Joe-

     

    Thank you for your advice.  It did not do exactly what I needed, but it gave me a good idea for how I could possibly fix it. Since it is due today, I came up with a very simple solution.

     

    Erin

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.