Skip to main content
Participating Frequently
September 28, 2021
Answered

Save current Slide in variable and jump back

  • September 28, 2021
  • 2 replies
  • 1142 views

Hello,

 

i would like to save the current slide the user is at in a variable.

 

It looks like that:

Assign: *UserVariable* with cpInfoCurrentSlide

 

Then i want to write an advance action to jump back to this current slide. How can i do that?

 

Thank you so much for ur help!

    This topic has been closed for replies.
    Correct answer Lilybiri

    Use this one JumpToSlide:

     Expression cpCmndGotoSlide = v_slide - 1

     Continue

    The Continue may not be necessary if you are OK with the slide pausing at its start frame.

     

    v_slide is the user variable to which you assigned the current slide number:

       Assign v_slide with cpInfoCurrentSlide

     

    The reason for the Expression needed in the first action is that the index starts with 1 for the system variable cpInfoCurrentSlide, but sttarts with 0 for cpCmndGotoSlide.

    Full explanation in the workshop 'Custom Interactions' which I presented last week during the eLearning Adobe World Conference. You can also find it in:

    http://blog.lilybiri.com/replay-or-reset-slide

     

    Sorry to disagree with StagPrime, because that only works when that slide was indeed the last visited slide. Using that action can be tricky, you have to be very careful.

     

    2 replies

    Lilybiri
    LilybiriCorrect answer
    Legend
    September 28, 2021

    Use this one JumpToSlide:

     Expression cpCmndGotoSlide = v_slide - 1

     Continue

    The Continue may not be necessary if you are OK with the slide pausing at its start frame.

     

    v_slide is the user variable to which you assigned the current slide number:

       Assign v_slide with cpInfoCurrentSlide

     

    The reason for the Expression needed in the first action is that the index starts with 1 for the system variable cpInfoCurrentSlide, but sttarts with 0 for cpCmndGotoSlide.

    Full explanation in the workshop 'Custom Interactions' which I presented last week during the eLearning Adobe World Conference. You can also find it in:

    http://blog.lilybiri.com/replay-or-reset-slide

     

    Sorry to disagree with StagPrime, because that only works when that slide was indeed the last visited slide. Using that action can be tricky, you have to be very careful.

     

    Participating Frequently
    September 28, 2021

    Thank you! I will try this!

    Stagprime2687219
    Legend
    September 28, 2021

    Are you trying to do this...   or something slightly different?

     

     

    Participating Frequently
    September 28, 2021

    Thank you for ur reply. No because the learner can visit previous slides in the course and should be able to return then to the test. So the "last visited" slide wouldnt be the slide in the test - it might be another slide in the course. Thats why i want to save the slide in a variable.

     

    kind regards

    Stagprime2687219
    Legend
    September 28, 2021

    Ah - so you only want to assign the current slide to your variable only once the learner has reached your test so that they can go back to other slides and review and return to the last test slide they made it to? That would make a bit more sense.

    I had the impression that your variable was constantly being updated to the current slide so I was a little confused about the use case.

    If that is not the case - then I am still confused about what is supposed to happen.