Explore the community Forums Lectora Lectora Questions & Answers Variables on One Page set up

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #316427 Score: 0
    Profile photo of Nick Williams
    Nick Williams
    Member
    friend finder
    beginner
    intermediate
    contributor
    wise owl
    curious george
    advanced
    10 pts
    @nwilliams3743

    I’m creating a module using only one page to keep the whole project in one animation and no white screen.

    To have the information display and hide (essentially moving between ‘pages’) I’ve been experimenting how to use variables.

    To test this, I set a modify variable action on a button to add to the variable by 1 each time it was clicked.

    A square was set to display when the variable was equal to one.

    A triangle was set to display when the variable was equal to two. etc etc.

    I noticed that we have to also set the button action to show the shapes only when the value was set to that number. (example, square to show when value equaled 1)

    Also noticed that when I want  the triangle to display, I have to set the square to hide on the button click when the value was at 2.

    I then added another button, to decrease the value by one, should the user wish to return to the previous content, however, from what I can see, I need to add all the show/hide actions again?

    Was hoping there could be a way for Lectora to notice that the value had changed, and it could recognise what is to be displayed by the rules of the value and variable?

    I think I have the understanding of how this should work, however perhaps I’m missing something?

    Is there a way for the objects to automatically hide/show depending on what the value of the variable is?  Or do we have to complete the show/hide actions for every occurrence ?

     

    #316430 Score: 1
    Profile photo of Sinchu
    Sinchu
    Member
    beginner
    intermediate
    contributor
    advanced
    wise owl
    1 pt
    @Sinchu

    Hi Nick

    Yes you can do this in very simple and smart way, please download the attached files and have a look. please let me know if you have any doubts.

     

    This post has received 1 vote up.
    Attachments:
    1. PCount.zip
    #316490 Score: 2
    Profile photo of Nick Williams
    Nick Williams
    Member
    friend finder
    beginner
    intermediate
    contributor
    wise owl
    curious george
    advanced
    10 pts
    @nwilliams3743

    Well, today I learned you can group actions.

     

    Thanks Sinchu!

    This post has received 2 votes up.
    #316501 Score: 0
    Profile photo of Nick Williams
    Nick Williams
    Member
    friend finder
    beginner
    intermediate
    contributor
    wise owl
    curious george
    advanced
    10 pts
    @nwilliams3743

    Hey Sinchu,

    two questions:

    Given that the initial value of ‘PageCount’ is set to 1, why does there have to be an action resetting the value to 1 for the first character to load?  If the initial value is 1, shouldn’t this initiate the first ‘page’?  I can see it doesn’t work without the ‘ResetVar’ but just curious as to how this functions.

     

    Also, given each ‘page’ may have 4-5 items, would I only need to apply the OnShowModVar action to one item that would appear first to activate all items in that group/’page’? Or can I attach the action to the group as a whole?  May become a bit tedious attaching the action to every item?

    Thanks for the guidance so far, has been really helpful!

    #316505 Score: 0
    Profile photo of Sinchu
    Sinchu
    Member
    beginner
    intermediate
    contributor
    advanced
    wise owl
    1 pt
    @Sinchu

    Hi Nick,

    I have reset the variable becz browser will save lectora variable and when you re launch the course the page count value will be different(it takes the previous value from browser)

    you can add your items inside the group so you don’t need to write many actions or just create action group to display your page content.

     

     

     

    #317691 Score: 0
    Profile photo of Nick Williams
    Nick Williams
    Member
    friend finder
    beginner
    intermediate
    contributor
    wise owl
    curious george
    advanced
    10 pts
    @nwilliams3743

    Hi Sinchu,

    I was attempting to make the images fly in and out like a carousel.  However I became stuck when realising the modify variable was on a show/hide action, and changing any of those actions to a move action would then not fire the variable?

    Are you able to assist how this would occur?  Basically, I have a process of 6 images that need to be viewed in order.  Click back/forth will move the pictures on/off the screen.  Obviously, the simple ‘fly in/out’ doesn’t work, as they need to fly off to different sides, depending on whether the person clicks next or back.

    I’ve noticed someone else has just made a post regarding this recently too.  Any help is greatly appreciated!

    #317725 Score: 0
    Profile photo of Ian Mullineaux
    Ian Mullineaux
    Member
    beginner
    intermediate
    friend finder
    profile
    wise owl
    picture perfect
    1 pt
    @IanMullineaux

    There is probably a better way but click on the contents of the page groups, select properties, set the transition in to fly left, and transition out to fly right – adjust the speed to what you want –

     

    if you do that on all the page groups you should get the effect you want..

    #317729 Score: 0
    Profile photo of Nick Williams
    Nick Williams
    Member
    friend finder
    beginner
    intermediate
    contributor
    wise owl
    curious george
    advanced
    10 pts
    @nwilliams3743

    Thanks Ian.

    I’m trying to find an approach that will keep the consistency of a carousel.  That would be the possibility of pictures to have consistency to come back from where they left.  Example being, if i had 5 images, three images came from the right of screen and flew off to the left, but then i want to go back to the previous image, it should reappear from that left side moving right (opposite to the first instance)

    I currently just have the images fading in and out but couldn’t figure out the carousel movement.

    It’s almost as if we need to create a variable on the in/out transitio

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

You must be logged in to reply to this topic.