Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #359750 Score: 0
    Profile photo of Ben Haizlip
    Ben Haizlip
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @bhaizlip9268

    All,

    I need some help please.  I’ve attached my file.  Basically, I’ve got a 3 ring binder with tabs in it.  I’ve dropped a transparent button over the MOD 1 tab.  When I click that button, I want to hide the opened binders title page, and reveal the Module 1 page.  I also want the button to move from (1004, 62) to (0,62) on the screen (the position of the “opened” MOD 1 tab. I can make all that work so far.  My problem is, I want to be able to then click that MOD 1 button again, and have it hide the Module 1 page, show the binder title page, and move back to its original (1004, 62) location.  In other words, act just like opening a real binder.  I’m not sure how many user defined variables I need.  I’m currently playing around with mod_button_location and mod_button_open_or_closed as my 2 variables.  I think I’m going to need 2 because _location will help establish a condition for _open_or_closed and vice versa.  My knowledge of variables is only just starting so I apologize in advance if there is some obvious solution.  I kind of feel like I should be able to use the IF / ALWAYS part of actions to make it conditional.  I’ve tried it, but with no success.

     

    Can someone help me out?  I’d appreciate it.

     

    Thanks!

     

    Ben

    Attachments:
    1. Ammo_63.zip
    #359758 Score: 1
    Profile photo of Matthew Dyer
    Matthew Dyer
    Member
    friend finder
    profile
    picture perfect
    Group Member
    beginner
    intermediate
    wise owl
    advanced
    verified member
    curious george
    3 pts
    @mdyer6171

    Just a thought, or perhaps a different way of approaching this.  Would it be easier to have the button go to a different page instead of hiding the title page?  To the user, they wouldn’t see the changing of the page.  It would just appear as you mentioned, that the title page would be hidden.  This would also allow you to have the button in the different position without having to set up a variable to make the button move.  Then on the MOD 1 page, you can have that button go back to the title page.

    This post has received 1 vote up.
    #359770 Score: 0
    Profile photo of Ben Haizlip
    Ben Haizlip
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @bhaizlip9268

    I’ve thought about that.  I could probably do this by just creating extra buttons and hiding/ revealing them at the appropriate times.   BUT I’m also kind of hell bent at this point on FIGURING THIS OUT.  You’re right, I could do something like have a button initially hidden, and then do an “OnShowShow” to reveal the second button in the new position when the reveal page showed.  BUT, like I said (I’m just repeating myself at this point… sheesh.) the person who was doing this was kind of doing it that way and while it works, it’s kind of bulky for lack of a better term.  If I can get it to halfway work, I want to be able to get it to ALL the way work.

    #359781 Score: 3
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    307 pts
    @timk

    You only need variables if you want to move the button. But as you’re using invisible buttons you could just add a second button on the left for “Close Page 1” and make the buttons show / hide each other.

    If you want to move the same button, you’d need 1 variable per chapter. Give it an initial value of “0” for closed. Add an action to set the variable to “1” (if it’s 0) else set to 0. Make this the first action on the button and add conditions to all following actions depending on whether they’re are “Open” or “Close Page 1” actions.

    This post has received 3 votes up.
    #359785 Score: 1
    Profile photo of Matthew Dyer
    Matthew Dyer
    Member
    friend finder
    profile
    picture perfect
    Group Member
    beginner
    intermediate
    wise owl
    advanced
    verified member
    curious george
    3 pts
    @mdyer6171

    Well, how about this idea?  Something that was kind of brought up at LUC17.  Have a variable set as Postion.  When you first click the button, it will add +1 to the variable and run an action group that will do everything you want it to do.  When the button is clicked again, it will check to see if Position is set to 1.  If it is, it will run a different action group reverting everything back to the title page, button back to original position, etc., and set the variable back to 0.  Essentially, the Position variable would be a kind of on/off button.

    This post has received 1 vote up.
    • This reply was modified 2 years, 3 months ago by Profile photo of Matthew Dyer Matthew Dyer.
    #359793 Score: 0
    Profile photo of Ben Haizlip
    Ben Haizlip
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @bhaizlip9268

    I do want to move the buttons, because it’s more complex / involved/ whatever and I want to learn how to do it.  It’s only going to be hard the first time. (I hope.)

    #359795 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    307 pts
    @timk

    Just saw you already have my approach in it. So you’d just have to make the button hide both pages (all pages) and show “Title page” If “Right” and show “Page 1” if “Left”.

    You’ll need a “mod_button_location” variable for each button and add actions to each button to set all other variables to “Right” so the users can flip through the pages.

    This post has received 1 vote up.
    #359804 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    307 pts
    @timk

    Here’s a sample how it can be done with the two pages. As usual when I actually start working it comes out differently than I thought in the beginning, so I’m only using one variable to store which button has been clicked.

    This post has received 1 vote up.
    Attachments:
    1. ammo_64.zip
    #359934 Score: 0
    Profile photo of Ben Haizlip
    Ben Haizlip
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @bhaizlip9268

    This is EXACTLY what I wanted.  Now I’m just trying to figure out HOW you did it.  It seems so close to what I was attempting.  The Devil is in the details.  Thanks!

    #359940 Score: 0
    Profile photo of Ben Haizlip
    Ben Haizlip
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @bhaizlip9268

    Okay, I’m looking through the Mod 1 actions you used.  You’ve got a OnMClkMoveTo (1004, 155) and the target of that action is Mod 2.  Mod 2 is already at that location.  I tried deleting that action and running it and there seems to be no difference.  What am I missing?

    #359943 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    307 pts
    @timk

    The action exists to reset “Mod 2” to the right, in case “Mod 1” is clicked while “Reveal 2” is visible, i.e. while “Mod 2” is on the left.

    This post has received 1 vote up.
    #359945 Score: 0
    Profile photo of Ben Haizlip
    Ben Haizlip
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @bhaizlip9268

    Gotcha!  Thanks.

    #360022 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    Noticed this thread and wanted to make my own solution based on your question. I did want to make it reusable, especially the part where to get the positions where the button needs to go. Added crossmarks in my .awt that represent those positions. You can reposition them in the .awt and they will go to the new position. To show that that works, i added 2 buttons to make both the position of the crossmarks and the order the button goes to each position random.

    Moving with Variables

    Most of it is done purely in Lectora. However to get the current position of the crossmarks dynamicall in any given circumstance i needed a Javascript function… getPosition( ) in the added external JS gets the position of the 3 crossmarks and passes them to Lectora variables.

    ~Math

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

You must be logged in to reply to this topic.