4 Replies Latest reply on Aug 13, 2017 2:18 PM by sdwarwick

    Click Reveal

    cherylt20938641

      I understand the basics of creating a click/reveal interaction using advanced actions, however I'm getting stuck here. I want to create a click/reveal interaction where the learner clicks any of the germs on the hands and that germ will disappear and the next bullet point in the list on the right will appear. My trouble is making it so that the germs can be clicked in any order, but make sure that the text always appears in the same order, from top to bottom. All of the germs are set up as image buttons, and each of the bullet points are set up as individual text boxes.

       

      Any help is greatly appreciated!

       

        • 1. Re: Click Reveal
          Lilybiri MVP & Adobe Community Professional

          This is not easy to solve. Are you used to create complicated advanced actions? A lot has to be taken care of as well, since the explanations have very different lengths and can appear in any sequence. With a combination of several counters and variables it could be done. However using JS would probably result in a more elegant solution.

          • 2. Re: Click Reveal
            yg236 Level 1

            As Lilybiri said, you can do this with variables. However there's an easier workaround for what you want to do--You can create 13 slides after the initial slide, each adding one additional bullet point in order, and make the advanced actions hide the clicked germ and go to next slide. The trick is putting the germ images (not image buttons) only on the first slide and set the display as "Rest of Project". Then put a transparent shape on each germ, also set display to "Rest of Project", and check Use as Button. Set the shape/button advanced action to 1. Hide the germ under the clicked shape; 2. Hide the clicked shape itself; 3, Go to next slide. You need to set this up for all 13 germs (You can duplicate advanced actions to make it faster). Now you can click on any germ in any order and the bullet points will always appear in order because it's just going to the next slide. Hope this helps!

            1 person found this helpful
            • 3. Re: Click Reveal
              Lilybiri MVP & Adobe Community Professional

              I may have misunderstood, but I thought the texts had to appear in the same sequence as the germs have been clicked, which could be any sequence. If that is the case, your work flow will not give the requested solution.

              • 4. Re: Click Reveal
                sdwarwick Level 3

                this is an example with  javascript swoops in to save the day.  not enough time right now to give the complete solution, but the strategy is to  name all of the Germs  with a similar ID, such as Germ_1,  Germ_2 ...

                then name your text field "theText"

                then on the beginning of the page,  add the following javascipt on enter

                ---

                //monitor that looks for when you click on a bug.

                $("id^=Germ").on('click',  thebugfunction ) 

                //make an array of all the text

                var textout[];

                textout[0] = "first text";

                textout[1] = "second text";

                //set your sequence counter to 0

                var my_counter = 0;

                 //then make thebugfunction 

                function thebugfunction(theClick) {

                   var theGerm = theClick.id;

                   cp.hide(theGerm);

                  theText = textout[my_counter];

                my_counter = my_counter+1;

                }

                 ---

                that should do it.  it is totally untested however.

                2 people found this helpful